From df3ea9e6ad8a5996c56a8922e352ee871ffbdb6d Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Tue, 12 Jan 2021 15:46:32 +0000 Subject: [PATCH] Allow non-wildcard exceptions (no migration or interface yet) --- .../src/extension-common/35-pac-kitchen-api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js index 2e14c71..f9851f6 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/35-pac-kitchen-api.js @@ -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;