Go to file
2021-07-24 21:22:03 +10:00
.github Update release Github actions 2021-07-07 19:20:17 +03:00
vendor Update golang to 1.16.5, migrate to go modules 2021-07-07 18:47:42 +03:00
.env add docker-compose and .env files 2018-12-16 12:19:24 +01:00
Changelog.md Minor changes 2021-07-07 18:49:25 +03:00
docker-compose.yml add docker-compose and .env files 2018-12-16 12:19:24 +01:00
Dockerfile Update golang to 1.16.5, migrate to go modules 2021-07-07 18:47:42 +03:00
go.mod Update golang to 1.16.5, migrate to go modules 2021-07-07 18:47:42 +03:00
go.sum Update golang to 1.16.5, migrate to go modules 2021-07-07 18:47:42 +03:00
README.md Added Regex destination matching 2021-07-24 21:22:03 +10:00
ruleset.go Added Regex destination matching 2021-07-24 21:22:03 +10:00
server.go Added Regex destination matching 2021-07-24 21:22:03 +10:00

go-socks5-proxy

Latest tag from master branch Release tag

Simple socks5 server using go-socks5 with authentication options

Start container with proxy

docker run -d --name socks5 -p 1080:1080 \
    -e PROXY_USER=<PROXY_USER> \
    -e PROXY_PASSWORD=<PROXY_PASSWORD> \
    -e ALLOWED_DEST_FQDN=<REGEX_PATTERN> \
    serjs/go-socks5-proxy

Leave PROXY_USER and PROXY_PASSWORD empty for skip authentication options while running socks5 server.

List of all supported config parameters

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_PORT String 1080 Set listen port for application inside docker container
ALLOWED_DEST_FQDN String EMPTY Allowed destination address regular expression pattern. Default allows all.
TZ String UTC Set Timezone like in many common Operation Systems

Test running service

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

Authors

  • Sergey Bogayrets

See also the list of contributors who participated in this project.