Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sadanand-singh/ded160f0cf17549103c177975792bc79 to your computer and use it in GitHub Desktop.
Save sadanand-singh/ded160f0cf17549103c177975792bc79 to your computer and use it in GitHub Desktop.
pac
function FindProxyForURL(url, host) {
// URLs within this network are accessed through
// port 8080 on fastproxy.example.com:
if (isInNet(host, "10.20.3.205", "255.255.0.0")) {
return "SOCKS localhost:50001";
}
if (isInNet(host, "192.168.150.3", "255.255.0.0")) {
return "SOCKS localhost:50001";
}
// All other requests go through port 8080 of proxy.example.com.
// should that fail to respond, go directly to the WWW:
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment