Skip to content

Instantly share code, notes, and snippets.

@ganboing
Last active July 13, 2024 09:34
Show Gist options
  • Save ganboing/6f1a39dc64080ee3e0d953d789441c7c to your computer and use it in GitHub Desktop.
Save ganboing/6f1a39dc64080ee3e0d953d789441c7c to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host)
{
ipv4 = /^\d+\.\d+\.\d+\.\d+$/;
if (ipv4.test(host) && isInNet(host, "192.168.0.0", "255.255.0.0") )
return "DIRECT"
return "SOCKS 192.168.0.10:1080";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment