|
|
@@ -793,7 +793,22 @@ for (var i = 0; i < rules.length; i++) { |
|
|
|
defaultMatcher.add(Filter.fromText(rules[i]));
|
|
|
|
}
|
|
|
|
|
|
|
|
// PAC has no v6 support, it sucks
|
|
|
|
var ip4Re = /^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/
|
|
|
|
|
|
|
|
var privateNet = [
|
|
|
|
["10.0.0.0", "255.0.0.0"],
|
|
|
|
["127.0.0.0", "255.0.0.0"],
|
|
|
|
["172.16.0.0", "255.240.0.0"],
|
|
|
|
["192.168.0.0", "255.255.0.0"],
|
|
|
|
]
|
|
|
|
|
|
|
|
function FindProxyForURL(url, host) {
|
|
|
|
if (host.match(ip4Re)) {
|
|
|
|
for (var i = 0; i < privateNet.length; i++) {
|
|
|
|
if (isInNet(host, privateNet[i][0], privateNet[i][1])) return direct;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (userrulesMatcher.matchesAny(url, host) instanceof BlockingFilter) {
|
|
|
|
return proxy;
|
|
|
|
}
|
|
|
|