Skip to content

Commit

Permalink
Merge branch 'development' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyaigpetrov committed Apr 4, 2018
2 parents 9596af0 + c53c38f commit 285c393
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 29 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion extensions/chromium/runet-censorship-bypass/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Install

```
npm instll
npm install
cd src/extension-common/pages/options/
npm install
cd -
Expand Down
6 changes: 6 additions & 0 deletions extensions/chromium/runet-censorship-bypass/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/chromium/runet-censorship-bypass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/*",
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
*/
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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 () {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const pacUrls = [
];

const commonContext = {
version: '1.19',
version: '1.20',
anticensorityPacUrls: [
...pacUrls,
],
Expand Down
11 changes: 1 addition & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@
"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"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/anticensority"
}
}
}

0 comments on commit 285c393

Please sign in to comment.