Обновить ss_conditions.pac

main
Михаил Ильясов 2026-08-24 22:19:00 +07:00
parent 65235fbe2e
commit 34b46a3fbc
1 changed files with 45 additions and 29 deletions

View File

@ -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,31 +383,47 @@ if (typeof __PROXY__ === "undefined") {
direct = "DIRECT;";
}
var FindProxyForURL = function(init, profiles) {
return function(url, host) {
"use strict";
var result = init, scheme = url.substr(0, url.indexOf(":"));
do {
result = profiles[result];
if (typeof result === "function") result = result(url, host, scheme);
} while (typeof result !== "string" || result.charCodeAt(0) === 43);
return result;
};
}("+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);
})) {
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)) {
return direct;
}
return proxy;
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";
var result = init, scheme = url.substr(0, url.indexOf(":"));
do {
result = profiles[result];
if (typeof result === "function") result = result(url, host, scheme);
} while (typeof result !== "string" || result.charCodeAt(0) === 43);
return result;
};
}("+auto switch", {
"+auto switch": function(url, host, scheme) {
"use strict";
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)) {
return direct;
}
return proxy;
}
});