Tor (The Onion Router) â is free and open-source software for enabling online anonymity. Traffic passes through a distributed network of nodes, which hides the user's location and protects them from traffic analysis.
This image will allow you to:
Implementation features:
ENTRYPOINT & torrc.obfs4proxy.healtcheck to monitor service status.Information for everyone:
Example commands to start the service via Docker Runâ :
# Root
$ docker run -d --name tor-proxy -p 9050:9050 -e TORRC_USER=tor crasivo/tor-proxy
# Rootless
$ docker run -d --name tor-proxy -p 9050:9050 --user tor crasivo/tor-proxy
Example configuration file Docker Composeâ :
services:
proxy:
image: crasivo/tor-proxy:latest
restart: unless-stopped
container_name: tor-proxy
user: tor
environment:
- "TORRC_SOCKS_PORT=9050"
- "TORRC_DNS_PORT=9053"
hostname: tor-proxy
networks:
- tor
ports:
- "9050:9050" # Socks5
- "9053:9053" # DNS
volumes:
- tor_config:/etc/tor/conf.d:cached
volumes:
tor_config:
networks:
tor:
driver: bridge
internal: false
name: tor
The image supports dynamic modification of the /etc/tor/torrc file before starting the Tor service itself.
Summary table of available environment variables:
| Env variable | Torrc variable | Default | Additional description |
|---|---|---|---|
TORRC_SOCKS_PORT | SocksPort | 0.0.0.0:9050 | Socks5 port for network access |
TORRC_CONTROL_PORT | ControlPort | â | Tor service management port |
TORRC_DNS_PORT | DNSPort | 0.0.0.0:9053 | DNS port |
TORRC_ENTRY_NODES | EntryNodes | EU countries | Entry nodes (countries/nodes) |
TORRC_EXCLUDE_NODES | ExcludeNodes | â | Excluded chains (see below) |
TORRC_EXIT_NODES | ExitNodes | EU countries | Exit nodes (countries/nodes) |
TORRC_STRICT_NODES | StrictNodes | 0 | Strict definition of routing rules |
TORRC_MAX_CIRCUIT_DIRTINESS | MaxCircuitDirtiness | 600 | Chain change interval (in seconds) |
[!INFO] A complete list of supported variables can be found in the tor-bootstrap.shâ file.
If you need to create a "specific" configuration (for example, configure a list of bridges), you can mount your *.conf
files into a separate directory /etc/tor/conf.d/. All files from this folder will be automatically connected when Tor starts.
Note
It is not recommended to touch (modify/mount) the main file `/etc/tor/torrc` in any way.
In some countries, internet providers block Tor traffic. For the service to work correctly, you need to configure an entry point
to the network through the UseBridges & Bridges directives. A list of entry nodes can be viewed on the official
website Torâ .
Example configuration of the /etc/tor/conf.d/torrc.custom file:
UseEntryGuards 1
UseBridges 1
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy
Bridge obfs4 192.95.36.106:443 CDF2E31C532003348C36083BC13F00780E24D04C cert=97yMeXW6S0+yHlI+D5M8qA iat-mode=0
Bridge obfs4 85.31.186.26:443 011E240742967963A9AD9F037A3D73A602B72352 cert=9385S... iat-mode=0
Important
The `UseBridges` directive is incompatible with `EntryNodes`, so the environment variable `TORRC_USE_BRIDGES=1` removes the explicit specification of `EntryNodes` from the `/etc/tor/torrc` file.
Note
The image already contains the `obfs4proxy` package, which additionally obfuscates traffic.
This project (repository/image) is distributed under the MITâ license.
Content type
Image
Digest
sha256:f62c8099eâĻ
Size
46.9 MB
Last updated
9 months ago
docker pull crasivo/tor-proxy