diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js index 513abb4..cf604bc 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js @@ -275,7 +275,10 @@
Comparison of PAC-scripts (ru). \`, order: 0, - pacUrls: ['https://antizapret.prostovpn.org/proxy.pac'], + pacUrls: [ + 'https://antizapret.prostovpn.org/proxy.pac', + 'https://rebrand.ly/ac-antizapret-pac', + ], }, Антицензорити: { distinctKey: 'Anticensority', @@ -469,25 +472,28 @@ reject([err, ...warns]); return; } - resolve(err, res, ...warns); + resolve([err, res, ...warns]); }, ), ); - const ipsErrorPromise = !ifUnattended + const ipsPromise = !ifUnattended ? updateIpsAsync() : tryPromiseSeveralTimesAsync(updateIpsAsync, [20, 40, 60]); - Promise.all([pacSetPromise, ipsErrorPromise]).then( - ([[pacErr, pacRes, ...pacWarns], ipsErr]) => { + Promise.all([pacSetPromise, ipsPromise]).then( + ([[pacErr, pacRes, ...pacWarns], [ipsErr, ipsRes, ...ipsWarns]]) => { - if (pacErr && ipsErr) { + if (pacErr) { return cb(pacErr, pacRes); } const warns = pacWarns; if (ipsErr) { warns.push(ipsErr); } + if (ipsWarns.length) { + warns.push(...ipsWarns); + } this.pushToStorageAsync( (pushErr) => cb(pacErr || pushErr, null, ...warns), ); diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json index 0b29668..5565d7a 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/en/messages.tmpl.json @@ -87,7 +87,7 @@ "message": "Error" }, "Non_critical_error": { - "message": "Non-critical error" + "message": "Non-critical error. Don't worry: it works" }, "Donate": { "message": "Donate" diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json index df185f4..7648a63 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/_locales/ru/messages.tmpl.json @@ -87,7 +87,7 @@ "message": "Ошибка" }, "Non_critical_error": { - "message": "Некритичная ошибка" + "message": "Некритичная ошибка. Всё хорошо, продолжаем работу" }, "Donate": { "message": "Поддержать" diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js index 6cf5a6a..cf4688e 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/pages/options/src/components/App.js @@ -266,7 +266,6 @@ export default function getApp(theState) { this.setStatusTo(beforeStatus); this.switchInputs('off'); operation((err, res, ...warns) => { - warns = warns.filter( (w) => w ); if (err || warns.length) { this.showErrors(err, ...warns); diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-full/20-ip-to-host-api.js b/extensions/chromium/runet-censorship-bypass/src/extension-full/20-ip-to-host-api.js index 1b34a9f..5907709 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-full/20-ip-to-host-api.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-full/20-ip-to-host-api.js @@ -231,12 +231,11 @@ getIpsFor(hostStr, (err, ips, ...warns) => { console.log('Got IPs + err?:', ips, err); - if (!err) { - resolveIps(ips); - } else { + if (err) { reject([err, null, ...warns]); + return; } - + resolveIps(ips); }); }).then( @@ -273,29 +272,18 @@ ); Promise.all( promises ).then( (cbsRes) => { - const errors = cbsRes.map( ([err]) => err ).filter( (err) => err ); - let newError; - const ifAllErrors = cbsRes.length === errors.length; - if (errors.length) { - if (ifAllErrors) { - newError = errors.shift(); - } else { - newError = errors; - } - newError = clarify( - newError, + let ipErrors = cbsRes.map( ([err]) => err ).filter( (err) => err ); + let warns = []; + if (ipErrors.length) { + warns = [clarify( + ipErrors, 'Не удалось получить один или несколько IP адресов для' + ' прокси-серверов. Иконка для уведомления об обходе' + ' блокировок может не отображаться.' - ); - if (ifAllErrors) { - return cb(newError); - } - } - cb(null, null, newError); - + )]; + } else {} + cb(null, null, ...warns); }); - }, _replaceAllAsync(hostArr = mandatory(), cb) {