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 8ac1bc3..59efacc 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 @@ -359,12 +359,12 @@ } res += ` /******/ -/******/ const directIfAllowed = ${pacMods.ifProxyOrDie ? '""/* Not allowed. */' : '"; DIRECT"'}; +/******/ const directIfAllowed = ${pacMods.ifProxyOrDie ? '""/* Not allowed. */' : '"DIRECT"'}; /******/`; if (pacMods.filteredCustomsString) { res += ` /******/ -/******/ const filteredCustomProxies = "; ${pacMods.filteredCustomsString}"; +/******/ const filteredCustomProxies = "${pacMods.filteredCustomsString}"; /******/`; } @@ -412,7 +412,7 @@ /******/ } /******/ // Always proxy it! ${ pacMods.filteredCustomsString - ? `/******/ return filteredCustomProxies + directIfAllowed;` + ? `/******/ return filteredCustomProxies + "; " + directIfAllowed;` : '/******/ /* No custom proxies -- continue. */' } /******/ } @@ -421,7 +421,9 @@ ${ pacMods.filteredCustomsString } res += ` /******/ const pacScriptProxies = originalFindProxyForURL(url, host)${ -/******/ pacMods.ifProxyOrDie ? '.replace(/DIRECT/g, "")' : ' + directIfAllowed' +/******/ pacMods.ifProxyOrDie + ? '.replace(/DIRECT/g, "")' + : ' + "; " + directIfAllowed' };`; if( !pacMods.ifUseSecureProxiesOnly && @@ -429,7 +431,8 @@ ${ pacMods.filteredCustomsString pacMods.ifUsePacScriptProxies ) { return res + ` -/******/ return (pacScriptProxies + directIfAllowed) || "DIRECT";`; +/******/ return [pacScriptProxies, directIfAllowed] + .filter((p) => p).join("; ") || "DIRECT";`; } return res + ` @@ -440,6 +443,10 @@ ${ pacMods.filteredCustomsString /******/ return "DIRECT"; /******/ } /******/ return ` + + (pacMods.filteredCustomsString + ? 'filteredCustomProxies + "; " + ' + : '' + ) + function() { if (!pacMods.ifUsePacScriptProxies) { @@ -450,9 +457,9 @@ ${ pacMods.filteredCustomsString filteredPacExp = 'pacProxyArray.filter( (pStr) => /^HTTPS\\s/.test(pStr) ).join("; ")'; } - return filteredPacExp + ' + '; + return filteredPacExp + ' + "; " + '; - }() + `${pacMods.filteredCustomsString ? 'filteredCustomProxies + ' : ''}directIfAllowed;`; // Without DIRECT you will get 'PROXY CONN FAILED' pac-error. + }() + 'directIfAllowed;'; // Without DIRECT you will get 'PROXY CONN FAILED' pac-error. }() } diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/debug/index.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/debug/index.js index 6157146..c525cc1 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/debug/index.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/debug/index.js @@ -25,7 +25,6 @@ chrome.runtime.getBackgroundPage((bgWin) => { control = red(control); } setStatusTo(control); - console.log(details); const pac = details.value.pacScript; const data = pac && pac.data || 'PAC скрипт не установлен.'; editor.setValue( data ); diff --git a/extensions/chromium/runet-censorship-bypass/src/templates-data.js b/extensions/chromium/runet-censorship-bypass/src/templates-data.js index 6c8b410..e6935a4 100644 --- a/extensions/chromium/runet-censorship-bypass/src/templates-data.js +++ b/extensions/chromium/runet-censorship-bypass/src/templates-data.js @@ -10,7 +10,7 @@ const pacUrls = [ ]; const commonContext = { - version: '1.28', + version: '1.29', anticensorityPacUrls: [ ...pacUrls, ],