mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-24 02:13:43 +03:00
Allow non-wildcard exceptions (no migration or interface yet)
This commit is contained in:
parent
38e2bb2f3c
commit
df3ea9e6ad
|
@ -298,7 +298,7 @@
|
||||||
self.included = [];
|
self.included = [];
|
||||||
self.excluded = [];
|
self.excluded = [];
|
||||||
for(const host of Object.keys(self.exceptions)) {
|
for(const host of Object.keys(self.exceptions)) {
|
||||||
if (self.exceptions[host]) {
|
if (self.exceptions[host]?.ifIncluded) {
|
||||||
self.included.push(host);
|
self.included.push(host);
|
||||||
} else {
|
} else {
|
||||||
self.excluded.push(host);
|
self.excluded.push(host);
|
||||||
|
@ -390,7 +390,7 @@
|
||||||
if (pacMods.ifProxyMoreDomains) {
|
if (pacMods.ifProxyMoreDomains) {
|
||||||
finalExceptions = pacMods.moreDomains.reduce((acc, tld) => {
|
finalExceptions = pacMods.moreDomains.reduce((acc, tld) => {
|
||||||
|
|
||||||
acc[tld] = true;
|
acc[tld] = { ifIncluded: true, ifWild: true };
|
||||||
return acc;
|
return acc;
|
||||||
|
|
||||||
}, finalExceptions);
|
}, finalExceptions);
|
||||||
|
@ -406,7 +406,7 @@
|
||||||
/******/ /* EXCEPTIONS START */
|
/******/ /* EXCEPTIONS START */
|
||||||
/******/ const dotHost = '.' + host;
|
/******/ const dotHost = '.' + host;
|
||||||
/******/ const isHostInDomain = (domain) => dotHost.endsWith('.' + domain);
|
/******/ const isHostInDomain = (domain) => dotHost.endsWith('.' + domain);
|
||||||
/******/ const domainReducer = (maxWeight, [domain, ifIncluded]) => {
|
/******/ const domainReducer = (maxWeight, [domain, { ifIncluded, ifWild }]) => {
|
||||||
/******/
|
/******/
|
||||||
/******/ if (!isHostInDomain(domain)) {
|
/******/ if (!isHostInDomain(domain)) {
|
||||||
/******/ return maxWeight;
|
/******/ return maxWeight;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user