mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2025-04-25 11:53:40 +03:00
Compare commits
No commits in common. "development" and "0.0.1.53-rc0" have entirely different histories.
developmen
...
0.0.1.53-r
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
|
@ -2,11 +2,11 @@
|
|||
|
||||
github: # ilyaigpetrov
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective:
|
||||
open_collective: anticensority
|
||||
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://github.com/anticensority/runet-censorship-bypass/wiki/Поддержать
|
||||
custom: https://rebrand.ly/ac-donate
|
||||
|
|
34
README.md
34
README.md
|
@ -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://github.com/anticensority/runet-censorship-bypass/wiki/Поддержать
|
||||
[d2]: https://rebrand.ly/ac-donate
|
||||
|
||||
[![Поддержать][d1]][d2]
|
||||
[](#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 an extension for Chromium and FireFox that helps to bypass censorship in Russia: [WebStore](https://chrome.google.com/webstore/detail/npgcnondjocldhldegnakemclmfkngch)
|
||||
This repo contains a chrome extension 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://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/Автономная-установка-расширения.
|
||||
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)
|
||||
|
||||
## Why I do This
|
||||
|
||||
See [my arguments against censorship (ru)](https://github.com/anticensority/runet-censorship-bypass/wiki/Почему-мы-это-делаем%3F-Аргументы-против-цензуры).
|
||||
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)
|
||||
|
||||
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 anti-censorship extension for Chromium before they strike me first.
|
||||
I decided to write an anticensorship extension for Chromium before they strike me first.
|
||||
|
||||
## How it Works
|
||||
|
||||
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.
|
||||
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.
|
||||
4. PAC scripts on servers are updated periodically from https://github.com/zapret-info/z-i.
|
||||
|
||||
## Contributors
|
||||
|
|
|
@ -23,7 +23,17 @@ npm start
|
|||
|
||||
# For Reviewers
|
||||
|
||||
See ./src/extension-common/FOR_REVIEWERS.md.
|
||||
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 ./*
|
||||
```
|
||||
|
||||
# Release Instructions
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -280,20 +280,9 @@ 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,
|
||||
ifFirefox: navigator.userAgent.toLowerCase().includes('firefox'),
|
||||
},
|
||||
version: {
|
||||
ifMini: false,
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
const json = JSON.stringify(errors, errorJsonReplacer, 0);
|
||||
|
||||
window.utils.openAndFocus(
|
||||
'https://anticensority.github.io/error/?json=' + encodeURIComponent(json) +
|
||||
'https://rebrand.ly/ac-error/?json=' + encodeURIComponent(json) +
|
||||
(type ? '&type=' + encodeURIComponent(type) : '') +
|
||||
'&version=' + chrome.runtime.getManifest().version +
|
||||
'&useragent=' + encodeURIComponent(navigator.userAgent) +
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
dflt: false,
|
||||
category: 'ownProxies',
|
||||
label: 'использовать СВОЙ локальный Tor',
|
||||
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>.',
|
||||
desc: 'Установите <a href="https://rebrand.ly/ac-tor">Tor</a> на свой компьютер и используйте его как прокси-сервер. <a href="https://rebrand.ly/ac-tor">ВАЖНО</a>.',
|
||||
order: 5,
|
||||
},
|
||||
ifUseLocalWarp: {
|
||||
|
@ -137,7 +137,7 @@
|
|||
dflt: '',
|
||||
category: 'ownProxies',
|
||||
label: 'использовать СВОИ прокси',
|
||||
url: 'https://github.com/anticensority/runet-censorship-bypass/wiki/Свои-прокси-в-расширении',
|
||||
url: 'https://rebrand.ly/ac-own-proxy',
|
||||
order: 7,
|
||||
},
|
||||
ifUseOwnProxiesOnlyForOwnSites: {
|
||||
|
@ -160,7 +160,7 @@
|
|||
dflt: false,
|
||||
category: 'ownProxies',
|
||||
label: 'подменять DIRECT на',
|
||||
desc: 'Использовать в PAC-скрипте указанную строку для запросов напрямую (вместо директивы DIRECT). Данная строка не проверяется на требования к шифрованию связи до прокси! Строка должна соответствовать формату возвращаемого значения PAC-скрипта, который подобен <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Свои-прокси-в-расширении#формат">формату своих прокси</a>.',
|
||||
desc: 'Использовать в PAC-скрипте указанную строку для запросов напрямую (вместо директивы DIRECT). Данная строка не проверяется на требования к шифрованию связи до прокси! Строка должна соответствовать формату возвращаемого значения PAC-скрипта, который подобен <a href="https://rebrand.ly/ac-own-proxies#user-content-Формат">формату своих прокси</a>.',
|
||||
order: 9,
|
||||
},
|
||||
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
|
||||
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,
|
||||
|
@ -266,20 +267,15 @@
|
|||
? \`Основной PAC-скрипт от автора проекта «Антизапрет».
|
||||
Охватывет меньше сайтов.
|
||||
Блокировка определяется по доменному имени и при необходимости по IP.
|
||||
<br/> <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Сравнение PAC-скриптов</a>.
|
||||
<br/> <a href="https://rebrand.ly/ac-pacs">Сравнение 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://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Comparison of PAC-scripts (ru)</a>.
|
||||
<br/> <a href="https://rebrand.ly/ac-pacs">Comparison of PAC-scripts (ru)</a>.
|
||||
\`,
|
||||
order: 0,
|
||||
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',
|
||||
],
|
||||
pacUrls: ['https://antizapret.prostovpn.org/proxy.pac'],
|
||||
},
|
||||
Антицензорити: {
|
||||
distinctKey: 'Anticensority',
|
||||
|
@ -289,13 +285,13 @@
|
|||
Охватывает больше сайтов.
|
||||
Блокировка определятся по доменному имени или IP адресу.
|
||||
Подходит для провайдеров, блокирующих все сайты на одном IP.
|
||||
<br/> <a href="https://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Сравнение PAC-скриптов</a>.
|
||||
<br/> <a href="https://rebrand.ly/ac-pacs">Сравнение 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://github.com/anticensority/runet-censorship-bypass/wiki/PAC-скрипты:-различия">Comparison of PAC-scripts (ru)</a>.
|
||||
<br/> <a href="https://rebrand.ly/ac-pacs">Comparison of PAC-scripts (ru)</a>.
|
||||
\`,
|
||||
order: 1,
|
||||
|
||||
|
@ -473,28 +469,25 @@
|
|||
reject([err, ...warns]);
|
||||
return;
|
||||
}
|
||||
resolve([err, res, ...warns]);
|
||||
resolve(err, res, ...warns);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
const ipsPromise = !ifUnattended
|
||||
const ipsErrorPromise = !ifUnattended
|
||||
? updateIpsAsync()
|
||||
: tryPromiseSeveralTimesAsync(updateIpsAsync, [20, 40, 60]);
|
||||
|
||||
Promise.all([pacSetPromise, ipsPromise]).then(
|
||||
([[pacErr, pacRes, ...pacWarns], [ipsErr, ipsRes, ...ipsWarns]]) => {
|
||||
Promise.all([pacSetPromise, ipsErrorPromise]).then(
|
||||
([[pacErr, pacRes, ...pacWarns], ipsErr]) => {
|
||||
|
||||
if (pacErr) {
|
||||
if (pacErr && ipsErr) {
|
||||
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),
|
||||
);
|
||||
|
@ -579,14 +572,6 @@
|
|||
|
||||
// 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 = [
|
||||
|
@ -597,6 +582,34 @@
|
|||
'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).
|
||||
|
@ -687,14 +700,54 @@
|
|||
|
||||
console.log('Updating from', oldAntiCensorRu.version, 'to', antiCensorRu.version);
|
||||
try {
|
||||
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.');
|
||||
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();
|
||||
|
||||
}),
|
||||
);
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
// Log update error.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
order: 0,
|
||||
},
|
||||
|
||||
googleCache: {
|
||||
hostTracker: {
|
||||
title: 'Из кэша Google',
|
||||
getUrl: (blockedUrl) => 'http://webcache.googleusercontent.com/search?q=cache:' + blockedUrl,
|
||||
order: 1,
|
||||
|
@ -27,19 +27,19 @@
|
|||
|
||||
otherUnblock: {
|
||||
title: 'Разблокировать по-другому',
|
||||
getUrl: (blockedUrl) => ('https://anticensority.github.io/unblock#' + blockedUrl),
|
||||
getUrl: (blockedUrl) => ('https://rebrand.ly/ac-unblock#' + blockedUrl),
|
||||
order: 3,
|
||||
},
|
||||
|
||||
antizapretInfo: {
|
||||
title: 'Сайт в реестре блокировок?',
|
||||
getUrl: (blockedUrl) => 'https://reestr.rublacklist.net/?q=' + new URL(blockedUrl).hostname,
|
||||
getUrl: (blockedUrl) => 'https://antizapret.info/index.php?search=' + new URL(blockedUrl).hostname,
|
||||
order: 4,
|
||||
},
|
||||
|
||||
support: {
|
||||
title: 'Документация / Помощь / Поддержка',
|
||||
getUrl: (blockedUrl) => 'https://github.com/anticensority/runet-censorship-bypass/wiki',
|
||||
getUrl: (blockedUrl) => 'https://git.io/ac-wiki',
|
||||
order: 99,
|
||||
},
|
||||
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
# 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.
|
|
@ -0,0 +1 @@
|
|||
Files of this directory must be copied into final build without modifications.
|
|
@ -87,7 +87,7 @@
|
|||
"message": "Error"
|
||||
},
|
||||
"Non_critical_error": {
|
||||
"message": "Non-critical error. Don't worry: it works"
|
||||
"message": "Non-critical error"
|
||||
},
|
||||
"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://github.com/anticensority/runet-censorship-bypass/wiki/Как-разрешить-запуск-расширения-в-приватных-окнах-|-How-to-allow-extension-to-run-in-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://rebrand.ly/ac-allow-private-windows'>a HOWTO</a>."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
"message": "Ошибка"
|
||||
},
|
||||
"Non_critical_error": {
|
||||
"message": "Некритичная ошибка. Всё хорошо, продолжаем работу"
|
||||
"message": "Некритичная ошибка"
|
||||
},
|
||||
"Donate": {
|
||||
"message": "Поддержать"
|
||||
|
@ -138,6 +138,6 @@
|
|||
"message": "Проксировать СВОИ сайты можно только при наличии СВОИХ прокси. Нет своих прокси, удовлетворяющих вашим требованиям."
|
||||
},
|
||||
"AllowExtensionToRunInPrivateWindows": {
|
||||
"message": "Для работы расширения необходимо разрешить запуск в приватных окнах, см. <a href='https://github.com/anticensority/runet-censorship-bypass/wiki/Как-разрешить-запуск-расширения-в-приватных-окнах-|-How-to-allow-extension-to-run-in-private-windows'>инструкции</a>."
|
||||
"message": "Для работы расширения необходимо разрешить запуск в приватных окнах, см. <a href='https://rebrand.ly/ac-allow-private-windows'>инструкции</a>."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,11 +22,6 @@
|
|||
${extra_permissions}
|
||||
],
|
||||
"minimum_chrome_version": "55.0.0.0",
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"strict_min_version": "91.1.0"
|
||||
}
|
||||
},
|
||||
|
||||
"background": {
|
||||
${persistent}
|
||||
|
|
|
@ -1,108 +0,0 @@
|
|||
<!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>
|
|
@ -1,14 +0,0 @@
|
|||
'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.
Before Width: | Height: | Size: 66 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -16,12 +16,11 @@
|
|||
"inferno": "~3.2.0",
|
||||
"inferno-component": "^3.10.1",
|
||||
"inferno-create-element": "^3.10.1",
|
||||
"webpack": "^5.82.0",
|
||||
"webpack-cli": "^5.0.2"
|
||||
"webpack": "^2.5.1"
|
||||
},
|
||||
"scripts": {
|
||||
"check": "flow status",
|
||||
"build:prod": "webpack --node-env=\"'production'\" --env=prod",
|
||||
"build:prod": "webpack --define process.env.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",
|
||||
|
|
|
@ -266,6 +266,7 @@ 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);
|
||||
|
|
|
@ -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://github.com/anticensority/runet-censorship-bypass/wiki/Поддержать">{chrome.i18n.getMessage('Donate')}</a>
|
||||
<a href="https://rebrand.ly/ac-donate">{chrome.i18n.getMessage('Donate')}</a>
|
||||
<a data-in-bg="false" href="../troubleshoot/index.html">
|
||||
{chrome.i18n.getMessage('ProblemsQ')}
|
||||
</a>
|
||||
|
|
|
@ -145,9 +145,9 @@ export default function getPacChooser(theState) {
|
|||
<div class={scopedCss.fullLineHeight}>
|
||||
{
|
||||
props.flags.ifMini
|
||||
? (<a class={scopedCss.otherVersion + ' emoji'} href="https://github.com/anticensority/runet-censorship-bypass/wiki/Различные-версии-расширения"
|
||||
? (<a class={scopedCss.otherVersion + ' emoji'} href="https://rebrand.ly/ac-versions"
|
||||
title={chrome.i18n.getMessage("FullVersion")}>🏋</a>)
|
||||
: (<a class={scopedCss.otherVersion + ' emoji'} href="https://github.com/anticensority/runet-censorship-bypass/wiki/Различные-версии-расширения"
|
||||
: (<a class={scopedCss.otherVersion + ' emoji'} href="https://rebrand.ly/ac-versions"
|
||||
title={chrome.i18n.getMessage("VersionForSlowMachines")}>🐌</a>)
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -363,7 +363,7 @@ export default function getProxyEditor(theState) {
|
|||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="https://github.com/anticensority/runet-censorship-bypass/wiki/Прокси-и-пароль">Запароленные прокси?</a>
|
||||
<a href="https://rebrand.ly/ac-protected-proxy">Запароленные прокси?</a>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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 && currentTab.url.startsWith('edge://');
|
||||
theState.flags.ifInsideEdgeOptionsPage = theState.flags.ifInsideOptionsPage && currentTab && currentTab.url.startsWith('edge://');
|
||||
|
||||
theState.currentTab = currentTab;
|
||||
|
||||
|
|
|
@ -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://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>
|
||||
<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>
|
||||
</ol>
|
||||
<h2>Для продвинутых</h2>
|
||||
<ol>
|
||||
<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="https://rebrand.ly/ac-logs">Как прочитать логи?</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://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>
|
||||
<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>
|
||||
</ol>
|
||||
<h2>Advanced</h2>
|
||||
<ol>
|
||||
<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="https://rebrand.ly/ac-logs">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>
|
||||
|
|
|
@ -71,13 +71,10 @@
|
|||
|
||||
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' },
|
||||
|
@ -234,11 +231,12 @@
|
|||
getIpsFor(hostStr, (err, ips, ...warns) => {
|
||||
|
||||
console.log('Got IPs + err?:', ips, err);
|
||||
if (err) {
|
||||
if (!err) {
|
||||
resolveIps(ips);
|
||||
} else {
|
||||
reject([err, null, ...warns]);
|
||||
return;
|
||||
}
|
||||
resolveIps(ips);
|
||||
|
||||
});
|
||||
|
||||
}).then(
|
||||
|
@ -275,18 +273,29 @@
|
|||
);
|
||||
Promise.all( promises ).then( (cbsRes) => {
|
||||
|
||||
let ipErrors = cbsRes.map( ([err]) => err ).filter( (err) => err );
|
||||
let warns = [];
|
||||
if (ipErrors.length) {
|
||||
warns = [clarify(
|
||||
ipErrors,
|
||||
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,
|
||||
'Не удалось получить один или несколько IP адресов для' +
|
||||
' прокси-серверов. Иконка для уведомления об обходе' +
|
||||
' блокировок может не отображаться.'
|
||||
)];
|
||||
} else {}
|
||||
cb(null, null, ...warns);
|
||||
);
|
||||
if (ifAllErrors) {
|
||||
return cb(newError);
|
||||
}
|
||||
}
|
||||
cb(null, null, newError);
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
_replaceAllAsync(hostArr = mandatory(), cb) {
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
)
|
||||
);
|
||||
|
||||
const popupPrefix = chrome.runtime.getURL(`/pages/options/index.html?status=<span style="color: red">🔥 Прокси-сервер отказался обслуживать запрос к%20`);
|
||||
const popupPrefix = chrome.runtime.getURL(`/pages/options/index.html?status=<span style="color: red">🔥 Прокси-сервер отказался обслуживать запрос к `);
|
||||
if (decodeURIComponent(oldPopup).startsWith(popupPrefix)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,12 @@ 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.66',
|
||||
version: '1.53',
|
||||
anticensorityPacUrls: [
|
||||
...pacUrls,
|
||||
],
|
||||
|
@ -55,6 +57,7 @@ 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: '',
|
||||
|
|
Loading…
Reference in New Issue
Block a user