Created
July 5, 2023 10:26
-
-
Save sadanand-singh/8e51a99f5c31198a71a7db4354eb96d6 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) { | |
// 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 127.0.0.1:50001"; | |
} | |
if (isInNet(host, "192.168.150.3", "255.255.0.0")) { | |
return "SOCKS 127.0.0.1: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