Compare commits

..

52 Commits

Author SHA1 Message Date
ilyaigpetrov
d86cf384af Bump 0.0.1.66 2024-07-30 15:39:06 +05:00
ilyaigpetrov
e1c95a3ece Add exact versions for reviewers 2024-07-30 15:38:19 +05:00
ilyaigpetrov
edabf14dd5 Add reference about why have to ask for consent 2024-07-15 23:41:37 +05:00
ilyaigpetrov
2f5d425f34 Autoclose the consent screen after user choice. Show consent screen only in FireFox 2024-07-15 23:40:31 +05:00
ilyaigpetrov
1c38137200
Remove the text about Mozilla ban 2024-06-15 11:57:19 +05:00
ilyaigpetrov
99b68ec8d0
Add a link to releases page for FireFox 2024-06-11 21:54:40 +05:00
ilyaigpetrov
0cc47d43a9
Mention that Mozilla blocks access for Russian IPs 2024-06-09 21:03:15 +05:00
Polycarbohydrate
a583e5ecb3 Fix English grammatical errors and add a translation. Merge PR #244
* Update README.md

* Fix minor punctuation mistakes

* Fix articles and other minor grammar mistakes

* Fix minor spelling mistakes

---------

Co-authored-by: ilyaigpetrov <ilyaigpetrov@gmail.com>
2024-05-13 21:17:41 +05:00
ilyaigpetrov
884b4f0fbc Fix spelling mistakes 2024-05-13 18:23:28 +05:00
ilyaigpetrov
770c4ab47d Bump 0.0.1.65 2024-05-13 18:22:24 +05:00
ilyaigpetrov
c5d9ca3254 Bump 0.0.1.64 2024-04-24 20:27:34 +05:00
ilyaigpetrov
27ad6944e0 Add consent screen 2024-04-24 20:15:14 +05:00
ilyaigpetrov
a589568bf9 Fix obsolete button title 2024-04-24 20:12:36 +05:00
ilyaigpetrov
b3585293a7 Replace the expired antizapret.info with rublacklist/roskomsvoboda registry of blocked sites 2024-03-29 22:25:22 +05:00
ilyaigpetrov
fd45db7dcc Rename the file for reviwers 2024-03-29 22:25:22 +05:00
ilyaigpetrov
65eb930682 Update AntiZapret urls 2024-03-29 22:25:22 +05:00
ilyaigpetrov
d3156175d8 Remove remnants of rebrand.ly shortened urls 2024-03-29 22:25:22 +05:00
ilyaigpetrov
c0862ecfff Bump 0.0.1.63 2024-03-29 22:25:22 +05:00
ilyaigpetrov
75d30ba467 Bump 0.0.1.62 2023-05-05 19:19:31 +05:00
ilyaigpetrov
a7e93d8383 Bump 0.0.1.61 2023-05-05 19:00:22 +05:00
ilyaigpetrov
b3096c8d83 Fix buggy update logic 2023-05-05 18:39:21 +05:00
ilyaigpetrov
ae930da8b3 Get rid of rebrand.ly everywhere in the code 2023-05-05 00:07:37 +05:00
ilyaigpetrov
451691ef2a Upgrade webpack 2023-05-04 23:37:28 +05:00
ilyaigpetrov
6e8943ca1c Bump 0.0.1.60 2023-04-26 05:31:12 +05:00
ilyaigpetrov
61f22e08be Replace 2 shortened links to resolved versions 2023-04-26 05:30:34 +05:00
ilyaigpetrov
b45a78e654 Bump 0.0.1.59 2023-04-26 05:25:17 +05:00
ilyaigpetrov
08e1b41780 Add another source for AntiZapret. Add AZ proxy for twitter to block-informer. Replace some rebrand.ly links (blocked on TSPU) 2023-04-26 05:16:43 +05:00
ilyaigpetrov
e5fb9d11dd Bump 0.0.1.58 2023-04-26 05:13:56 +05:00
ilyaigpetrov
689f9266f7 Add one more source for AntiZapret. Delete old update code. Move notes for reviewers from README to a separate file 2023-04-25 22:59:20 +05:00
ilyaigpetrov
6858c56534 Revert "Add Alt+P hotkey stub"
This reverts commit 3d72acc6dd.
2023-04-11 19:56:44 +05:00
ilyaigpetrov
7f9fb4f972
Update README.md 2022-10-02 18:45:41 +05:00
ilyaigpetrov
0e803bd08f
Replace some rebrandly links with direct links 2022-09-15 18:34:45 +05:00
ilyaigpetrov
6ef5807971
Add a link to the issue with alternative install methods (the default one is blocked for WebStore) 2022-09-14 16:21:53 +00:00
ilyaigpetrov
97adb7f3f4
Remove a maxim and a belief under "Why I do this" 2022-06-25 14:41:08 +00:00
ilyaigpetrov
db8dfbfd50
Remove Open Collective from GitHub FUNDING 2022-05-19 20:22:36 +05:00
ilyaigpetrov
3d72acc6dd Add Alt+P hotkey stub 2022-03-09 21:43:08 +05:00
ilyaigpetrov
0d7678ff50 Bump 0.0.1.57 2022-03-09 20:32:01 +05:00
ilyaigpetrov
edf6fc8b5f
Update README.md 2022-02-19 19:56:30 +05:00
ilyaigpetrov
0951e83dd1
Update README.md 2022-02-13 13:08:58 +00:00
ilyaigpetrov
79049bed25
Update README.md 2022-02-13 13:08:27 +00:00
ilyaigpetrov
951a5e9248 Update some deps for better security 2021-11-28 13:25:51 +00:00
ilyaigpetrov
6634f72580 Bump 0.0.1.56 2021-11-08 16:20:23 +00:00
ilyaigpetrov
aac0182738 Restrict min version for FireFox. r/ /%20/g in an url. Add link to the generator to README 2021-11-08 16:19:44 +00:00
ilyaigpetrov
8f00516d44 Merge branch 'work-even-if-dns-fails' into development 2021-09-15 16:30:18 +00:00
ilyaigpetrov
1265a3ad79 Bump 0.0.1.55 2021-09-15 16:29:37 +00:00
ilyaigpetrov
93aa084de9 Fix the bug with non-descriptive warnings. Make DNS errors non-critical 2021-09-15 16:27:23 +00:00
ilyaigpetrov
cb0d991e94 A fix for yandex browser(startsWith applied to undefined) 2021-09-12 09:03:49 +00:00
ilyaigpetrov
b77be60946 Trying to trace bug with non-descriptive warnings 2021-09-12 07:41:15 +00:00
ilyaigpetrov
1aec32de3e Add backup url for antizapret pac-script 2021-08-31 15:58:16 +00:00
ilyaigpetrov
86d07b79c3 make extension robust to dns failures (test0) 2021-08-27 16:19:50 +00:00
ilyaigpetrov
5b3e6f1f51 Break dns url for testing, don't fail on dns failure
In this commit all dns errors a swallowed during install
2021-08-27 15:28:03 +00:00
ilyaigpetrov
ce22337928 Bump 0.0.1.54 2021-08-27 14:06:11 +00:00
29 changed files with 2652 additions and 3503 deletions

4
.github/FUNDING.yml vendored
View File

@ -2,11 +2,11 @@
github: # ilyaigpetrov
patreon: # Replace with a single Patreon username
open_collective: anticensority
open_collective:
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: https://rebrand.ly/ac-donate
custom: https://github.com/anticensority/runet-censorship-bypass/wiki/Поддержать

View File

@ -1,7 +1,7 @@
If you __unstar__, please, [leave us a note](https://github.com/anticensority/runet-censorship-bypass/issues) why you do so.
[d1]: https://img.shields.io/badge/Поддержать-❤-green.svg
[d2]: https://rebrand.ly/ac-donate
[d2]: https://github.com/anticensority/runet-censorship-bypass/wiki/Поддержать
[![Поддержать][d1]][d2]
[![Backers on Open Collective](https://opencollective.com/anticensority/backers/badge.svg)](#backers)
@ -9,7 +9,7 @@ If you __unstar__, please, [leave us a note](https://github.com/anticensority/ru
# Russian Anticensorship on PAC-Scripts
This repo contains a chrome extension to bypass censorship in Russia: [WebStore](https://chrome.google.com/webstore/detail/npgcnondjocldhldegnakemclmfkngch)
This repo contains an extension for Chromium and FireFox that helps to bypass censorship in Russia: [WebStore](https://chrome.google.com/webstore/detail/npgcnondjocldhldegnakemclmfkngch)
| [Sources](./extensions/chromium/runet-censorship-bypass).
This extension uses pac scripts, one of which (anticensority) is generated by this [pac-generator].
@ -17,29 +17,29 @@ This extension uses pac scripts, one of which (anticensority) is generated by th
## Install / Установка
1. [Chrome Web Store](https://rebrand.ly/ac-webstore)
2. [Chrome Web Store (MINI)](https://rebrand.ly/ac-webstore-mini)
3. [Microsoft Edge Add-ons](https://rebrand.ly/ac-msstore)
4. [Microsoft Edge Add-ons (MINI)](https://rebrand.ly/ac-msstore-mini)
5. [FireFox Add-ons (Beta)](https://rebrand.ly/ac-firefox)
1. [Chrome Web Store](https://chrome.google.com/webstore/detail/обход-блокировок-рунета/npgcnondjocldhldegnakemclmfkngch)
2. [Chrome Web Store (MINI)](https://chrome.google.com/webstore/detail/обход-блокировок-рунета-м/gnknjnebjldmkpmlhjipalimhjofpgho)
3. [Microsoft Edge Add-ons](https://microsoftedge.microsoft.com/addons/detail/обход-блокировок-рунета/ajgpnodjpffiagcfmifildjpoaeiobfh)
4. [Microsoft Edge Add-ons (MINI)](https://microsoftedge.microsoft.com/addons/detail/обход-блокировок-рунета-м/cjppllmpmkpjfchbaoebeneghcbmlibj)
5. [FireFox Add-ons](https://addons.mozilla.org/ru/firefox/addon/обход-блокировок-рунета/).
6. Opera: сначала [установщик расширений из WebStore](https://addons.opera.com/ru/extensions/details/install-chrome-extensions/) (от команды Opera), затем см. пункты 1 и 2 выше.
7. Пакеты для автономной (offline) установки / Packages for offline installation: https://github.com/anticensority/runet-censorship-bypass/releases.
Из-за блокировок адресов Google расширение может не устанавливаться из WebStore. Подробности и способы установки см. https://github.com/anticensority/runet-censorship-bypass/wiki/Автономная-установка-расширения.
## Why I do This
I believe __information mustn't be blocked based on political or other subjective views__.
My maxim is _"Your freedom ends when it starts to confine the freedom of others"_.
See [my other arguments against censorship (ru)](https://rebrand.ly/ac-arguments)
See [my arguments against censorship (ru)](https://github.com/anticensority/runet-censorship-bypass/wiki/Почему-мы-это-делаем%3F-Аргументы-против-цензуры).
Looking at how Russian government [distorts TV](https://therussianreader.wordpress.com/2015/11/22/russian-truckers-strike-dagestan/) and blocks [critics of Putin](https://www.reuters.com/article/us-russia-internet-idUSBREA2C21L20140313),
I decided to write an anticensorship extension for Chromium before they strike me first.
I decided to write an anti-censorship extension for Chromium before they strike me first.
## How it Works
0. PAC script is a JavaScript file, triggered on every URL request, which says browser which proxy to use if any for this particular URL.
1. The Chrome Extension sets PAC script in browser settings and keeps it synced with PAC script on the server (offering Antizapret (hosted on a dedicated server) or Anticensority (hosted on GitHub)).
2. On every request PAC script checks if host is blocked or if its IP is blocked.
3. If address is blocked PAC script returns proxy server to the browser. Antizapret PAC-script uses its own proxy servers and Anticensority PAC-script uses local Tor.
0. PAC script is a JavaScript file, triggered on every URL request, which tells the browser which proxy to use if any for this particular URL.
1. The Chrome Extension sets the PAC-script in browser settings and keeps it synced with the PAC script on the server. It offers Antizapret (hosted on a dedicated server) or Anticensority (hosted on GitHub) built-in PAC scripts for the user choice.
2. On every request the PAC script checks if the host is blocked or if its IP is blocked.
3. If an address is blocked, the PAC script returns the proxy server to the browser. The Antizapret PAC script uses its own proxy servers and the Anticensority PAC-script uses local Tor.
4. PAC scripts on servers are updated periodically from https://github.com/zapret-info/z-i.
## Contributors

View File

@ -23,17 +23,7 @@ npm start
# For Reviewers
Steps to reproduce the same zip:
```
npm ci
cd src/extension-common/pages/options/
npm ci
cd -
npm start
# See ./build/extension-full
cd ./build/extension-full
zip -r runet-censorship-bypass-full.zip ./*
```
See ./src/extension-common/FOR_REVIEWERS.md.
# Release Instructions

File diff suppressed because it is too large Load Diff

View File

@ -280,9 +280,20 @@ console.log('Extension started.');
const compareVersions = (a, b) => versionToInt(a) - versionToInt(b);
const ifFirefox = navigator.userAgent.toLowerCase().includes('firefox');
let give;
const promise = !ifFirefox ? Promise.resolve() : new Promise((resolve) => {
give = resolve;
});
window.apis = {
consent: {
promise,
give,
},
platform: {
ifFirefox: navigator.userAgent.toLowerCase().includes('firefox'),
ifFirefox,
},
version: {
ifMini: false,

View File

@ -67,7 +67,7 @@
const json = JSON.stringify(errors, errorJsonReplacer, 0);
window.utils.openAndFocus(
'https://rebrand.ly/ac-error/?json=' + encodeURIComponent(json) +
'https://anticensority.github.io/error/?json=' + encodeURIComponent(json) +
(type ? '&type=' + encodeURIComponent(type) : '') +
'&version=' + chrome.runtime.getManifest().version +
'&useragent=' + encodeURIComponent(navigator.userAgent) +

View File

@ -101,7 +101,7 @@
dflt: false,
category: 'ownProxies',
label: 'использовать СВОЙ локальный Tor',
desc: 'Установите <a href="https://rebrand.ly/ac-tor">Tor</a> на свой компьютер и используйте его как прокси-сервер. <a href="https://rebrand.ly/ac-tor">ВАЖНО</a>.',
desc: 'Установите <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Расширение-и-TOR">Tor</a> на свой компьютер и используйте его как прокси-сервер. <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Расширение-и-TOR#важно">ВАЖНО</a>.',
order: 5,
},
ifUseLocalWarp: {
@ -137,7 +137,7 @@
dflt: '',
category: 'ownProxies',
label: 'использовать СВОИ прокси',
url: 'https://rebrand.ly/ac-own-proxy',
url: 'https://github.com/anticensority/runet-censorship-bypass/wiki/Свои-прокси-в-расширении',
order: 7,
},
ifUseOwnProxiesOnlyForOwnSites: {
@ -160,7 +160,7 @@
dflt: false,
category: 'ownProxies',
label: 'подменять DIRECT на',
desc: 'Использовать в PAC-скрипте указанную строку для запросов напрямую (вместо директивы DIRECT). Данная строка не проверяется на требования к шифрованию связи до прокси! Строка должна соответствовать формату возвращаемого значения PAC-скрипта, который подобен <a href="https://rebrand.ly/ac-own-proxies#user-content-Формат">формату своих прокси</a>.',
desc: 'Использовать в PAC-скрипте указанную строку для запросов напрямую (вместо директивы DIRECT). Данная строка не проверяется на требования к шифрованию связи до прокси! Строка должна соответствовать формату возвращаемого значения PAC-скрипта, который подобен <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Свои-прокси-в-расширении#формат">формату своих прокси</a>.',
order: 9,
},

View File

@ -138,7 +138,6 @@
if (err) {
if (err.message === 'proxy.settings requires private browsing permission.') {
// window.utils.openAndFocus('https://rebrand.ly/ac-allow-private-windows');
clarifyThen(
chrome.i18n.getMessage('AllowExtensionToRunInPrivateWindows'),
cb,
@ -230,7 +229,7 @@
);
return (ifUnattended
? tryPromiseSeveralTimesAsync(tryAllUrlsAsync, [20, 40, 60])
: tryAllUrlsAsync()
: tryAllUrlsAsync()
).catch(
(err) => Promise.reject(clarify(
err,
@ -267,15 +266,20 @@
? \`Основной PAC-скрипт от автора проекта «Антизапрет».
Охватывет меньше сайтов.
Блокировка определяется по доменному имени и при необходимости по IP.
<br/> <a href="https://rebrand.ly/ac-pacs">Сравнение PAC-скриптов</a>.
<br/> <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Сравнение PAC-скриптов</a>.
\`
: \`The main PAC-script from the author of project "Antizapret"\.
Covers fewer sites.
Block is detected based on a domain name and, if necessary, on an IP.
<br/> <a href="https://rebrand.ly/ac-pacs">Comparison of PAC-scripts (ru)</a>.
<br/> <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Comparison of PAC-scripts (ru)</a>.
\`,
order: 0,
pacUrls: ['https://antizapret.prostovpn.org/proxy.pac'],
pacUrls: [
'https://e.cen.rodeo:8443/proxy.pac',
'https://antizapret.prostovpn.org:8443/proxy.pac',
'https://antizapret.prostovpn.org:18443/proxy.pac',
'https://antizapret.prostovpn.org/proxy.pac',
],
},
Антицензорити: {
distinctKey: 'Anticensority',
@ -285,13 +289,13 @@
Охватывает больше сайтов.
Блокировка определятся по доменному имени или IP адресу.
Подходит для провайдеров, блокирующих все сайты на одном IP.
<br/> <a href="https://rebrand.ly/ac-pacs">Сравнение PAC-скриптов</a>.
<br/> <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Сравнение PAC-скриптов</a>.
\`
: \`Alternative PAC-script from the author of this extension.
Covers more sites.
Block is detected based on a domain name and on an IP address.
Better fits providers that block all sites on one IP.
<br/> <a href="https://rebrand.ly/ac-pacs">Comparison of PAC-scripts (ru)</a>.
<br/> <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Comparison of PAC-scripts (ru)</a>.
\`,
order: 1,
@ -469,25 +473,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),
);
@ -572,6 +579,14 @@
// ON EACH LAUNCH, STARTUP, RELOAD, UPDATE, ENABLE
(async () => {
let ifConsentGiven = await window.utils.promisedLocalStorage.get('ifConsentGiven');
if (!ifConsentGiven) {
window.utils.openAndFocus('/pages/consent/index.html');
await window.apis.consent.promise;
ifConsentGiven = true
await window.utils.promisedLocalStorage.set({ ifConsentGiven });
}
let oldAntiCensorRu = await window.utils.promisedLocalStorage.get('antiCensorRu') || {};
const otherKeys = [
@ -582,34 +597,6 @@
'handlers-ext-error',
'handlers-no-control',
];
if (!Object.keys(oldAntiCensorRu).length) {
const storage = await window.utils.promisedLocalStorage.get(null);
if (storage.version && window.apis.version.isLeq(storage.version, '0.0.1.48')) {
const ffxPacData = storage['firefox-only-pac-data'];
delete storage['firefox-only-pac-data'];
await window.utils.promisedLocalStorage.clear();
for(const key of otherKeys) {
await window.utils.promisedLocalStorage.set({ [key]: storage[key] });
delete storage[key];
}
await window.utils.promisedLocalStorage.set({ antiCensorRu: storage });
oldAntiCensorRu = storage;
}
}
if (oldAntiCensorRu.version && window.apis.version.isLeq(oldAntiCensorRu.version, '0.0.1.49')) {
const modsMutated = window.apis.pacKitchen.getPacModsRaw();
if (modsMutated && modsMutated.exceptions) {
modsMutated.exceptions = Object.entries(modsMutated.exceptions).reduce((acc, [host, ifProxy]) => {
acc[\`*.\${host}\`] = ifProxy;
return acc;
}, {});
await new Promise(
(resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve),
);
}
}
/*
Event handlers that ALWAYS work (even if installation is not done
or failed).
@ -700,54 +687,14 @@
console.log('Updating from', oldAntiCensorRu.version, 'to', antiCensorRu.version);
try {
if (window.apis.version.isLeq(oldAntiCensorRu.version, '0.0.1.5')) {
// Change semicolons to semicolons followed by newlines in proxy string (raw).
const migrateProxies = (oldStr) => oldStr.replace(/;\\r?\\n?/g, ';\\n');
const modsMutated = window.apis.pacKitchen.getPacModsRaw();
if (modsMutated) {
modsMutated['customProxyStringRaw'] = migrateProxies(modsMutated['customProxyStringRaw']);
await new Promise(
(resolve) => window.apis.pacKitchen.keepCookedNowAsync(modsMutated, resolve),
);
}
}
if (window.apis.version.isLeq(oldAntiCensorRu.version, '0.0.1.25')) {
console.log('Switch to Antizapret automatically, only from Anitcensority without own proxies.');
const provKey = antiCensorRu.getCurrentPacProviderKey();
if (provKey !== 'Антицензорити' && provKey !== 'Антизапрет') {
console.log('Current provider', provKey, '!== Anticensority or Antizapret');
return; // Not Anticensority.
}
const pacMods = window.apis.pacKitchen.getPacMods();
if (pacMods.filteredCustomsString) {
console.log('Proxies found:', pacMods.filteredCustomsString);
return; // Own proxies or Tor are used.
}
antiCensorRu.setCurrentPacProviderKey('Антизапрет');
antiCensorRu.setLastModified(0);
await new Promise((resolveSwitch) =>
antiCensorRu.syncWithPacProviderAsync((err, res, warns) => {
if (warns) {
console.log(warns);
}
if (err) {
console.log(
'Ungraceful update from 1.25: couldn\\'t fetch Antizapret:',
);
console.error(err);
} else {
console.log('Update from 1.25 applied successfully.');
}
resolveSwitch();
}),
);
if (window.apis.version.isLeq(oldAntiCensorRu.version, '0.0.1.62')) {
window.apis.antiCensorRu.pacProviders['Антизапрет'].pacUrls = [
'https://e.cen.rodeo:8443/proxy.pac',
'https://antizapret.prostovpn.org:8443/proxy.pac',
'https://antizapret.prostovpn.org:18443/proxy.pac',
'https://antizapret.prostovpn.org/proxy.pac',
];
console.log('Successfully updated to 0.0.1.63.');
}
} catch (e) {
// Log update error.

View File

@ -13,7 +13,7 @@
order: 0,
},
hostTracker: {
googleCache: {
title: 'Из кэша Google',
getUrl: (blockedUrl) => 'http://webcache.googleusercontent.com/search?q=cache:' + blockedUrl,
order: 1,
@ -27,19 +27,19 @@
otherUnblock: {
title: 'Разблокировать по-другому',
getUrl: (blockedUrl) => ('https://rebrand.ly/ac-unblock#' + blockedUrl),
getUrl: (blockedUrl) => ('https://anticensority.github.io/unblock#' + blockedUrl),
order: 3,
},
antizapretInfo: {
title: 'Сайт в реестре блокировок?',
getUrl: (blockedUrl) => 'https://antizapret.info/index.php?search=' + new URL(blockedUrl).hostname,
getUrl: (blockedUrl) => 'https://reestr.rublacklist.net/?q=' + new URL(blockedUrl).hostname,
order: 4,
},
support: {
title: 'Документация / Помощь / Поддержка',
getUrl: (blockedUrl) => 'https://git.io/ac-wiki',
getUrl: (blockedUrl) => 'https://github.com/anticensority/runet-censorship-bypass/wiki',
order: 99,
},

View File

@ -0,0 +1,48 @@
# For Reviewers
## Prerequirements
* You need a globally installed `gulp-cli@3.0.0`.
See https://gulpjs.com/docs/en/getting-started/quick-start#install-the-gulp-command-line-utility.
* Node v21.7.3
* NPM 10.5.0
## Steps
Steps to reproduce the same zip:
```
npm ci
cd src/extension-common/pages/options/
npm ci
cd -
npm start
# See ./build/extension-full
cd ./build/extension-full
zip -r runet-censorship-bypass-full.zip ./*
```
## Minified Files
### Ace Editor
https://ace.c9.io -> https://github.com/ajaxorg/ace -> Building Ace -> "The ace-builds repository endeavours to maintain the latest build" -> https://github.com/ajaxorg/ace-builds/ -> Select tag of 1.2.5, open https://github.com/ajaxorg/ace-builds/tree/v1.2.5/src-min and download the files you want to check.
```
mkdir downloaded
cd downloaded
wget https://raw.githubusercontent.com/ajaxorg/ace-builds/v1.2.5/src-min/ace.js
wget https://raw.githubusercontent.com/ajaxorg/ace-builds/v1.2.5/src-min/ext-searchbox.js
wget https://raw.githubusercontent.com/ajaxorg/ace-builds/v1.2.5/src-min/mode-javascript.js
wget https://raw.githubusercontent.com/ajaxorg/ace-builds/v1.2.5/src-min/worker-javascript.js
downloaded$ for i in ./*; do md5sum "$i"; done
2b9a1157bb3ba711a0402b6751d9ac71 ./ace.js
1f73efaff2853571af0e701c5e9a15ee ./ext-searchbox.js
e5eebd85c4e66667c28f124e6a07e3ed ./mode-javascript.js
f0d1342102d16ab7abe319b2683d10ea ./worker-javascript.js
```
## PAC-Script AntiZapret
https://antizapret.prostovpn.org/proxy.pac (old) and https://e.cen.rodeo:8443/proxy.pac (new) are generated by https://bitbucket.org/anticensority/antizapret-pac-generator-light/, reviewers may find justifications related to this PAC-script in that repo.

View File

@ -1 +0,0 @@
Files of this directory must be copied into final build without modifications.

View File

@ -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"
@ -138,6 +138,6 @@
"message": "Proxying of OWN sites is possible only via OWN proxies. No own proxies found that satisfy your requirements."
},
"AllowExtensionToRunInPrivateWindows": {
"message": "For the extension to work it is required to allow it to run in private windows, see <a href='https://rebrand.ly/ac-allow-private-windows'>a HOWTO</a>."
"message": "For the extension to work it is required to allow it to run in private windows, see <a href='https://github.com/anticensority/runet-censorship-bypass/wiki/Как-разрешить-запуск-расширения-в-приватных-окнах-|-How-to-allow-extension-to-run-in-private-windows'>a HOWTO</a>."
}
}

View File

@ -87,7 +87,7 @@
"message": "Ошибка"
},
"Non_critical_error": {
"message": "Некритичная ошибка"
"message": "Некритичная ошибка. Всё хорошо, продолжаем работу"
},
"Donate": {
"message": "Поддержать"
@ -138,6 +138,6 @@
"message": "Проксировать СВОИ сайты можно только при наличии СВОИХ прокси. Нет своих прокси, удовлетворяющих вашим требованиям."
},
"AllowExtensionToRunInPrivateWindows": {
"message": "Для работы расширения необходимо разрешить запуск в приватных окнах, см. <a href='https://rebrand.ly/ac-allow-private-windows'>инструкции</a>."
"message": "Для работы расширения необходимо разрешить запуск в приватных окнах, см. <a href='https://github.com/anticensority/runet-censorship-bypass/wiki/Как-разрешить-запуск-расширения-в-приватных-окнах-|-How-to-allow-extension-to-run-in-private-windows'>инструкции</a>."
}
}

View File

@ -22,6 +22,11 @@
${extra_permissions}
],
"minimum_chrome_version": "55.0.0.0",
"browser_specific_settings": {
"gecko": {
"strict_min_version": "91.1.0"
}
},
"background": {
${persistent}

View File

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" type="image/x-icon" href="./ribbon-128.ico">
<meta charset="utf-8">
<title>Согласие на сбор данных / Data Collection Consent</title>
<style>
p, ol { font-size: 16px }
</style>
</head>
<body>
<div style="margin: 0 auto; max-width: 35rem; text-align: justify; font-family: sans-serif">
<img src="./ribbon-128.png">
<h1>Согласие на сбор данных / Data Collection Consent</h1>
<p>
Этот документ написан на двух языках. Английский предпочтительней.
</p>
<p>
This document is written in two languages. English is preferable.
</p>
<p>
Привет! На связи команда разработчиков браузерного расширения «Обход блокировок Рунета».
Вы либо только что установили расширение, либо только что обновились до новой версии.
По новым правилам мы <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Зачем-нам-согласие-со-сбором-данных%3F">должны</a>
получить от вас согласие на сбор ваших данных и передачу их
третьим лицам.
</p>
<p>
Hi! It's "Runet Censorship Bypass" browser extension developers team.
You have just installed the extension or just updated to a new version.
According to the new requirements we <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Зачем-нам-согласие-со-сбором-данных%3F">have to</a> get your consent before collecting your data and
sharing it with 3rd parties.
</p>
<p>
Сообщаем вам, что после первого запуска расширения и при дальнейшем его использовании
настроенные в нём PAC-скрипты и прокси-сервера могут собирать или уже* собирают
некоторые ваши данные. Какие именно, зависит от выбранного вами поставщика этих ресурсов,
так что рекомендуем ознакомиться с их соответствующей политикой конфиденциальности (Privacy
Policy).
<br>
* Если вы установили и пользовалсись расширением уже некоторое время. Этого экрана согласия не
было в старых версиях.
</p>
<p>
We inform you that starting from the first launch of the extension and on further usage chosen
PAC-scripts and proxy-servers may collect or are already* collecting some of your data. Which
exactly depends on the chosen provider of these resources so we recommend you to get
acquainted with their corresponding Privacy Policy.
<br>
* If you have installed and have been using the extension for some time already. This consent
screen wasn't shown in the old versions.
</p>
<p>
При первом запуске и по умолчанию будут использоваться PAC-скрипт и встроенные в него
прокси-сервера, предоставляемые <a href="https://antizapret.prostovpn.org:8443">проектом
"АнтиЗапрет"</a>, — политику конфиденциальности этого решения см. в
<a href="https://antizapret.prostovpn.org:8443/faq.html">FAQ</a> под заголовком "Какие данные
собирает сервис и каким образом они используются?".
</p>
<p>
On the first launch and by default the PAC-script and its built-in proxy-servers provided by
<a href="https://antizapret.prostovpn.org:8443">project "AntiZapret" (RU)</a> will be used, —
see its Privacy Policy in
<a href="https://antizapret.prostovpn.org:8443/faq.html">the FAQ (RU)</a> under the title
"Какие данные собирает сервис и каким образом они используются?". Its translation to EN is
present in the Privacy Policy of the extension.
</p>
<p>
Политику конфиденциальности самого расширения см.
<a
href="https://github.com/anticensority/runet-censorship-bypass/wiki/Privacy-Policy-|-Политика-конфиденциальности"
>здесь (EN)</a>.
</p>
<p>
See the Privacy Policy of this extension
<a
href="https://github.com/anticensority/runet-censorship-bypass/wiki/Privacy-Policy-|-Политика-конфиденциальности"
>here</a>.
</p>
<p>
В расширении представлены кнопки / There are these buttons in the extension:
</p>
<ol>
<li>
"Через Google Translate" / "Via Google Translate"
</li><li>
"Из кэша Google" / "From Google Cache"
</li><li>
"Из архива archive.org" / "From archive.org archive"
</li><li>
"Разблокировать по-другому" / "Unblock another way"
</li><li>
"Сайт в реестре блокировок?" / "Is site in the registry of blockings?"
</li>
</ol>
<p>
Все эти кнопки передают URL-адрес текущей вкладки в соответствующие службы. /
All these buttons share URL-address of the current tab with corresponding services.
</p>
<button id="agreeBtn">Разрешаю собирать заявленные данные / Allow claimed data collection
</button>
<button id="rejectBtn">Нет, удалите расширение / No, delete this extension
</button>
</div>
<script src="./index.js"></script>
<script src="../lib/keep-links-clickable.js"></script>
</body>
</html>

View File

@ -0,0 +1,14 @@
'use strict';
chrome.runtime.getBackgroundPage( (backgroundPage) =>
backgroundPage.apis.errorHandlers.installListenersOn(
window, 'CONSENT', () => {
agreeBtn.onclick = () => {
backgroundPage.apis.consent.give();
window.close();
}
rejectBtn.onclick = () =>
chrome.management.uninstallSelf();
},
),
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -16,11 +16,12 @@
"inferno": "~3.2.0",
"inferno-component": "^3.10.1",
"inferno-create-element": "^3.10.1",
"webpack": "^2.5.1"
"webpack": "^5.82.0",
"webpack-cli": "^5.0.2"
},
"scripts": {
"check": "flow status",
"build:prod": "webpack --define process.env.NODE_ENV=\"'production'\" --env=prod",
"build:prod": "webpack --node-env=\"'production'\" --env=prod",
"build:dev:nocomp": "NODE_ENV=development webpack --define process.env.NODE_ENV=\"'development'\" --env=dev",
"build:dev": "NODE_ENV=development webpack --debug --define process.env.NODE_ENV=\"'development'\" --output-pathinfo --env=dev",
"gulp": "cd .. && npm run gulp",

View File

@ -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);

View File

@ -27,7 +27,7 @@ export default function getFooter(theState) {
<footer class={scopedCss.controlRow + ' horFlex nowrap'}>
<input type="button" value={chrome.i18n.getMessage('Finish')} disabled={props.ifInputsDisabled} style={{ display: theState.flags.ifInsideEdgeOptionsPage ? 'none' : 'initial' }} onClick={() => window.close()} />
<a href="https://rebrand.ly/ac-donate">{chrome.i18n.getMessage('Donate')}</a>
<a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Поддержать">{chrome.i18n.getMessage('Donate')}</a>
<a data-in-bg="false" href="../troubleshoot/index.html">
{chrome.i18n.getMessage('ProblemsQ')}
</a>

View File

@ -145,9 +145,9 @@ export default function getPacChooser(theState) {
<div class={scopedCss.fullLineHeight}>
{
props.flags.ifMini
? (<a class={scopedCss.otherVersion + ' emoji'} href="https://rebrand.ly/ac-versions"
? (<a class={scopedCss.otherVersion + ' emoji'} href="https://github.com/anticensority/runet-censorship-bypass/wiki/Различные-версии-расширения"
title={chrome.i18n.getMessage("FullVersion")}>🏋</a>)
: (<a class={scopedCss.otherVersion + ' emoji'} href="https://rebrand.ly/ac-versions"
: (<a class={scopedCss.otherVersion + ' emoji'} href="https://github.com/anticensority/runet-censorship-bypass/wiki/Различные-версии-расширения"
title={chrome.i18n.getMessage("VersionForSlowMachines")}>🐌</a>)
}
</div>

View File

@ -363,7 +363,7 @@ export default function getProxyEditor(theState) {
}
</tbody>
</table>
<a href="https://rebrand.ly/ac-protected-proxy">Запароленные прокси?</a>
<a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Прокси-и-пароль">Запароленные прокси?</a>
</form>
);
}

View File

@ -43,7 +43,7 @@ chrome.runtime.getBackgroundPage( (bgWindow) =>
// winChrome.runtime.sendMessage({ currentTab, eventName: 'POPUP_OPENED' });
theState.flags.ifInsideOptionsPage = !(currentTab && currentTab.url) || /.*:\/\/extensions\/\?options=/g.test(currentTab.url) || currentTab.url.startsWith('about:addons');
theState.flags.ifInsideEdgeOptionsPage = theState.flags.ifInsideOptionsPage && currentTab && currentTab.url.startsWith('edge://');
theState.flags.ifInsideEdgeOptionsPage = theState.flags.ifInsideOptionsPage && currentTab && currentTab.url && currentTab.url.startsWith('edge://');
theState.currentTab = currentTab;

View File

@ -10,12 +10,12 @@
<ol>
<li><a data-in-bg="false" href class="view-errors">Детали последних ошибок</a></li>
<li><a data-in-bg="false" href class="reset-settings">Сбросить настройки</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-support" target="_blank">Файл самопомощи</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-contact">Напишите нам!</a></li>
<li><a data-in-bg="false" href="https://github.com/anticensority/runet-censorship-bypass/wiki/Если-расширение-не-работает" target="_blank">Файл самопомощи</a></li>
<li><a data-in-bg="false" href="https://groups.google.com/g/anticensority">Напишите нам!</a></li>
</ol>
<h2>Для продвинутых</h2>
<ol>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-logs">Как прочитать логи?</a></li>
<li><a data-in-bg="false" href="https://github.com/anticensority/runet-censorship-bypass/wiki/Как-прочитать-логи%3F-%28для-продвинутых%29">Как прочитать логи?</a></li>
<li><a data-in-bg="false" href="../debug/index.html">Отладка PAC-скрипта</a></li>
</ol>
<hr/>
@ -23,12 +23,12 @@
<ol>
<li><a data-in-bg="false" href class="view-errors">Details of last errors</a></li>
<li><a data-in-bg="false" href class="reset-settings">Reset settings</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-support" target="_blank">Troubleshoot guide (ru)</a></li>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-contact">Write to us!</a></li>
<li><a data-in-bg="false" href="https://github.com/anticensority/runet-censorship-bypass/wiki/Если-расширение-не-работает" target="_blank">Troubleshoot guide (ru)</a></li>
<li><a data-in-bg="false" href="https://groups.google.com/g/anticensority">Write to us!</a></li>
</ol>
<h2>Advanced</h2>
<ol>
<li><a data-in-bg="false" href="https://rebrand.ly/ac-logs">How to read logs?</a></li>
<li><a data-in-bg="false" href="https://github.com/anticensority/runet-censorship-bypass/wiki/Как-прочитать-логи%3F-%28для-продвинутых%29">How to read logs?</a></li>
<li><a data-in-bg="false" href="../debug/index.html">PAC-script debugging</a></li>
</ol>
<script src="./index.js"></script>

View File

@ -71,10 +71,13 @@
privates._strToHostObj = [
/* Please, don't use proxies directly (without PAC-script). */
'n.thenewone.lol',
's.thenewone.lol',
// antizapret.prostovpn.org:
'proxy.antizapret.prostovpn.org',
'proxy-ssl.antizapret.prostovpn.org',
'proxy-nossl.antizapret.prostovpn.org',
'proxy-fbtw-ssl.antizapret.prostovpn.org',
].reduce((acc, hostname) => Object.assign(acc, { [hostname]: { host: hostname }}), {
// Defaults:
localhost: { host: 'localhost' },
@ -231,12 +234,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 +275,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) {

View File

@ -68,7 +68,7 @@
)
);
const popupPrefix = chrome.runtime.getURL(`/pages/options/index.html?status=<span style="color: red">🔥 Прокси-сервер отказался обслуживать запрос к `);
const popupPrefix = chrome.runtime.getURL(`/pages/options/index.html?status=<span style="color: red">🔥 Прокси-сервер отказался обслуживать запрос к%20`);
if (decodeURIComponent(oldPopup).startsWith(popupPrefix)) {
return true;
}

View File

@ -5,12 +5,10 @@ const pacUrls = [
'https://anticensority.github.io/generated-pac-scripts/anticensority.pac',
// GitHub repo (anticensority), cached:
'https://raw.githubusercontent.com/anticensority/generated-pac-scripts/master/anticensority.pac',
// First official, shortened, not cached:
'https://rebrand.ly/ac-chrome-anticensority-pac',
];
const commonContext = {
version: '1.53',
version: '1.66',
anticensorityPacUrls: [
...pacUrls,
],
@ -57,7 +55,6 @@ exports.contexts.beta = Object.assign({}, commonContext, {
anticensorityPacUrls: [
'https://raw.githubusercontent.com/anticensority/for-testing/master/anticensority.pac',
'https://anticensority.github.io/for-testing/anticensority.pac',
'https://rebrand.ly/ac-beta-pac',
],
version: '1.14',
versionSuffix: '',