Created
September 22, 2017 14:45
-
-
Save buchi/22778db9b9076612fd1a8b5ec720beae to your computer and use it in GitHub Desktop.
This file contains 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) { | |
// Adressen, die auf example.com liegen, brauchen keinen Proxy: | |
if (shExpMatch(host,"*.example.com")) { | |
return "DIRECT"; | |
} | |
// URLs innerhalb dieses Netzwerkes werden abgefragt über | |
// Port 8080 auf fastproxy.example.com: (macht Nameserver Anfrage) | |
if (isInNet(host, "10.0.0.0", "255.255.248.0")) { | |
return "PROXY fastproxy.example.com:8080"; | |
} | |
// Alle anderen Anfragen gehen über Port 8000 von proxy.example.com. | |
// sollte das fehlschlagen, verbinde direkt ins Netz: | |
return "PROXY proxy.example.com:8000; DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment