With a cheap Virtual Machine and a little Docker fairy dust you too can self-host and run your own SOCKS5 proxy server. I use it for occasional web page scraping and getting around numerous restrictions based on my location.
- I run a small cheap virtual machine in the US with Digital Ocean.
- Docker installed on said machine
- Docker image (serjs/socks5-server) specifically for SOCKS5
- Zerotier as my VPN to the machine
Docker is fantastic whenever possible, simply because it saves the hassle of dependency management.
Setting up the SOCKS5 service
docker-compose because it gives me repeatable, self-documented, and validated configurations.
There is a simple Docker image from this repo:
version: '3' services: socks5: image: serjs/go-socks5-proxy container_name: socks5 restart: always ports: - 1080:1080
docker-compose up -d and it is up and running. Since I use ZeroTier as my VPN, there is no need to open the ports on the firewall to the outside world.
Setting up your browser to use the proxy
Yeah, so that is a separate post because it is a little too complicated when going "soup to nuts."
This post is a little too short to really have final thgouths. So that's it. Spin up a docker image with the right ports exposed, connect your browser/clients to the proxy end-points, and Bob's your uncle.