mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-10 19:46:34 +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.excluded = [];
|
||||
for(const host of Object.keys(self.exceptions)) {
|
||||
if (self.exceptions[host]) {
|
||||
if (self.exceptions[host]?.ifIncluded) {
|
||||
self.included.push(host);
|
||||
} else {
|
||||
self.excluded.push(host);
|
||||
|
@ -390,7 +390,7 @@
|
|||
if (pacMods.ifProxyMoreDomains) {
|
||||
finalExceptions = pacMods.moreDomains.reduce((acc, tld) => {
|
||||
|
||||
acc[tld] = true;
|
||||
acc[tld] = { ifIncluded: true, ifWild: true };
|
||||
return acc;
|
||||
|
||||
}, finalExceptions);
|
||||
|
@ -406,7 +406,7 @@
|
|||
/******/ /* EXCEPTIONS START */
|
||||
/******/ const dotHost = '.' + host;
|
||||
/******/ const isHostInDomain = (domain) => dotHost.endsWith('.' + domain);
|
||||
/******/ const domainReducer = (maxWeight, [domain, ifIncluded]) => {
|
||||
/******/ const domainReducer = (maxWeight, [domain, { ifIncluded, ifWild }]) => {
|
||||
/******/
|
||||
/******/ if (!isHostInDomain(domain)) {
|
||||
/******/ return maxWeight;
|
||||
|
|
Loading…
Reference in New Issue
Block a user