Docker Container
-------------------------------------
<-> Polipo 1 <-> Tor Proxy 1
Client <----> HAproxy <-> Polipo 2 <-> Tor Proxy 2
<-> Polipo n <-> Tor Proxy n
Why: Lots of IP addresses. One single endpoint for your client. Load-balancing by HAproxy.
# build docker container
docker build -t minhphuc429/rotating-tor-proxy:latest .
# ... or pull docker container
docker pull minhphuc429/rotating-tor-proxy:latest
# start docker container
docker run -d -p 5566:5566 -p 4444:4444 --env tors=25 minhphuc429/rotating-tor-proxy
# test with ...
curl --proxy 127.0.0.1:5566 https://api.my-ip.io/ip
# monitor
http://127.0.0.1:4444/haproxy?stats
-
Install
make
command line utility -
Copy
example.env
as.env
and edit settings -
Use
make
commands
# start docker container
make run
# stop and remove container
make remove
# Alternatively, using Docker Service
make service
See Makefile
for full list of available shortcuts.
Please note: Tor offers a SOCKS Proxy only. In order to allow communication from HAproxy to Tor, Polipo is used to translate from HTTP proxy to SOCKS proxy. HAproxy is able to talk to HTTP proxies only.