feat: 添加可选的代理功能支持

新增功能:
- 集成 Cloudflare WARP socks5 代理服务
- 通过环境变量 USE_PROXY 控制代理开关
- 支持自定义 HTTP/HTTPS/SOCKS5 代理服务器
- 使用 docker compose profile 管理 proxy 服务

配置方式:
- USE_PROXY=true 启用代理
- ALL_PROXY/HTTP_PROXY/HTTPS_PROXY 自定义代理
- docker compose --profile proxy up 启动 warp 服务

文件变更:
- docker-compose.yaml: 添加 warp-proxy 服务
- playwright-auth.ts: 添加代理配置逻辑
- example.env: 添加代理环境变量
- PROXY.md: 使用文档
This commit is contained in:
JamesFlare1212
2026-04-06 16:37:54 -04:00
parent 4e04063469
commit 4a97057825
4 changed files with 209 additions and 5 deletions

View File

@@ -17,3 +17,15 @@ CONCURRENT_API_CALLS=16
STAFF_UPDATE_INTERVAL_MINS=360
CLUB_UPDATE_INTERVAL_MINS=360
LOG_LEVEL=info # Example: 'debug', 'info', 'warn', 'error'
# Proxy Configuration (Optional)
# Set USE_PROXY=true to enable proxy for Playwright requests
USE_PROXY=false
# Custom proxy server (default: socks5://warp-proxy:9091 when using warp-proxy service)
# Examples:
# HTTP: http://proxy.example.com:8080
# SOCKS5: socks5://proxy.example.com:1080
# Warp: socks5://warp-proxy:9091
ALL_PROXY=
HTTP_PROXY=
HTTPS_PROXY=