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
[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]
[![Backers on Open Collective](https://opencollective.com/anticensority/backers/badge.svg)](#backers)
[![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:
1. Chrome Extension to bypass censorship in Russia:
[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).
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].
[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)
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

View File

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

View File

@ -2355,6 +2355,12 @@
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"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": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz",

View File

@ -3,7 +3,6 @@
"version": "0.0.19",
"description": "Development tools for chromium extension",
"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",
"gulp": "gulp",
"test": "mocha --recursive ./src/**/test/*",
@ -15,6 +14,7 @@
"author": "Ilya Ig. Petrov",
"license": "GPLv3",
"devDependencies": {
"symlink-to": "^0.0.4",
"chai": "^3.5.0",
"eslint": "^3.15.0",
"eslint-config-google": "^0.7.1",

View File

@ -125,8 +125,15 @@
);
}
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;
*/
}
}

View File

@ -1,10 +1,10 @@
'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 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 () {

View File

@ -3,7 +3,7 @@
const Chai = require('chai');
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 () {

View File

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

View File

@ -2,20 +2,11 @@
"name": "subjective-good-is-evil",
"version": "1.0.0",
"description": "",
"main": "index.js",
"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"
},
"author": "ilyaigpetrov",
"license": "ISC",
"devDependencies": {
"http-server": "^0.8.5"
},
"dependencies": {
"opencollective": "^1.0.3"
},
@ -23,4 +14,4 @@
"type": "opencollective",
"url": "https://opencollective.com/anticensority"
}
}
}