Files
GoProxy/docker-compose.yml
isboyjc b1555a702f feat: add SOCKS5 proxy support and enhance configuration
- Introduced SOCKS5 proxy functionality with separate ports for random rotation and lowest latency.
- Updated `.env.example` and `docker-compose.yml` to include SOCKS5 port configurations.
- Enhanced `main.go` to initialize and start SOCKS5 servers alongside existing HTTP proxies.
- Revised README to document new SOCKS5 features, including usage examples and testing scripts.
- Improved proxy selection logic in the storage layer to support SOCKS5 protocol.
2026-03-30 01:02:00 +08:00

36 lines
1.2 KiB
YAML
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.
services:
goproxy:
# 使用预构建镜像(每次部署自动拉取最新版本)
image: ghcr.io/isboyjc/goproxy:latest
pull_policy: always
# 或使用本地构建(取消下面注释,注释上面的 image 和 pull_policy 行)
# build: .
container_name: ${CONTAINER_NAME:-goproxy}
restart: unless-stopped
ports:
- "${STABLE_PORT:-7776}:7776" # HTTP 最低延迟
- "${RANDOM_PORT:-7777}:7777" # HTTP 随机轮换
- "${WEBUI_PORT:-7778}:7778" # WebUI有登录认证
- "${SOCKS5_RANDOM_PORT:-7779}:7779" # SOCKS5 随机轮换
- "${SOCKS5_STABLE_PORT:-7780}:7780" # SOCKS5 最低延迟
volumes:
- goproxy-data:/app/data
environment:
- TZ=${TZ:-Asia/Shanghai}
- DATA_DIR=/app/data
- WEBUI_PASSWORD=${WEBUI_PASSWORD:-goproxy}
- PROXY_AUTH_ENABLED=${PROXY_AUTH_ENABLED:-false}
- PROXY_AUTH_USERNAME=${PROXY_AUTH_USERNAME:-proxy}
- PROXY_AUTH_PASSWORD=${PROXY_AUTH_PASSWORD}
- BLOCKED_COUNTRIES=${BLOCKED_COUNTRIES:-CN}
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:7778/"]
interval: 30s
timeout: 5s
retries: 3
volumes:
goproxy-data: