Sign inSign up

edgd1er/go-socks5-proxy

By edgd1er

•Updated 2 days ago

forked from serjs/socks5-server: https://github.com/serjs/socks5-server/

Image
0

100K+

edgd1er/go-socks5-proxy repository overview

⁠go-socks5-proxy

Latest tag from master branch

Docker Size Docker Pulls Docker Stars ImageLayers

Forked from serjs/socks5-server⁠

Minor changes:

  • check for gh actions deps changes
  • scan for vuln

Simple socks5 server using go-socks5 with authentication, allowed ips list and destination FQDNs filtering

⁠Examples

  • Run docker container using default container port 1080 and expose it to world using host port 1080, with auth creds

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

  • Run docker container using specific container port and expose it to host port 1090

    docker run -d --name socks5 -p 1090:9090 -e PROXY_USER=<PROXY_USER> -e PROXY_PASSWORD=<PROXY_PASSWORD> -e PROXY_PORT=9090 serjs/go-socks5-proxy

    docker run -d --name socks5 -p 1090:9090 -e PROXY_PORT=9090 serjs/go-socks5-proxy

  • Run docker container using default container port 1080 and expose it to world using host port 1080, with PROXY_CREDENTIALS multi-user authentication

    docker run -d --name socks5 -p 1080:1080 -e PROXY_CREDENTIALS='[{"username":"TEST_USERNAME","password":"password123"}]' serjs/go-socks5-proxy

⁠List of supported config parameters

ENV variableTypeDefaultDescription
REQUIRE_AUTHStringtrueAllow accepting socks5 connections without auth creds. Not recommended untill you use other protections mechanisms like Whitelists Subnets using Firewall or Proxy itself
PROXY_USERStringEMPTYSet proxy user (also required existed PROXY_PASS)
PROXY_PASSWORDStringEMPTYSet proxy password for auth, used with PROXY_USER
PROXY_PORTString1080Set listen port for application inside docker container
ALLOWED_DEST_FQDNStringEMPTYAllowed destination address regular expression pattern. Default allows all.
ALLOWED_IPSStringEmptySet allowed IP's that can connect to proxy, separator ,

⁠Build your own image:

docker-compose -f docker-compose.build.yml up -d
Just don't forget to set parameters in the .env file (cp .env.example .env) and edit it with your config parameters

⁠Test running service

Assuming that you are using container on 1080 host docker port

⁠Without authentication

curl --socks5 <docker host ip>:1080 https://ipinfo.io - result must show docker host ip (for bridged network)

or

docker run --rm curlimages/curl:7.65.3 -s --socks5 <docker host ip>:1080 https://ipinfo.io

⁠With authentication

curl --socks5 <docker host ip>:1080 -U <PROXY_USER>:<PROXY_PASSWORD> https://ipinfo.io

or

docker run --rm curlimages/curl:7.65.3 -s --socks5 <PROXY_USER>:<PROXY_PASSWORD>@<docker host ip>:1080 https://ipinfo.io

⁠Authors

  • Sergey Bogayrets

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

Tag summary

Content type

Image

Digest

sha256:bba652fff…

Size

2 MB

Last updated

2 days ago

docker pull edgd1er/go-socks5-proxy