Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to set up a special proxy server (running Windows). It will have several instances of Privoxy and Tor running and my app will choose which Privoxy instance to send HTTP requests to depending on the load. Privoxy will then forward them to Tor.

I'm using srvany.exe to create the services. At the moment I'm running 3 Privoxy and 3 Tor services (I copied the binaries to different folders). Each Privoxy service is listening to its own port (8118, 8119, 8120). I can see them listening in a port scanner. This is the application path (for srvany in registry) for the 1st service:

C:\Anonymiser\Privoxy 01\privoxy.exe --service

I've also configured the Tor services to listen to different ports (9050, 9052, 9054). This is the application path for the 1st service:

C:\Anonymiser\Tor 01\tor.exe -f "C:\Anonymiser\Tor 01\torrc"

The problem is, when I start the Tor services, only the first service I start is listening to its port. The others aren't listening. They listen if I run them separately.

Any ideas what could be wrong? How can I make all 3 services listen on their assigned ports?

This is one of my Privoxy configs:

confdir .
logdir .
logfile privoxy.log
debug 1 # show each GET/POST/CONNECT request
debug 4096 # Startup banner and warnings
debug 8192 # Errors - we highly recommended enabling this
listen-address localhost:8118
toggle 0
enable-remote-toggle 0
enable-remote-http-toggle 0
enable-edit-actions 1
buffer-limit 4096
forwarded-connect-retries 0
forward-socks4a / localhost:9050 .

This is one of my Tor configs:

ControlPort 9051
Log notice stdout
SocksListenAddress localhost
SocksPort 9050

EDIT:

Found a workaround. The Tor binary wants a lock on a file in the AppData folder. Because all of them want a lock on the same file, only the first one I start will be working. The workaround is to run each Tor instance under a different account. Not the best solution, but it works.

share|improve this question

migrated from stackoverflow.com Apr 27 '10 at 0:09

This question came from our site for professional and enthusiast programmers.

2 Answers 2

Just use

--pidfile /path/to/file/tor1.pid
share|improve this answer

Just specifying a different pid file may work under Unix, under Windows it doesn't.

I had to use the DataDirectory parameter to make this work. I have two instances running now without any issues.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.