2018.05.02

Create a secure $5 socks proxy server in 5 minutes

A link to the repository for an easy dante server installation and deployment: https://github.com/zinovyev/dante-docker

No special knowledge needed. All you have to do is to pick a cheapest VPS (wich stands for Virtual Private Server hosting you like. If you don't know what to choose try a DigitalOcean Cloud Hosting wich will cost you only $5.

The next step is to install a docker on it. Use this guide here to Install Docker On Your CentOS VPS or choose a differrent platform in the menu.

Here's a simple 6-steps instruction to set up you own dante proxy socks server:

  1. Configure
  2. Build
  3. Run
  4. Test locally
  5. Deploy to a VPS
  6. Create a short-link for Telegram

Configuration

First of all download the repository with dante docker configuration to your PC and navigate to the folder with the repository:


  git clone git@github.com:zinovyev/dante-docker.git
  cd dante-docker

If you don't have a git installed just use the zip archive download link: https://github.com/zinovyev/dante-docker/archive/master.zip

Now some additional configurations may be needed if you want to keep your proxy safe from foreign invation!

You can change the username, password and port options of this image by editing the part of this Dockerfile where the environment variables are set:

  • ENV DANTE_USERNAME username

  • ENV DANTE_PASSWORD password

  • ENV DANTE_PORT 1080

Build

Now it's time to build the image by running:


  docker build -t dante:test .

Run

Try to run the proxy server locally:


  docker run --name dante -d dante:test

On your remote server use the remote IP and the port specified in the Dockerfile:


  docker run -p <your-remote-ip>:<port>:<port> --name dante -d dante:test

Test locally

Find the local IP address of the container with help of docker inspect command:


  docker inspect dante | grep IPAddress

In the example below the IP is 172.17.0.2 (remember to replace username, password and 1080 with your own values):


  curl -v -x socks5://username:password@172.17.0.2:1080 https://www.zinovyev.net

Deploy to the VPS


  docker save -o dante-test dante:test                # Save your image to a file
  scp dante-test root@your-remote-vps:/root           # Deploy the image to the remote host
  ssh root@your-remote-vps                            # Login to the remote host
  docker -i dante-test                                # Load the dante-test image on your remote
  docker run -d -p <your-remote-vps-ip>:<port>:<port> --name dante dante-test  # Run proxy

Create a short-link for Telegram

The link should look like:


tg://socks?server=<your-vps-ip>&port=<port>&user=<username>&pass=<password>

Replace <your-vps-ip>, <port>, <username> and <password> with your own values.