Обновить ss_conditions.pac
parent
65235fbe2e
commit
34b46a3fbc
|
|
@ -49,7 +49,7 @@ var __BLOCKEDSITES__ = [
|
|||
"*.azattyq.com",
|
||||
"*.bbc.com",
|
||||
"*.bbci.co.uk",
|
||||
"*..bluetoothgoodies.com",
|
||||
"*.bluetoothgoodies.com",
|
||||
"*.bellingcat.com",
|
||||
"*.bild.de",
|
||||
"*.bing.com",
|
||||
|
|
@ -333,7 +333,7 @@ var __BLOCKEDSITES__ = [
|
|||
"*.qualcomm.com",
|
||||
"*.paypal.com",
|
||||
"*.sms-activate.io",
|
||||
"*.https://windows64.net",
|
||||
"*.windows64.net",
|
||||
"*.myprepaidcenter.com",
|
||||
"*.live.com",
|
||||
"*.outlook.com",
|
||||
|
|
@ -369,7 +369,7 @@ var __BLOCKEDSITES__ = [
|
|||
"*.cloudapps.cisco.com",
|
||||
"*.visit.xikestor.com",
|
||||
"*.visit.seekswan.com",
|
||||
".armbian.com"
|
||||
"*.armbian.com"
|
||||
];
|
||||
|
||||
var proxy;
|
||||
|
|
@ -383,6 +383,24 @@ if (typeof __PROXY__ === "undefined") {
|
|||
direct = "DIRECT;";
|
||||
}
|
||||
|
||||
function __isBlockedHost__(host) {
|
||||
var i, blockedSite, reText;
|
||||
for (i = 0; i < __BLOCKEDSITES__.length; i++) {
|
||||
blockedSite = __BLOCKEDSITES__[i];
|
||||
if (blockedSite.charAt(0) === "*") {
|
||||
reText = "(?:^|\\.)" + blockedSite.replace(/\./g, "\\.").replace(/^\*\\\./, "") + "$";
|
||||
} else {
|
||||
reText = "^" + blockedSite.replace(/\./g, "\\.") + "$";
|
||||
}
|
||||
try {
|
||||
if ((new RegExp(reText)).test(host)) {
|
||||
return true;
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
var FindProxyForURL = function(init, profiles) {
|
||||
return function(url, host) {
|
||||
"use strict";
|
||||
|
|
@ -396,16 +414,14 @@ var FindProxyForURL = function(init, profiles) {
|
|||
}("+auto switch", {
|
||||
"+auto switch": function(url, host, scheme) {
|
||||
"use strict";
|
||||
if (__BLOCKEDSITES__.some(function(blockedSite) {
|
||||
return new RegExp((blockedSite.startsWith("*") ? "(?:^|\\.)" : "^") + blockedSite.replace(/\./g, "\\.").replace(/^\*\\\./, "") + "$").test(host);
|
||||
})) {
|
||||
if (__isBlockedHost__(host)) {
|
||||
return "+proxy";
|
||||
}
|
||||
return "DIRECT";
|
||||
},
|
||||
"+proxy": function(url, host, scheme) {
|
||||
"use strict";
|
||||
if (/^127\.0\.0\.1$/.test(host) || /^::1$/.test(host) || /^localhost$/.test(host) || /^192\.168\.[0-9]{1-3}\.[0-9]{1-3}$/.test(host)) {
|
||||
if (/^127\.0\.0\.1$/.test(host) || /^::1$/.test(host) || /^localhost$/.test(host) || /^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$/.test(host)) {
|
||||
return direct;
|
||||
}
|
||||
return proxy;
|
||||
|
|
|
|||
Loading…
Reference in New Issue