Skip to content

Instantly share code, notes, and snippets.

@sparkwj
Last active November 22, 2018 13:23
Show Gist options
  • Save sparkwj/3c718b90a1b5864252f7b2aafeb40392 to your computer and use it in GitHub Desktop.
Save sparkwj/3c718b90a1b5864252f7b2aafeb40392 to your computer and use it in GitHub Desktop.
function FindProxyForURL(url, host)
{
var resolved_ip = dnsResolve(host);
if (isInNet(resolved_ip, "10.0.0.0", "255.0.0.0") ||
isInNet(resolved_ip, "172.16.0.0", "255.240.0.0") ||
isInNet(resolved_ip, "192.168.0.0", "255.255.0.0") ||
isInNet(resolved_ip, "127.0.0.0", "255.255.255.0"))
return "DIRECT";
return "192.168.1.3:1082; DIRECT";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment