Created
March 26, 2012 13:33
-
-
Save Arcath/2205071 to your computer and use it in GitHub Desktop.
Proxy.pac for a school
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FindProxyForURL(url, host){ | |
/* The IP Range in the form 10.X.X (miss off digit 4) */ | |
iprange = "10.0.0"; | |
/* The Subnet */ | |
subnet = "255.255.255.0"; | |
/* The Domain Name */ | |
localdomain = "school.local"; | |
/* Default proxy to the school proxy, then lea proxy */ | |
proxy = "PROXY proxy.school.local; PROXY proxy.lea.local:8080; DIRECT"; | |
if (isInNet(host, "127.0.0.0", "255.0.0.0") || | |
isInNet(host, iprange + ".0", subnet) || | |
dnsDomainIs(host, localdomain) || | |
isPlainHostName(host)){ | |
/* Set the Proxy server to DIRECT */ | |
proxy = "DIRECT"; | |
} | |
return proxy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment