Skip to content

Instantly share code, notes, and snippets.

@orion1vi
Created July 14, 2026 14:37
Show Gist options
  • Select an option

  • Save orion1vi/5e75d13f66ff4eaf941891bce79261ec to your computer and use it in GitHub Desktop.

Select an option

Save orion1vi/5e75d13f66ff4eaf941891bce79261ec to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host)
{
proxies = [
["127.0.0.1:9050",
"nyaa.si",
],
];
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