A lightweight, privacy-focused proxy server using Tor network.
2.2K
A lightweight, privacy-focused proxy server using Tor network.
Disclaimer: This project is intended for legitimate and legal use only, such as privacy protection, censorship circumvention, and security research. Users are solely responsible for ensuring their usage complies with applicable laws and regulations.
docker pull mstfknn/tor-proxy
docker run -d -p 9150:9150 -p 8853:5353/udp mstfknn/tor-proxy
-bridge tags (obfs4, meek)| Variable | Default | Description |
|---|---|---|
SOCKS_PORT | 9150 | SOCKS5 proxy port |
DNS_PORT | 5353 | DNS resolution port |
ENABLE_LOG | false | Enable Tor logging to stdout |
EXIT_NODES | - | Exit node countries (e.g., {US},{DE}) |
STRICT_NODES | 0 | Only use specified exit nodes (1 to enable) |
USE_BRIDGE | false | Enable Tor bridge |
BRIDGE_TYPE | - | Bridge type: obfs4, meek, snowflake |
BRIDGE_LINES | - | Bridge addresses (semicolon-separated) |
docker run -d -p 9150:9150 mstfknn/tor-proxy:debian
docker run -d -p 9150:9150 \
-e EXIT_NODES="{US},{GB}" \
-e STRICT_NODES=1 \
mstfknn/tor-proxy:debian
Use the -bridge tagged images which include obfs4proxy:
docker run -d -p 9150:9150 \
-e USE_BRIDGE=true \
-e BRIDGE_TYPE=obfs4 \
-e BRIDGE_LINES="obfs4 1.2.3.4:443 FINGERPRINT cert=... iat-mode=0" \
mstfknn/tor-proxy:debian-bridge
docker run -d -p 9150:9150 \
-v tor-data:/var/lib/tor \
mstfknn/tor-proxy:debian
Run multiple Tor instances behind HAProxy for different exit IPs per request:
docker compose -f docker-compose.multi.yml up -d
Client → :9150 → HAProxy → tor-1 (circuit A)
→ tor-2 (circuit B)
→ tor-3 (circuit C)
No additional image build is required — it uses the pre-built mstfknn/tor-proxy:debian image and the official haproxy:alpine image. See GitHub repo for docker-compose.multi.yml and haproxy.cfg.
Configure your application to use the SOCKS5 proxy at localhost:9150 and verify your IP:
curl --socks5-hostname localhost:9150 https://check.torproject.org/api/ip
| Tag | Description |
|---|---|
debian, latest | Debian-based, standard |
alpine | Alpine-based, minimal |
debian-bridge | Debian + obfs4proxy (bridge support) |
alpine-bridge | Alpine + obfs4proxy (bridge support) |
Content type
Image
Digest
sha256:b29fd2f34…
Size
498 Bytes
Last updated
4 months ago
docker pull mstfknn/tor-proxy:sha256-4cdd370c3c3463546b0b38599eebc32b5b0eb390fc3413c815c5d7cd6f533ecd.sig