mirror of
https://github.com/isboyjc/GoProxy.git
synced 2026-05-06 20:02:54 +08:00
- 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.
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
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:
|