Commit Graph
2 Commits
Author SHA1 Message Date
qing 0954644ee3 redirect80: 移除confs依赖,配置全部经CLI传递(CLI > ENV > 默认值)
- redirect80.py: 移除 configparser/pymsg.RpcClient 导入和 confs 拉取逻辑,
  配置改为三层加载(默认值 → 环境变量 → CLI 参数)
- core/services.yaml: redirect80 条目展开为完整 CLI 声明
  (--host/--port/--redirect-port/--redirect-code)
- redirect80/README.md: 配置表新增 CLI 参数列,init.txt 章节重写为
  services.yaml 示例
- README.md: 配置链路移除 redirect80,confs 配置表删除 redirect80.ini 行

与 ca v1.1.0 保持一致的配置模式,redirect80 不再依赖 confs 服务。
2026-08-10 06:40:46 +00:00
qing f9c02cd6ad feat(redirect80): new HTTP→HTTPS redirect service on port 80
Pure Python stdlib http.server + ThreadingMixIn, zero web framework deps.
- GET/HEAD → 301, POST/PUT/DELETE/PATCH → 308
- Reads Host header, strips port, redirects to https://{host}{path}
- Config via confs (retry_on_refused, hard dependency) + env var override
- Logs via log_client → db Logs table (fail-safe async batch)
- Port 80 privilege via setcap cap_net_bind_service in _run.sh
2026-08-02 12:50:23 +08:00