Running a Tiny SOCKS5 Proxy (in a container)

This is a super quick snippet on how to run a SOCKS 5 proxy in a container.

The container image is heywoodlh/microsocks on Docker Hub. Dockerfile is here: https://github.com/heywoodlh/dockerfiles/blob/master/microsocks/Dockerfile

Here’s how to run an unauthenticated SOCKS proxy on port 1080 with Docker:

docker run -d --restart=unless-stopped --name=microsocks -p 1080:1080 heywoodlh/microsocks

More options are available and can be seen with MicroSocks’ help page:

docker run -it --rm heywoodlh/microsocks --help

Another example using a username and password to restrict access:

docker run -d --restart=unless-stopped --name=microsocks -p 1080:1080 heywoodlh/microsocks -u user -P password

Further Reading:

MicroSocks’ Repo

MicroSocks’ Repo README

Written on July 5, 2022