commit d0ada9d34b772a838278084626aa5de9a9fc4837 Author: Mr Hoelee Date: Thu Nov 5 19:06:06 2026 +0800 init: portal.hoelee.com security sandbox & decommission stack diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..71c5423 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +Thumbs.db +*.log diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae365fd --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# hoelee-portal + +`portal.hoelee.com` 安全隔离与服务下线沙盒服务。 + +## 1. 背景与安全目标 + +- **历史问题**:此前 `portal.hoelee.com` 曾通过 CNAME 解析至第三方 SaaS 系统 SuiteDash(`app.suitedash.com`)。SuiteDash 的公开短链/二维码跳转功能(`/qr/r/...`)遭黑客利用生成恶意重定向链接,致使 Google Safe Browsing 误发社交工程(Social Engineering)警告。 +- **本服务职责**: + 1. 完全解绑 SuiteDash,将 `portal.hoelee.com` 收拢至本地 DSM Nginx 边缘网关与本 Docker 栈。 + 2. 对历史 SuiteDash 恶意利用路径(`/qr/*`、`/r/*`、`/login*` 等)强制响应 **HTTP 410 Gone**,向搜索引擎与安全爬虫明确指示该资源已物理销毁。 + 3. 根路径展示极简官方服务迁移通知(无表单、无外部脚本、无短链跳转),阻断一切钓鱼风险。 + +## 2. 部署与架构 + +- **宿主目录**:`/volume1/docker/hoelee-portal/` + - `html/index.html`(静态通知页,只读挂载) + - `conf.d/default.conf`(Nginx 规则,只读挂载) +- **内部网络**:`bridge_hoelee` +- **宿主端口**:`8099:80` +- **反代接入**:DSM Synology Reverse Proxy + - `https://portal.hoelee.com` (443) -> `http://localhost:8099` + +## 3. 运维命令 + +```bash +# 检查 Nginx 配置 +docker exec hoelee-portal nginx -t + +# 热重载 Nginx +docker exec hoelee-portal nginx -s reload + +# 健康检查 +curl -I http://127.0.0.1:8099/healthz +curl -I http://127.0.0.1:8099/qr/r/test # 应返回 410 Gone +``` diff --git a/conf.d/default.conf b/conf.d/default.conf new file mode 100644 index 0000000..973f0d1 --- /dev/null +++ b/conf.d/default.conf @@ -0,0 +1,29 @@ +server { + listen 80; + server_name portal.hoelee.com localhost; + + # Basic security headers + add_header X-Content-Type-Options "nosniff" always; + add_header X-Frame-Options "DENY" always; + add_header Referrer-Policy "strict-origin-when-cross-origin" always; + + # Precision 410 Gone for legacy SuiteDash open redirect / shortlink / QR paths + location ~* ^/(qr|r|login|auth|dashboard)(/|$) { + default_type text/plain; + return 410 "410 Gone: This resource has been permanently retired and decommissioned.\n"; + } + + # Healthcheck endpoint for Docker / Portainer + location /healthz { + access_log off; + default_type text/plain; + return 200 "ok\n"; + } + + # Root and static content + location / { + root /usr/share/nginx/html; + index index.html; + try_files $uri $uri/ /index.html =404; + } +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..09abeea --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,27 @@ +version: "3.9" + +services: + hoelee-portal: + image: nginx:1.27-alpine + container_name: hoelee-portal + hostname: hoelee-portal + restart: always + volumes: + - /volume1/docker/hoelee-portal/html:/usr/share/nginx/html:ro + - /volume1/docker/hoelee-portal/conf.d:/etc/nginx/conf.d:ro + ports: + - "8099:80" + environment: + - TZ=Asia/Kuala_Lumpur + mem_limit: 128m + healthcheck: + test: ["CMD", "wget", "-qO-", "http://127.0.0.1/healthz"] + interval: 30s + timeout: 5s + retries: 3 + networks: + - bridge_hoelee + +networks: + bridge_hoelee: + external: true diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..dbeb8f9 --- /dev/null +++ b/html/index.html @@ -0,0 +1,160 @@ + + + + + + + Service Notice — Hoelee Enterprise + + + +
+
+ + System Notice +
+

Client Portal Relocation

+
Infrastructure & Client Service Upgrade
+ +

The legacy third-party CRM portal previously mapped to this endpoint has been permanently retired and decommissioned.

+ +
+

Security Notice: All client documentation, proposals, project milestones, and invoices are now delivered directly via private, authenticated channels under doc.hoelee.com.

+
+ +

If you are an existing client or partner looking for active project status or documents, please connect with us via our official direct communication channels below.

+ + + + +
+ +