Skip to content

Instantly share code, notes, and snippets.

@orion1vi
Created January 5, 2025 16:13
Show Gist options
  • Save orion1vi/7a37c6115773ad104fdc83dfec076900 to your computer and use it in GitHub Desktop.
Save orion1vi/7a37c6115773ad104fdc83dfec076900 to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host)
{
proxies = [
["127.0.0.1:9050",
"nyaa.si",
"kemono.su",
],
];
for (var x = 0; x < proxies.length; x++)
for (var y = 1; y < proxies[x].length; y++)
if (host == proxies[x][y] || shExpMatch(host, "*." + proxies[x][y]))
return "SOCKS " + proxies[x][0];
return "DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment