Last active
August 27, 2024 17:17
-
-
Save dhval/3bf6f2e97a43760fee7e840f28e970d2 to your computer and use it in GitHub Desktop.
myproxy.pac
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) { | |
PROXY = "SOCKS5 127.0.0.1:9743; SOCKS 127.0.0.1:9743" | |
// PROXY = "PROXY 127.0.0.1:9743" | |
// "PROXY 127.0.0.1:23870"; | |
alert("ABCXY request for (" + url+ " with host: " + host + ")"); | |
if(shExpMatch(url, "http://10.182.70.240*")) | |
return PROXY; | |
} | |
// Apple.com via proxy | |
if (shExpMatch(host,"*.pa.gov") || shExpMatch(host, "172.*") | |
|| shExpMatch(host, "*10.182.*") | |
|| shExpMatch(host, ".*gov.*") | |
) { | |
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