2026-05-10 13:12:44 +08:00

130 lines
7.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"id": "ZY-PROJ-002",
"name": "语言保护罩 · ZY-SVR-006 智库节点部署",
"guardian": "铸渊 · ICE-GL-ZY001",
"copyright": "国作登字-2026-A-00037559",
"background": {
"bingshuo_requirement": "ZY-SVR-006是智能小说系统的宿主·在部署小说系统之前先要有防护层·不然一上线就被扫烂了",
"zhuyuan_understanding": "三层IP隐身架构·L1出站代理池·L2蜜罐·L3 fail2ban自动封禁·nginx防护配置·冰朔称其为语言保护罩"
},
"architecture": {
"layers": [
"L1 出站代理池: 爬取下载时用代理·不暴露本机IP",
"L2 蜜罐入口: 扫描者看到自己的镜像·心理威慑+信息收集",
"L3 fail2ban自动封禁: 路径扫描/高频请求/SSH暴力破解→TARPIT耗尽资源"
],
"nginx_config": "server/nginx/novel-mirror-shield.conf",
"fail2ban_jails": [
"novel-nginx-limit-req: 5分钟10次429→ban 6小时",
"novel-path-scan: 5分钟3次路径扫描→ban 24小时",
"novel-sshd: 10分钟3次SSH失败→ban 12小时",
"novel-nginx-404: 10分钟5次40x→ban 1小时"
],
"why": "ZY-SVR-006是新加坡节点·公网暴露·没有防护层直接部署小说系统必然遭暴力扫描"
},
"phases": [
{
"id": "ZY-PROJ-002-PHASE-1",
"name": "防护配置文件准备",
"status": "completed",
"completed_at": "2026-04-16",
"content": [
"novel-mirror-shield.conf: Nginx防护配置蜜罐+速率限制)",
"fail2ban-novel.conf: 4个jail配置nginx+ssh",
"fail2ban-filter-novel-scan.conf: 路径扫描正则过滤规则",
"fail2ban-action-ban-log.conf: 封禁日志动作",
"deploy-novel-mirror-shield.yml: 4动作部署workflow"
],
"verified": "配置文件语法正确·workflow可触发"
},
{
"id": "ZY-PROJ-002-PHASE-2",
"name": "服务器实际部署 + SSL证书 + Phase 2 三大引擎",
"status": "code_complete",
"blocked_reason": null,
"started_at": "2026-04-16",
"content": [
"服务器基础环境: nginx + fail2ban + certbot",
"nginx防护配置上线SSL鸡蛋问题已修复创建占位文件引导→certonly --webroot申请真实证书",
"fail2ban jail启动4个jail: nginx-limit-req/path-scan/sshd/4xx",
"SSL证书申请Let's Encrypt · webroot方式",
"Phase 2 三大引擎后端 API 已完成:",
" - 下载引擎: /api/zhiku/download/* (5端点·任务创建/列表/状态/书籍/统计)",
" - 智能分章: /api/zhiku/chapter/* (5端点·分章/列表/详情/章节内容/统计)",
" - 在线阅读器: /api/zhiku/reader/* (9端点·书架/进度/偏好/统计)",
" - 综合统计: /api/zhiku/stats",
"前端 zhiku.html 已联动全部 API (搜索/下载/自动分章/在线阅读/进度存储)",
"",
"Phase 3 团队书库 + 成员Agent 后端 API 已完成:",
" - 团队书库: /api/zhiku/library/* (7端点·列表/添加/详情/评分/评论/分类/统计)",
" - 成员Agent: /api/zhiku/agent/* (10端点·注册/详情/对话/记忆/笔记/统计)",
"前端 zhiku.html Phase 3 已联动 (团队书库分区筛选+Agent对话面板)"
],
"next_step": "合并PR后触发 deploy-novel-mirror-shield.yml 的 deploy 动作"
},
{
"id": "ZY-PROJ-002-PHASE-3",
"name": "验证防护效果 + 健康监控",
"status": "pending",
"content": [
"触发health动作验证三层防护正常运行",
"测试fail2ban封禁是否生效",
"确认/var/log/novel-shield-bans.log有写入",
"确认HTTPS正常"
]
}
],
"fixes": [
{
"id": "ZY-PROJ-002-FIX-1",
"date": "2026-04-16",
"problem": "certbot --nginx·/etc/letsencrypt/options-ssl-nginx.conf",
"root_cause": "novel-mirror-shield.confssl serverletsencryptnginx·certbot·certbotnginx·",
"fix": "1)·letsencrypt·(options-ssl-nginx.conf + ssl-dhparams.pem + )nginx -tnginx 2)certbotcertonly --webroot·nginx·nginx -t 3)certbot·nginx reload 4)setup-sslcertonly --webroot",
"files_changed": [".github/workflows/deploy-novel-mirror-shield.yml"],
"result": "implemented"
},
{
"id": "ZY-PROJ-002-FIX-2",
"date": "2026-04-16",
"problem": "fail2ban novel-nginx-404 jail使filter·nginx-http-auth401·400/403/404",
"root_cause": "Sonnetfilternginx-http-auth·filterfailregexHTTP Basic Auth(401)·40x",
"fix": "fail2ban-filter-novel-4xx.conf·400/403/404/405·faviconrobots·jailnovel-nginx-4xx·workflowfilterscp",
"files_changed": [
"server/novel-db/security/fail2ban-filter-novel-4xx.conf",
"server/novel-db/security/fail2ban-novel.conf",
".github/workflows/deploy-novel-mirror-shield.yml"
],
"result": "implemented"
},
{
"id": "ZY-PROJ-002-FIX-3",
"date": "2026-04-16",
"problem": "nginxACME challenge·root(/var/www/html vs /var/www/certbot)",
"root_cause": "server(default_server)novel.guanghuyaoming.com server/.well-known/acme-challenge/·root·certbot",
"fix": "ACME location·novel.guanghuyaoming.com(root /var/www/certbot)·certbot",
"files_changed": ["server/nginx/novel-mirror-shield.conf"],
"result": "implemented"
},
{
"id": "ZY-PROJ-002-FIX-4",
"date": "2026-04-16",
"problem": "setup-ssl job certbot nginx -t ·/etc/letsencrypt/options-ssl-nginx.conf ",
"root_cause": "setup-ssl job python3-certbot-nginx certbot nginx · nginx -t· SSL deploy job ·setup-ssl deploy job (push paths ·workflow_dispatch setup-ssl)",
"fix": "1) setup-ssl job deploy job SSL 2) certbot python3-certbot-nginx nginx 3) --preferred-challenges http HTTP-01 4) deploy job certbot --preferred-challenges http 5) setup-ssl cron",
"files_changed": [".github/workflows/deploy-novel-mirror-shield.yml"],
"result": "implemented"
}
],
"server/nginx/novel-mirror-shield.conf",
"server/novel-db/security/fail2ban-novel.conf",
"server/novel-db/security/fail2ban-filter-novel-scan.conf",
"server/novel-db/security/fail2ban-filter-novel-4xx.conf",
"server/novel-db/security/fail2ban-action-ban-log.conf",
".github/workflows/deploy-novel-mirror-shield.yml"
],
"next_step": "PRGitHub Actions deploy-novel-mirror-shield.yml(action=deploy)setup-sslhealthPRdeploy(paths)workflow_dispatch",
"status": "in_progress",
"current_phase": "ZY-PROJ-002-PHASE-2"
}