Files
MeshSate/deploy/nginx/default.conf
zhaolei 16f134e328 feat: MeshSafe 文件摆渡安全卫士 v1.0 初始提交
核心功能:
- 6 层检测管线: L0 结构分析 → L1 ClamAV → L2 文档深度检测 → L3 关键词匹配 → L4 YARA → L5 PE/二进制
- FastAPI + PostgreSQL + Redis + Docker Compose 架构
- 客户端 HMAC-SHA256 签名鉴权 + 限流 + 幂等性
- 控制台 UI (登录/Dashboard/诊断中心/策略管理/任务列表/测试中心/产品介绍页)
- 三层诊断定时器 (error_scan 30s / db_aggregate 30s / container_check 5min)

并发与稳定性修复:
- 诊断定时器 Redis 时间槽位锁 (多 worker 同一槽位只有一个执行)
- JSONL 存储 fcntl 跨进程排他锁 + 容错解码 + 原子重写
- 移除 SQLite fallback, 统一 PostgreSQL
- API_CLIENTS 脱敏为环境变量, .env 已 .gitignore
2026-10-28 19:07:11 +08:00

63 lines
2.1 KiB
Plaintext
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.
# =============================================================================
# MeshSafe Nginx 反向代理(内网 HTTP 明文)
# =============================================================================
#
# 外部端口:44380(compose 映射 44380:80)
# 上游:api:8443(docker 网络内服务名)
# 无 TLS —— 光闸内网场景,外层防护靠光闸本身
#
# 访问路径:
# http://<内网服务器IP>:44380/console/login → 控制台
# http://<内网服务器IP>:44380/api/v1/scans → 扫描 API
# http://<内网服务器IP>:44380/api/v1/health → 健康检查
# =============================================================================
server {
listen 80;
server_name _;
# ---- 根路径 → 自动跳转到控制台登录页(保留原始 host + port)----
location = / {
return 302 $scheme://$http_host/console/login;
}
# 光闸可能传大文件(ISO 镜像 / 大压缩包)
client_max_body_size 500M;
client_body_timeout 600s;
client_header_timeout 60s;
send_timeout 600s;
# ---- 控制台 ----
location /console/ {
proxy_pass http://api:8443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
}
# ---- 扫描 API ----
location /api/ {
proxy_pass http://api:8443;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_request_buffering off; # 大文件流式转发,不在 Nginx 缓冲
}
# ---- 健康检查(关 access_log 减少日志噪音)----
location = /health {
proxy_pass http://api:8443/api/v1/health;
access_log off;
}
# ---- 静态资源(logo、CSS 等)----
location /static/ {
proxy_pass http://api:8443/static/;
expires 7d;
access_log off;
}
}