Turn off TUNN CONN FAILED for chrome. Fix proxy settings setter bug

This commit is contained in:
ilyaigpetrov 2020-11-07 15:29:57 +00:00
parent da06ea4aac
commit fe2e986bfe
4 changed files with 10897 additions and 42 deletions

File diff suppressed because it is too large Load Diff

View File

@ -544,11 +544,8 @@ ${
if ( if (
details && details.levelOfControl === 'controlled_by_this_extension' details && details.levelOfControl === 'controlled_by_this_extension'
) { ) {
const pac = window.utils.getProp(details, 'value.pacScript');
if (pac && pac.data) {
return chrome.proxy.settings.set(details, chromified(cb)); return chrome.proxy.settings.set(details, chromified(cb));
} }
}
kitchenState(ifIncontinence, true); kitchenState(ifIncontinence, true);
cb(null, null, new TypeError( cb(null, null, new TypeError(

View File

@ -4,11 +4,12 @@
const timeouted = window.utils.timeouted; const timeouted = window.utils.timeouted;
const isProxied = (requestDetails) => false;
const isProxySideError = (details) => const isProxySideError = (details) =>
/* About !main_frame: Main frame websocket errors are followed by webnavigation errors /* About !main_frame: Main frame websocket errors are followed by webnavigation errors
which chrome-internals code resets the state of the popup. which chrome-internals code resets the state of the popup.
*/ */
details.error === 'net::ERR_TUNNEL_CONNECTION_FAILED' && details.type !== 'main_frame' || details.error === 'net::ERR_TUNNEL_CONNECTION_FAILED' && details.type !== 'main_frame' && isProxied(details) ||
details.error === 'NS_ERROR_CONNECTION_REFUSED' && Boolean(details.proxyInfo); details.error === 'NS_ERROR_CONNECTION_REFUSED' && Boolean(details.proxyInfo);
const urlToA = (url) => new URL(url).host.link( const urlToA = (url) => new URL(url).host.link(
@ -165,5 +166,4 @@
timeouted(isProxyErrorHandledAsync), timeouted(isProxyErrorHandledAsync),
{urls: ['<all_urls>']}, {urls: ['<all_urls>']},
); );
} }