diff --git a/socks5/.env.sample b/socks5/.env.sample new file mode 100644 index 0000000..620a608 --- /dev/null +++ b/socks5/.env.sample @@ -0,0 +1,19 @@ +# Copy this file to .env and adjust the values: +# cp .env.sample .env + +PROXY_PORT=1080 + +# Client credentials (leave empty to run without authentication) +PROXY_USER=socks5user +PROXY_PASSWORD=change-me-strong-password + +# true = require authentication, false = allow anonymous connections +REQUIRE_AUTH=true + +# Optional: comma-separated client IPs allowed to connect (empty = allow all) +ALLOWED_IPS= + +# Optional: regex of destination FQDNs allowed through the proxy (empty = allow all) +ALLOWED_DEST_FQDN= + +TZ=Asia/Shanghai diff --git a/socks5/docker-compose.yml b/socks5/docker-compose.yml new file mode 100644 index 0000000..e1d955a --- /dev/null +++ b/socks5/docker-compose.yml @@ -0,0 +1,11 @@ +services: + socks5: + image: serjs/go-socks5-proxy:latest + container_name: socks5 + restart: unless-stopped + ports: + - "${PROXY_PORT}:${PROXY_PORT}" + env_file: + - .env + environment: + TZ: ${TZ:-Asia/Shanghai}