Skip to content

Instantly share code, notes, and snippets.

@mrdotb
Created March 5, 2018 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrdotb/bf998d666f2c9d5ec84ce3fd7bbcc075 to your computer and use it in GitHub Desktop.
Save mrdotb/bf998d666f2c9d5ec84ce3fd7bbcc075 to your computer and use it in GitHub Desktop.
Create a sock5 proxy ubuntu
# Tested only on ubuntu 16.04
# The package in ppa is bugged
wget http://ppa.launchpad.net/dajhorn/dante/ubuntu/pool/main/d/dante/dante-server_1.4.1-1_amd64.deb
sudo apt-get install gdebi-core
sudo gdebi dante-server_1.4.1-1_amd64.deb
sudo adduser PROXYUSER
sudo passwd PROXYUSER
# type PROXYPASSWORD
sudo vi /etc/danted.conf
# should be like this
# /etc/danted.conf
logoutput: syslog
user.privileged: root
user.unprivileged: nobody
# The listening network interface or address.
internal: 0.0.0.0 port=1080
# The proxying network interface or address.
# use ifconfig to put the correct interface
external: ens4
# socks-rules determine what is proxied through the external interface.
# The default of "none" permits anonymous access.
socksmethod: username
# client-rules determine who can connect to the internal interface.
# The default of "none" permits anonymous access.
clientmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect error
}
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect error
}
#end of file
sudo systemctl restart danted
# check for errors
sudo systemctl status danted
# try it on local computer
curl -L -x socks5://PROXYPASSWORD:PASSWORD@SERVERIP:1080 ipinfo.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment