Merge branch 'development' into production

This commit is contained in:
Ilya Ig. Petrov 2018-04-04 21:45:35 +05:00
commit 285c393cd2
9 changed files with 26 additions and 29 deletions

View File

@ -3,22 +3,15 @@ If you __unstar__, please, [leave us a note](https://github.com/anticensorship-r
[d1]: https://img.shields.io/badge/Поддержать-❤-green.svg [d1]: https://img.shields.io/badge/Поддержать-❤-green.svg
[d2]: https://rebrand.ly/ac-donate [d2]: https://rebrand.ly/ac-donate
[oo1]: https://opencollective.com/anticensority
[![Backers](https://opencollective.com/anticensority/tiers/backer.svg?avatarHeight=100&width=600)][oo1]
[![Поддержать][d1]][d2] [![Поддержать][d1]][d2]
[![Backers on Open Collective](https://opencollective.com/anticensority/backers/badge.svg)](#backers) [![Backers on Open Collective](https://opencollective.com/anticensority/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/anticensority/sponsors/badge.svg)](#sponsors) [![Sponsors on Open Collective](https://opencollective.com/anticensority/sponsors/badge.svg)](#sponsors)
# Russian Anti-Censorship on PAC-Scripts # Russian Anticensorship on PAC-Scripts
This repo contains: 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).
1. Chrome Extension to bypass censorship in Russia: This extension uses pac scripts, one of which (anticensority) is generated by this [pac-generator].
[WebStore](https://chrome.google.com/webstore/detail/npgcnondjocldhldegnakemclmfkngch)
| [Sources](https://github.com/ilyaigpetrov/anti-censorship-russia/tree/master/extensions/chromium/minimalistic-pac-setter)
2. Proof of concept PAC-script generator based on https://github.com/zapret-info/z-i
3. ~~PAC-scripts performance analyses of scripts generated~~ (doesn't take parse time into account)
4. Based on the research of step 3 [the final PAC-generator][pac-generator] was written as a Google App Script in JavaScript which is triggered every two hours to generate and publish PAC-script on Google Drive (don't use direct URL without extension, please, URL will be periodically changed to counter abuse).
[pac-generator]: https://github.com/anticensority/pac-script-generator [pac-generator]: https://github.com/anticensority/pac-script-generator
@ -31,7 +24,7 @@ My maxim is _"Your freedom ends when it starts to confine the freedom of others"
See [my other arguments against censorship (ru)](https://gist.github.com/ilyaigpetrov/9452b93ef3d7dd3d8cc2) See [my other arguments against censorship (ru)](https://gist.github.com/ilyaigpetrov/9452b93ef3d7dd3d8cc2)
Looking at how Russian government [distorts TV](https://therussianreader.wordpress.com/2015/11/22/russian-truckers-strike-dagestan/) and blocks [critics of Putin](http://www.reuters.com/article/2014/03/13/us-russia-internet-idUSBREA2C21L20140313), Looking at how Russian government [distorts TV](https://therussianreader.wordpress.com/2015/11/22/russian-truckers-strike-dagestan/) and blocks [critics of Putin](http://www.reuters.com/article/2014/03/13/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 ## How it Works

View File

@ -1,7 +1,7 @@
# Install # Install
``` ```
npm instll npm install
cd src/extension-common/pages/options/ cd src/extension-common/pages/options/
npm install npm install
cd - cd -

View File

@ -2355,6 +2355,12 @@
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}, },
"symlink-to": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/symlink-to/-/symlink-to-0.0.4.tgz",
"integrity": "sha512-l83Ta9ZYKYTK51WMWBBbSgRSIoA+utHzLoEMVSU6+ip/X5zvxXeYCe2xhL2cfeDg0wVyhpPgve6EKfauwtXY6A==",
"dev": true
},
"table": { "table": {
"version": "3.8.3", "version": "3.8.3",
"resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz", "resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz",

View File

@ -3,7 +3,6 @@
"version": "0.0.19", "version": "0.0.19",
"description": "Development tools for chromium extension", "description": "Development tools for chromium extension",
"scripts": { "scripts": {
"postinstall": "node --use_strict -e \"const fs = require('fs'), path = 'node_modules/_project-root'; fs.unlink(path, ()=> fs.symlinkSync('..', path, 'dir'));\"",
"lint": "eslint ./src/**/*.js --ignore-pattern vendor", "lint": "eslint ./src/**/*.js --ignore-pattern vendor",
"gulp": "gulp", "gulp": "gulp",
"test": "mocha --recursive ./src/**/test/*", "test": "mocha --recursive ./src/**/test/*",
@ -15,6 +14,7 @@
"author": "Ilya Ig. Petrov", "author": "Ilya Ig. Petrov",
"license": "GPLv3", "license": "GPLv3",
"devDependencies": { "devDependencies": {
"symlink-to": "^0.0.4",
"chai": "^3.5.0", "chai": "^3.5.0",
"eslint": "^3.15.0", "eslint": "^3.15.0",
"eslint-config-google": "^0.7.1", "eslint-config-google": "^0.7.1",

View File

@ -125,8 +125,15 @@
); );
} }
if (headError) { if (headError) {
clarifyThen(\`\${azUrl} недоступен!\`, cb)(headError); const errText = \`\${azUrl} недоступен!\`;
console.log(errText);
/* Do nothing for now like it's not critical. Otherwise uncomment.
clarifyThen(
errText,
cb,
)(headError);
return; return;
*/
} }
} }

View File

@ -1,10 +1,10 @@
'use strict'; 'use strict';
const Storage = require('_project-root/tools/sinon-storage'); const Storage = require('symlink-to/project-root/tools/sinon-storage');
const Chai = require('chai'); const Chai = require('chai');
const Mocha = require('mocha'); const Mocha = require('mocha');
const CachelessRequire = require('_project-root/tools/cacheless-require')(module); const CachelessRequire = require('symlink-to/project-root/tools/cacheless-require')(module);
Mocha.describe('window.apis.pacKitchen', function () { Mocha.describe('window.apis.pacKitchen', function () {

View File

@ -3,7 +3,7 @@
const Chai = require('chai'); const Chai = require('chai');
const Mocha = require('mocha'); const Mocha = require('mocha');
const CachelessRequire = require('_project-root/tools/cacheless-require')(module); const CachelessRequire = require('symlink-to/project-root/tools/cacheless-require')(module);
Mocha.describe('window.utils', function () { Mocha.describe('window.utils', function () {

View File

@ -12,7 +12,7 @@ const pacUrls = [
]; ];
const commonContext = { const commonContext = {
version: '1.19', version: '1.20',
anticensorityPacUrls: [ anticensorityPacUrls: [
...pacUrls, ...pacUrls,
], ],

View File

@ -2,20 +2,11 @@
"name": "subjective-good-is-evil", "name": "subjective-good-is-evil",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js",
"scripts": { "scripts": {
"generate": "cd pac-generator && npm start",
"prestart": "npm run generate",
"start": "npm run bench",
"bench": "cd ./pac-performance-analyses/benchmark && dnx run ../../pac-generator/generated-PACs",
"test": "rm -r pac-generator/generated-PACs",
"postinstall": "opencollective postinstall" "postinstall": "opencollective postinstall"
}, },
"author": "ilyaigpetrov", "author": "ilyaigpetrov",
"license": "ISC", "license": "ISC",
"devDependencies": {
"http-server": "^0.8.5"
},
"dependencies": { "dependencies": {
"opencollective": "^1.0.3" "opencollective": "^1.0.3"
}, },