Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, firstly, I am aware similar questions have been asked before. However, they focus mostly on changing network settings, e.g. IP & DNS servers. What I have now is:

  • A 'home' network, which I can freely use
  • An 'other' network, where I must go through a proxy. Let's call that
    I have no internet access without going through that proxy.

Now, Tor works on both networks. However, on the 'other' network, I need to force Tor to go through a proxy ("I use a proxy to access the internet" on Vidalia). I need to switch that setting on and off every day. Is there a script, program or other method that allows me to automatically enable/disable this setting based on what network I'm connected to? Or even disable Tor completely on one network?

Additional Details

I have Firefox connecting to Tor (through Polipo) using FoxyProxy (not Torbutton). I am considering using Proxifier or similar to force other programs, and VirtualBox VMs, to go through Tor too.

Tor is going through a HTTP/HTTPS proxy the 'other' network requires for internet access. I'm currently using Vidalia to configure Tor, though a solution that relies on directly modifying the torrc file is fine.

Actually, if there is some way I can run a script (batch? exe?) automatically when a certain network is connected to, that's all I need, and probably better (more customisable) Or run a script when any network is connected to, and a method of getting the SSID via batch or C# (.NET).

My current torrc file:

ControlPort 9051
DirReqStatistics 0
HTTPProxyAuthenticator username:password
HTTPSProxyAuthenticator username:password
Socks5ProxyUsername username
Socks5ProxyPassword password
Log notice stdout

My 'home' networks are on the 192.168.x.x subnet. The 'other' network is on the 10.x.x.x subnet. A solution that relies on IP addresses is fine.

Due to the 'other' network using 5GHz 'n', I have two separate wireless NICs: an internal one used for 'home' networks and a USB one used for the 'other' network. However, I may occasionally use the USB one for 'home' networks and am considering bridging the internal to the USB one to share 'other' access with 2.4GHz devices, so solutions dependant on only one NIC being active are not desired (But better than nothing!).

Of course, something relying on SSIDs is also fine. There are multiple 'home' networks with different SSIDs, some on 'g', some on 'n', all on 2.4GHz, while the 'other' network has multiple access points with the same SSID, all on 5GHz 'n'.

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.