init: portal.hoelee.com security sandbox & decommission stack

This commit is contained in:
hoelee committed 2026-11-05 19:06:06 +08:00
commit d0ada9d34b
5 files changed
+254

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
.DS_Store
Thumbs.db
*.log
+35
View File
@@ -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
```
+29
View File
@@ -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;
}
}
+27
View File
@@ -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
+160
View File
@@ -0,0 +1,160 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<title>Service Notice — Hoelee Enterprise</title>
<style>
:root {
--bg: #090d16;
--card-bg: #111827;
--border: #1f293d;
--text-main: #f3f4f6;
--text-muted: #9ca3af;
--accent: #38bdf8;
--accent-bg: rgba(56, 189, 248, 0.1);
--success: #34d399;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: var(--bg);
color: var(--text-main);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}
.container {
background-color: var(--card-bg);
border: 1px solid var(--border);
border-radius: 16px;
max-width: 580px;
width: 100%;
padding: 40px;
box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}
.badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 14px;
background-color: var(--accent-bg);
color: var(--accent);
border: 1px solid rgba(56, 189, 248, 0.25);
border-radius: 9999px;
font-size: 0.8125rem;
font-weight: 600;
letter-spacing: 0.025em;
text-transform: uppercase;
margin-bottom: 20px;
}
.badge-dot {
width: 6px;
height: 6px;
background-color: var(--success);
border-radius: 50%;
}
h1 {
font-size: 1.5rem;
font-weight: 700;
color: #ffffff;
margin-bottom: 12px;
letter-spacing: -0.02em;
}
.subtitle {
font-size: 0.95rem;
color: var(--accent);
margin-bottom: 24px;
font-weight: 500;
}
p {
font-size: 0.9375rem;
line-height: 1.65;
color: var(--text-muted);
margin-bottom: 16px;
}
.notice-box {
background-color: rgba(15, 23, 42, 0.6);
border-left: 3px solid var(--accent);
padding: 16px;
border-radius: 6px;
margin: 24px 0;
}
.notice-box p {
margin-bottom: 0;
font-size: 0.875rem;
color: #cbd5e1;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 28px;
padding-top: 24px;
border-top: 1px solid var(--border);
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 10px 20px;
border-radius: 8px;
font-size: 0.875rem;
font-weight: 600;
text-decoration: none;
transition: all 0.15s ease;
}
.btn-primary {
background-color: var(--accent);
color: #0b1120;
}
.btn-primary:hover {
background-color: #7dd3fc;
}
.btn-secondary {
background-color: rgba(255, 255, 255, 0.05);
color: var(--text-main);
border: 1px solid var(--border);
}
.btn-secondary:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.footer {
margin-top: 28px;
text-align: center;
font-size: 0.75rem;
color: #64748b;
}
</style>
</head>
<body>
<div class="container">
<div class="badge">
<span class="badge-dot"></span>
System Notice
</div>
<h1>Client Portal Relocation</h1>
<div class="subtitle">Infrastructure & Client Service Upgrade</div>
<p>The legacy third-party CRM portal previously mapped to this endpoint has been permanently retired and decommissioned.</p>
<div class="notice-box">
<p><strong>Security Notice:</strong> All client documentation, proposals, project milestones, and invoices are now delivered directly via private, authenticated channels under <code>doc.hoelee.com</code>.</p>
</div>
<p>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.</p>
<div class="actions">
<a href="https://www.hoelee.com/" class="btn btn-primary">Visit Official Site</a>
<a href="https://wa.me/60127972969" class="btn btn-secondary">Contact via WhatsApp</a>
</div>
<div class="footer">
&copy; Hoelee Enterprise. All rights reserved.
</div>
</div>
</body>
</html>