Skip to content

Instantly share code, notes, and snippets.

@quanhua92
Last active April 23, 2026 01:45
Show Gist options
  • Select an option

  • Save quanhua92/40363d20219a8061b21dffe89070941c to your computer and use it in GitHub Desktop.

Select an option

Save quanhua92/40363d20219a8061b21dffe89070941c to your computer and use it in GitHub Desktop.
docker compose socks5 proxy
version: '3'
services:
socks5:
image: serjs/go-socks5-proxy
container_name: socks5
restart: always
# Host mode bypasses the Docker bridge, solving the IPv6 'network unreachable' bug
network_mode: "host"
env_file: .env
environment:
# In host mode, we set the internal listen port to your desired port
- PROXY_PORT=9876
- PROXY_USER=hello
- PROXY_PASSWORD=world
# Note: 'dns', 'ports', and 'sysctls' are typically ignored or not
# required when using network_mode: host.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment