Last active
July 27, 2024 08:04
-
-
Save wmhtet/f50fc19d05eb06d370eb010ece646711 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) { | |
// List of domains to be proxied | |
var proxyDomains = [ | |
"facebook.com", | |
"wikipedia.org", | |
"ifconfig.me" | |
]; | |
for (var i = 0; i < proxyDomains.length; i++) { | |
if (dnsDomainIs(host, proxyDomains[i]) || shExpMatch(host, "*." + proxyDomains[i])) { | |
return "SOCKS5 127.0.0.1:5005"; | |
} | |
} | |
// Default to direct connection | |
return "DIRECT"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment