function FindProxyForURL(url, host) {
// If the hostname matches, send direct.
if ( shExpMatch(host, "(*.taobao.com|
taobao.com)") ||
shExpMatch(host, "(*.wechat.com|
wechat.com)"))
return "DIRECT";
// If the requested website is hosted within the internal network, send direct.
if (isPlainHostName(host) ||
shExpMatch(host, "*.local") ||
isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "172.16.0.0", "255.240.0.0") ||
isInNet(dnsResolve(host), "192.168.0.0", "255.255.0.0") ||
isInNet(dnsResolve(host), "127.0.0.0", "255.255.255.0") ||
isInNet(dnsResolve(host), "111.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "123.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "180.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "220.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "103.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "205.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "140.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "110.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "202.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "211.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "117.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "42.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "103.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "125.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "61.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "203.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "123.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "140.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "219.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "119.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "182.0.0.0", "255.0.0.0") ||
isInNet(dnsResolve(host), "192.100.0.0", "255.255.0.0") ||
isInNet(dnsResolve(host), "14.0.0.0", "255.0.0.0"))
return "DIRECT";
// DEFAULT RULE: All other traffic, use below proxies, in fail-over order.
return "PROXY 127.0.0.1:1080";
}
自己微调吧,虽然我不用 SS ,但这是标谁格式,肯定能用,这么短,可以避免一些麻烦。