Skip to content

Instantly share code, notes, and snippets.

@dhval
Last active September 27, 2021 16:08
Show Gist options
  • Save dhval/3bf6f2e97a43760fee7e840f28e970d2 to your computer and use it in GitHub Desktop.
Save dhval/3bf6f2e97a43760fee7e840f28e970d2 to your computer and use it in GitHub Desktop.
myproxy.pac
function FindProxyForURL(url, host) {
PROXY = "SOCKS5 127.0.0.1:9743; SOCKS 127.0.0.1:9743"
alert("ABCXY request for (" + url+ " with host: " + host + ")");
// Apple.com via proxy
if (shExpMatch(host,"*.pa.gov") || shExpMatch(host, "172.*")
|| shExpMatch(host, "10.182.*")
|| shExpMatch(host, ".*pagov.*")
) {
alert(host + " passed!");
return PROXY;
}
// Everything else directly!
alert(host + " bnot passed!");
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment