Skip to content

Instantly share code, notes, and snippets.

@akiraaisha
Created November 23, 2018 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akiraaisha/049dcfe6520dccced435b7d64dc0f67b to your computer and use it in GitHub Desktop.
Save akiraaisha/049dcfe6520dccced435b7d64dc0f67b to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host)
{
var useSocks = [".dnsleaktest.com|music.youtube.com|.crunchyroll.com"]; //sites that's going to be using Socks
var useDirect = ["youtube.com"] //and this is for direct
for (var i= 0; i < useSocks.length; i++) {
if (shExpMatch(host, useSocks[i])) {
return "SOCKS5 localhost:9050";
}
}
for (var i= 0; i < useDirect.length; i++) {
if (shExpMatch(host, useDirect[i])) {
return "DIRECT";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment