Created
April 27, 2022 13:57
-
-
Save robertoandrade/93828c7505c17fe66436238fa0436948 to your computer and use it in GitHub Desktop.
PAC config for returning SOCKS proxy for local network addresses
This file contains hidden or 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) { | |
// our local URLs from the domains below example.com don't need a proxy: | |
if (shExpMatch(host, "*.example.com")) | |
{ | |
return "DIRECT"; | |
} | |
// URLs within this network are accessed through | |
// port 8888 on localhost: | |
if (isInNet(host, "192.168.10.0", "255.255.255.0")) | |
{ | |
return "SOCKS5 localhost:8888;SOCKS localhost:8888"; | |
} | |
return "DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment