mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 20:03:45 +03:00
Merge branch 'development' into production
This commit is contained in:
commit
66d89a3b97
|
@ -359,12 +359,12 @@
|
||||||
}
|
}
|
||||||
res += `
|
res += `
|
||||||
/******/
|
/******/
|
||||||
/******/ const directIfAllowed = ${pacMods.ifProxyOrDie ? '""/* Not allowed. */' : '"; DIRECT"'};
|
/******/ const directIfAllowed = ${pacMods.ifProxyOrDie ? '""/* Not allowed. */' : '"DIRECT"'};
|
||||||
/******/`;
|
/******/`;
|
||||||
if (pacMods.filteredCustomsString) {
|
if (pacMods.filteredCustomsString) {
|
||||||
res += `
|
res += `
|
||||||
/******/
|
/******/
|
||||||
/******/ const filteredCustomProxies = "; ${pacMods.filteredCustomsString}";
|
/******/ const filteredCustomProxies = "${pacMods.filteredCustomsString}";
|
||||||
/******/`;
|
/******/`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@
|
||||||
/******/ }
|
/******/ }
|
||||||
/******/ // Always proxy it!
|
/******/ // Always proxy it!
|
||||||
${ pacMods.filteredCustomsString
|
${ pacMods.filteredCustomsString
|
||||||
? `/******/ return filteredCustomProxies + directIfAllowed;`
|
? `/******/ return filteredCustomProxies + "; " + directIfAllowed;`
|
||||||
: '/******/ /* No custom proxies -- continue. */'
|
: '/******/ /* No custom proxies -- continue. */'
|
||||||
}
|
}
|
||||||
/******/ }
|
/******/ }
|
||||||
|
@ -421,7 +421,9 @@ ${ pacMods.filteredCustomsString
|
||||||
}
|
}
|
||||||
res += `
|
res += `
|
||||||
/******/ const pacScriptProxies = originalFindProxyForURL(url, host)${
|
/******/ const pacScriptProxies = originalFindProxyForURL(url, host)${
|
||||||
/******/ pacMods.ifProxyOrDie ? '.replace(/DIRECT/g, "")' : ' + directIfAllowed'
|
/******/ pacMods.ifProxyOrDie
|
||||||
|
? '.replace(/DIRECT/g, "")'
|
||||||
|
: ' + "; " + directIfAllowed'
|
||||||
};`;
|
};`;
|
||||||
if(
|
if(
|
||||||
!pacMods.ifUseSecureProxiesOnly &&
|
!pacMods.ifUseSecureProxiesOnly &&
|
||||||
|
@ -429,7 +431,8 @@ ${ pacMods.filteredCustomsString
|
||||||
pacMods.ifUsePacScriptProxies
|
pacMods.ifUsePacScriptProxies
|
||||||
) {
|
) {
|
||||||
return res + `
|
return res + `
|
||||||
/******/ return (pacScriptProxies + directIfAllowed) || "DIRECT";`;
|
/******/ return [pacScriptProxies, directIfAllowed]
|
||||||
|
.filter((p) => p).join("; ") || "DIRECT";`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res + `
|
return res + `
|
||||||
|
@ -440,6 +443,10 @@ ${ pacMods.filteredCustomsString
|
||||||
/******/ return "DIRECT";
|
/******/ return "DIRECT";
|
||||||
/******/ }
|
/******/ }
|
||||||
/******/ return ` +
|
/******/ return ` +
|
||||||
|
(pacMods.filteredCustomsString
|
||||||
|
? 'filteredCustomProxies + "; " + '
|
||||||
|
: ''
|
||||||
|
) +
|
||||||
function() {
|
function() {
|
||||||
|
|
||||||
if (!pacMods.ifUsePacScriptProxies) {
|
if (!pacMods.ifUsePacScriptProxies) {
|
||||||
|
@ -450,9 +457,9 @@ ${ pacMods.filteredCustomsString
|
||||||
filteredPacExp =
|
filteredPacExp =
|
||||||
'pacProxyArray.filter( (pStr) => /^HTTPS\\s/.test(pStr) ).join("; ")';
|
'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.
|
||||||
|
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@ chrome.runtime.getBackgroundPage((bgWin) => {
|
||||||
control = red(control);
|
control = red(control);
|
||||||
}
|
}
|
||||||
setStatusTo(control);
|
setStatusTo(control);
|
||||||
console.log(details);
|
|
||||||
const pac = details.value.pacScript;
|
const pac = details.value.pacScript;
|
||||||
const data = pac && pac.data || 'PAC скрипт не установлен.';
|
const data = pac && pac.data || 'PAC скрипт не установлен.';
|
||||||
editor.setValue( data );
|
editor.setValue( data );
|
||||||
|
|
|
@ -10,7 +10,7 @@ const pacUrls = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const commonContext = {
|
const commonContext = {
|
||||||
version: '1.28',
|
version: '1.29',
|
||||||
anticensorityPacUrls: [
|
anticensorityPacUrls: [
|
||||||
...pacUrls,
|
...pacUrls,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user