Simple socks5 server using go-socks5 with authentication options
docker run -d \
--security-opt no-new-privileges \
--name socks5 \
--restart unless-stopped \
-p 1080:1080 \
-e PROXY_USER=<PROXY_USER> \
-e PROXY_PASSWORD=<PROXY_PASSWORD> \
yarmak/socks5-proxy
Leave PROXY_USER
and PROXY_PASSWORD
empty for skip authentication options while running socks5 server.
ENV variable | Type | Default | Description |
---|---|---|---|
PROXY_USER | String | EMPTY | Set proxy user (also required existed PROXY_PASS) |
PROXY_PASSWORD | String | EMPTY | Set proxy password for auth, used with PROXY_USER |
PROXY_ADDRESS | String | EMPTY | Set listen address for application |
PROXY_PORT | String | 1080 | Set listen port for application |
PROXY_TLS_CERT | String | EMPTY | If set, enable TLS and use certificate from specified file |
PROXY_TLS_KEY | String | EMPTY | Key file for certificate specified in PROXY_TLS_CERT |
PROXY_TLS_CACERT | String | EMPTY | If set, enable mutual TLS authentication and verify client certificates against CAs specified in CACERT |
Without authentication
curl --socks5 <docker host ip>:1080 http://ifcfg.co
- result must show docker host ip (for bridged network)
or
docker run --rm curlimages/curl:7.65.3 -s --socks5 <docker host ip>:1080 http://ifcfg.co
With authentication - result must show docker host ip (for bridged network)
curl --socks5 <docker host ip>:1080 -U <PROXY_USER>:<PROXY_PASSWORD> http://ifcfg.co
or
docker run --rm curlimages/curl:7.65.3 -s --socks5 <PROXY_USER>:<PROXY_PASSWORD>@<docker host ip>:1080 http://ifcfg.co
- Sergey Bogayrets
See also the list of contributors who participated in this project.