I want to know if isn't a good idea to use many instances of Tor and load balancing them through haproxy. I've tested here.. I ran 20 Tor instances (20 socks5 ports) and load balanced them through haproxy. Haproxy give me one socks5 port, e.g: 9080, and each time a connection goes through that port, i had a different Tor IP address. I also set up torrc MaxCircuitDirtness to 180s (this changed the IP address of each Tor instance 3 in 3 minutes). In one hour, I received 156 different IPs (using a loop calling http://ipecho.net/plain on terminal). I saw people using this to run web crawling codes. Isn't that a good a idea to use on a transparent proxy (or on a system wide proxy) to improve stream isolation?


It's questionable whether it's an improvement to the existing way that a client generates certificates. Your HAProxy is basically converting your configuration into an pre-2014 Tor circuit building process because it will likely choose a separate entryguard for each circuit. This makes it statistically less secure which is why they switched to a semi-persistent entryguard model.

I assume that you're getting some bandwidth improvements just because it's a different way of connecting to Tor but Tor does attempt to generate a bunch of streams for you already. From this perspective, it is already load balancing (and it's much smarter at it than HAproxy FWIW).

A better way to do what you're doing is to learn how to manually access the circuits that are pre-build and attach your streams one by one so that a single stream can take a single circuit path without affecting speed. So yeah, it works fine, just a little ham fisted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.