A lightweight container that runs Tor with Privoxy, providing an HTTP/HTTPS forward proxy.
241
A lightweight container that runs Tor and wraps it in Privoxy, exposing an HTTP/HTTPS forward proxy on port 55455 — plus Tor's native SOCKS5 on port 9050.
Traffic flow: client -> Privoxy (55455) -> Tor SOCKS5 (9050) -> Tor network.
Privoxy uses forward-socks5t, which enables the Tor optimistic data extension and reduces latency on the first request of each connection.
Tor is inherently slower than a direct connection: expect higher latency and lower throughput. In practice you can browse the web, watch videos and download files comfortably on a decent connection — but keep in mind that some sites (banks, aggressive CDNs) block Tor exit nodes and may refuse to load at all.
On first start, Tor needs to bootstrap its circuits. This usually takes a few seconds up to a couple of minutes depending on your network. Requests made before bootstrap finishes will fail — just retry. Persisting /var/lib/tor (see Volumes) makes restarts much faster because guard information is kept.
docker-compose.yml file with the following content:services:
tor-proxy:
image: docker.io/eduardoenemark/tor-proxy:1.2
container_name: tor-proxy
restart: always
stop_grace_period: 5s
ports:
# HTTP/HTTPS forward proxy (Privoxy -> Tor)
- "0.0.0.0:55455:55455/tcp"
# Tor SOCKS5 (usable by other machines on the network)
- "0.0.0.0:9050:9050/tcp"
volumes:
- "~/.cache/log/tor-proxy:/var/log"
- "~/.cache/log/tor-proxy/privoxy:/var/log/privoxy"
- "~/.cache/log/tor-proxy/tor:/var/log/tor"
# persist Tor state (guard nodes, circuits) -> faster bootstrap on restart
- "~/.cache/data/tor-proxy:/var/lib/tor"
deploy:
resources:
limits:
cpus: 1
memory: 512m
docker compose up -d
podman run \
--name tor-proxy \
--restart always \
--stop-timeout 5 \
--publish 0.0.0.0:55455:55455/tcp \
--publish 0.0.0.0:9050:9050/tcp \
--volume ~/.cache/log/tor-proxy:/var/log \
--volume ~/.cache/log/tor-proxy/privoxy:/var/log/privoxy \
--volume ~/.cache/log/tor-proxy/tor:/var/log/tor \
--volume ~/.cache/data/tor-proxy:/var/lib/tor \
--cpus 1 \
--memory 512m \
docker.io/eduardoenemark/tor-proxy:1.2
| Container path | Purpose |
|---|---|
/var/log/tor | Tor notices log (notices.log) |
/var/log/privoxy | Privoxy request log (logfile) |
/var/lib/tor | Tor state (guard nodes, circuits). Persist it — bootstrap after a restart becomes much faster. |
localhost / 127.0.0.1 as host.Configure your application/browser to use an HTTP proxy at <host>:55455:
# curl
curl -x http://<host>:55455 https://example.com
# Python requests
proxies = {"http": "http://<host>:55455", "https": "http://<host>:55455"}
For applications that speak SOCKS5 directly:
curl --socks5-hostname <host>:9050 https://example.com
All logs are stored in ~/.cache/log/tor-proxy/ on the host:
tor/notices.log (bootstrap progress, warnings)privoxy/logfile (one line per request; enable debug in /etc/privoxy/config only when troubleshooting)non-loopback address notice at startup — this is expected for this service.docker logs tor-proxy or podman logs tor-proxy.tor/notices.log until it reaches Bootstrapped 100% (done).This project is licensed under GPL-3.0.
Content type
Image
Digest
sha256:6ad44527b…
Size
38.7 MB
Last updated
16 days ago
docker pull eduardoenemark/tor-proxy:1.2