feat: implement geo-filtering with whitelist and blacklist support

- Added support for geo-filtering in the proxy pool, allowing configuration of allowed and blocked countries via environment variables.
- Updated `.env.example` and `docker-compose.yml` to include `ALLOWED_COUNTRIES` for whitelist functionality.
- Enhanced `CLAUDE.md`, `GEO_FILTER.md`, and `README.md` to document the new geo-filtering features and usage instructions.
- Modified proxy validation logic to prioritize whitelist over blacklist during admission checks.
- Improved WebUI to allow dynamic configuration of geo-filter settings.
This commit is contained in:
isboyjc
2026-04-01 21:45:09 +08:00
parent dfe71d0390
commit a06be637e7
14 changed files with 307 additions and 65 deletions

View File

@@ -14,6 +14,11 @@ SOCKS5_STABLE_PORT=7780 # SOCKS5 最低延迟代理端口
# 默认屏蔽中国大陆CN香港HK、澳门MO、台湾TW不受影响
BLOCKED_COUNTRIES=CN
# 允许的国家代码白名单(逗号分隔,如 US,JP,KR,SG
# 非空时优先于黑名单BLOCKED_COUNTRIES 被忽略)
# 留空 = 使用黑名单模式
ALLOWED_COUNTRIES=
# 代理服务认证配置
# ⚠️ 代理端口默认对外开放,强烈建议启用认证!
# 使用方式curl -x http://username:password@host:port https://example.com