Home » Questions » Computers [ Ask a new question ]

Toggle proxy settings based on the wired/wireless connection you make

Toggle proxy settings based on the wired/wireless connection you make

Without using third party software, is there a way to have Windows toggle your proxy settings on/off based on the wired/wireless connection you make?

Asked by: Guest | Views: 284
Total answers/comments: 1
Guest [Entry]

"You could try creating a proxy.pac file. Depending if you know both addresses (wired and wireless) you could try this:

function FindProxyForURL(url, host)
{
if (isInNet(myIpAddress(), ""192.168.1.0"", ""255.255.255.0"")) // Wired connection
return ""PROXY 192.168.1.1:8080"";
if (isInNet(myIpAddress(), ""192.168.2.0"", ""255.255.255.0"")) // Wireless connection
return ""PROXY 192.168.2.1:8080"";
else
return ""DIRECT"";
}

Then just point the browser to where you saved the proxy.pac file for the automatic configuration script.

I hope this helps."