mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2024-11-30 13:23: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 timeouted = window.utils.timeouted;
|
||||||
|
|
||||||
const proxySideErrors = [
|
const isProxySideError = (details) =>
|
||||||
'net::ERR_TUNNEL_CONNECTION_FAILED',
|
/* 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(
|
const urlToA = (url) => new URL(url).host.link(
|
||||||
encodeURIComponent(url),
|
encodeURIComponent(url),
|
||||||
|
@ -14,9 +17,7 @@
|
||||||
|
|
||||||
const isProxyErrorHandledAsync = async (details) => {
|
const isProxyErrorHandledAsync = async (details) => {
|
||||||
|
|
||||||
if (!proxySideErrors.includes(details.error) || details.type === 'main_frame') {
|
if (!isProxySideError(details)) {
|
||||||
// Main frame websocket errors are followed by webnavigation errors
|
|
||||||
// which chrome-internals code resets the state of the popup.
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let fromPageHref = '';
|
let fromPageHref = '';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user