Skip to content

Instantly share code, notes, and snippets.

@ijokarumawak
Created May 17, 2018 02:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ijokarumawak/b3a31378bdc0a6c6b9922a138e9ec9c1 to your computer and use it in GitHub Desktop.
Save ijokarumawak/b3a31378bdc0a6c6b9922a138e9ec9c1 to your computer and use it in GitHub Desktop.
Docker example to run Dante SOCKS proxy server.

How to use Dante SOCKS proxy server

Create sockd.conf file locally on the docker host machine and map it with -v option of docker run.

Run socks server

docker run -d -p 1080:1080 -v /etc/sockd.conf:/etc/sockd.conf --name socks-server vimagick/dante

Add user

docker exec -it socks-server /bin/bash
useradd proxy_user
echo proxy_user:proxy_password | chpasswd

Use the Socks proxy server from a cURL command

curl -vvv -x socks5h://proxy_user:proxy_password@localhost:1080 https://example.com
debug: 0
logoutput: stderr
internal: 0.0.0.0 port = 1080
external: eth0
socksmethod: username none
clientmethod: none
user.privileged: root
user.unprivileged: nobody
client pass {
from: 0.0.0.0/0 port 1-65535 to: 0.0.0.0/0
log: error
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
socksmethod: username
log: error
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment