From 14f32b4d13e4b197ed23fef7c94d7525eb9b3f4e Mon Sep 17 00:00:00 2001 From: ilyaigpetrov Date: Sun, 17 Jan 2021 16:30:12 +0000 Subject: [PATCH] Migrate all exceptions to wildcarded state --- .../37-sync-pac-script-with-pac-provider-api.tmpl.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js index 78c65de..2569c19 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js @@ -551,7 +551,16 @@ } } if (oldAntiCensorRu.version && window.apis.version.isLeq(oldAntiCensorRu.version, '0.0.1.49')) { - // TODO: + const modsMutated = window.apis.pacKitchen.getPacModsRaw(); + if (modsMutated) { + modsMutated.exceptions = Object.entries(modsMutated.exceptions).reduce((acc, [host, ifProxy]) => { + acc[\`*.\${host}\`] = ifProxy; + return acc; + }, {}); + await new Promise( + (resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve), + ); + } } /*