Sign inSign up

seriousbug/tor

By seriousbug

•Updated about 2 years ago

An alpine container with tor installed. Mount your own config.

Image
0

447

seriousbug/tor repository overview

An alpine container with Tor installed. Mount your own config directory with torrc and anything else you need.

⁠Socks Proxy

If you want to run a Tor Socks proxy, create a folder named tor, and create a file named torrc inside of that. Put inside this file:

Log notice stdout
SocksPort 0.0.0.0:9050

Then, run the container with:

docker run -p 9050:9050 --rm -it -v $(pwd)/tor:/etc/tor:ro seriousbug/tor:latest

Check if the proxy works with:

curl --socks5 localhost:9050 --socks5-hostname localhost:9050 https://check.torproject.org/api/ip

⁠Hidden Service

Create a folder named tor. Inside this folder, add a file named torrc with the following contents:

Log notice stdout
HiddenServiceDir /etc/tor/service
HiddenServicePort 80 target-container:80

Make sure to update the HiddenServicePort line to point the hidden service towards the correct container and port.

Inside the same folder, add your hidden service information and keys as a subfolder named service. Make root the owner of the service subfolder, and set permissions to 700, otherwise Tor will refuse to use the folder.

Then, run the container with:

docker run -p 9050:9050 --rm -it -v $(pwd)/tor:/etc/tor seriousbug/tor:latest

⁠Notes

This container is automatically rebuilt every week to keep it up to date. It uses the latest Alpine container as a base, and pulls in the latest version of Tor that Alpine packages.

This container was inspired by Thomas Leplus' container⁠. The only difference is that this container makes it easy to mount your own configuration file, while Thomas' container comes with a config file already set up for a socks proxy.

Tag summary

Content type

Image

Digest

sha256:386c4f0d6…

Size

9.5 MB

Last updated

about 2 years ago

docker pull seriousbug/tor