Jump to content

Proxy On/Off In specsific Wireless Zone


Recommended Posts

Hi. I'm very luck for my school to be able to provide us with laptops, and it is getting very annoying to be having to turn the proxy on and off every time i need to use the internet. How can i detect if i am connected to a network and then turn theh proxy on or off.

Thanks

Link to comment
Share on other sites

Use a Wpad.dat file. Create the following file, say C:\wpad.dat, with these contents (modify to match your network(s) and proxy(s)):

function FindProxyForURL(url, host)
{
if (isInNet(myIpAddress(), "192.168.1.0", "255.255.255.0")) return "PROXY 192.168.1.1:8080";
if (isInNet(myIpAddress(), "10.0.0.0", "255.255.255.0")) return "PROXY 10.0.0.1:8080";
return "DIRECT";
}

Then go into Internet Explorer or Firefox connection settings, and tell it to use the automatic configuration script "c:\wpad.dat"

Bingo presto, it always picks the right thing depending on your current IP address.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

Also, if your network admins at your school have set up their DHCP to provide an automatic configuration script (similar to what you see above) then all you'd have to do is check Automatically Detect Settings, and nothing else, ever.

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

Also, if your network admins at your school have set up their DHCP to provide an automatic configuration script (similar to what you see above) then all you'd have to do is check Automatically Detect Settings, and nothing else, ever.

Thanks. :whistle:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...