I have a laptop running Windows 7 Professional. There are two wireless networks I connect to every day:

  • Home: no proxy server
  • Work: proxy server with authentication

On my iPad and iPhone, I've got two WIFI network profiles (one for home, one for work). The work one has the proxy server settings specified. The home one has no proxy specified. It all works great and I don't need to go changing settings around whenever I move from home to work or vice versa.

On my laptop, however, I can't seem to get this going. I can certainly connect to both networks, but when I'm at work I have to go and change the proxy settings (in Internet Options) to be able to use the network. When I'm at home, I have to then go and turn them off. It's a small thing, but considering this is something I have to do every day, it's a bit annoying.

Is there any way I can make Windows automatically switch proxy settings on or off based on the network I'm connected to?

  • Not quite what you are looking for, but does your work support auto proxy configuration? If so, just leave it on automatic. – nonot1 Nov 2 '10 at 2:01
  • Unfortunately it doesn't - good thought though! – John Nov 3 '10 at 5:36
  • i have the precise same problem, this is very annoying. – JoséNunoFerreira May 2 '11 at 15:44

Most browsers today support a proxy configuration script. That's just a bit of javascript that takes the DNS name/IP as arguments, and returns a string to indicate which proxy to use.


Fairly simple even if you don't know javascript. And all you have to do is point your browser's "automatic proxy configuration script" setting at the file. Some browsers insist the script should be on the network somewhere.

There are small programs to host files from your own machine, such as http://tinyserver.sourceforge.net/

But I usually just put it on some local webserver I have handy.

Example autoconf.js:

   function FindProxyForURL(url, host) {
      // our local URLs from the domains below example.com don't need a proxy:
      if (shExpMatch(host, "*.example.com"))
         return "DIRECT";

      // URLs within this network are accessed through
      // port 8080 on fastproxy.example.com:
      if (isInNet(host, "",  ""))
         return "PROXY fastproxy.example.com:8080";

      // All other requests go through port 8080 of proxy.example.com.
      // should that fail to respond, go directly to the WWW:
      return "PROXY proxy.example.com:8080; DIRECT";

That last bit is of particular importance, as it allows your system to attempt the proxy and then fall back to none.

There's also a variable myIpAddress, that can be used, as below:

function FindProxyForURL(url, host)
    if (isInNet(myIpAddress(), "", ""))
        return "PROXY";
        return "DIRECT";

Though some browsers/systems get confused on that point, and may return


Here are some free products that can switch all network attributes with one click :

Eusing Free IP Switcher

NetSetMan has more a extensive feature-set, and the free version can flip : IP Addresses, Gateways (incl. Metric), DNS Servers, WINS Servers, IPv4 / IPv6, WiFi Management, Computer Name, Workgroup/domain, DNS Domain/Suffix, Default Printer, Network Drives, NIC Status and SMTP Server.



TCP/IP Manager seems like a fair solution, which is also open source. It is able to switch between profiles and even create BAT scripts to more around!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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