mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-27 11:53:44 +03:00
Make ffx blink on TUNNEL CONN FAILED (but popup doesn't show error)
This commit is contained in:
parent
a12621635b
commit
5287510263
|
@ -4,9 +4,12 @@
|
|||
|
||||
const timeouted = window.utils.timeouted;
|
||||
|
||||
const proxySideErrors = [
|
||||
'net::ERR_TUNNEL_CONNECTION_FAILED',
|
||||
];
|
||||
const isProxySideError = (details) =>
|
||||
/* About !main_frame: Main frame websocket errors are followed by webnavigation errors
|
||||
which chrome-internals code resets the state of the popup.
|
||||
*/
|
||||
details.error === 'net::ERR_TUNNEL_CONNECTION_FAILED' && details.type !== 'main_frame' ||
|
||||
details.error === 'NS_ERROR_CONNECTION_REFUSED' && Boolean(details.proxyInfo);
|
||||
|
||||
const urlToA = (url) => new URL(url).host.link(
|
||||
encodeURIComponent(url),
|
||||
|
@ -14,9 +17,7 @@
|
|||
|
||||
const isProxyErrorHandledAsync = async (details) => {
|
||||
|
||||
if (!proxySideErrors.includes(details.error) || details.type === 'main_frame') {
|
||||
// Main frame websocket errors are followed by webnavigation errors
|
||||
// which chrome-internals code resets the state of the popup.
|
||||
if (!isProxySideError(details)) {
|
||||
return;
|
||||
}
|
||||
let fromPageHref = '';
|
||||
|
|
Loading…
Reference in New Issue
Block a user