diff --git a/README.md b/README.md index 1c7a741..c8a9b32 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/extensions/chromium/runet-censorship-bypass/README.md b/extensions/chromium/runet-censorship-bypass/README.md index 7e3e365..70a44dc 100644 --- a/extensions/chromium/runet-censorship-bypass/README.md +++ b/extensions/chromium/runet-censorship-bypass/README.md @@ -1,7 +1,7 @@ # Install ``` -npm instll +npm install cd src/extension-common/pages/options/ npm install cd - diff --git a/extensions/chromium/runet-censorship-bypass/package-lock.json b/extensions/chromium/runet-censorship-bypass/package-lock.json index c324680..ab95dbe 100644 --- a/extensions/chromium/runet-censorship-bypass/package-lock.json +++ b/extensions/chromium/runet-censorship-bypass/package-lock.json @@ -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", diff --git a/extensions/chromium/runet-censorship-bypass/package.json b/extensions/chromium/runet-censorship-bypass/package.json index 68eea3a..924414b 100644 --- a/extensions/chromium/runet-censorship-bypass/package.json +++ b/extensions/chromium/runet-censorship-bypass/package.json @@ -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", diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js index 1c05be9..27ca74a 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/37-sync-pac-script-with-pac-provider-api.tmpl.js @@ -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; + */ } } diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/test/pac-kitchen.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/test/pac-kitchen.js index eceab64..086fbbb 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/test/pac-kitchen.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/test/pac-kitchen.js @@ -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 () { diff --git a/extensions/chromium/runet-censorship-bypass/src/extension-common/test/utils.js b/extensions/chromium/runet-censorship-bypass/src/extension-common/test/utils.js index afb7341..df99f89 100644 --- a/extensions/chromium/runet-censorship-bypass/src/extension-common/test/utils.js +++ b/extensions/chromium/runet-censorship-bypass/src/extension-common/test/utils.js @@ -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 () { diff --git a/extensions/chromium/runet-censorship-bypass/src/templates-data.js b/extensions/chromium/runet-censorship-bypass/src/templates-data.js index 074c1bc..1ea267b 100644 --- a/extensions/chromium/runet-censorship-bypass/src/templates-data.js +++ b/extensions/chromium/runet-censorship-bypass/src/templates-data.js @@ -12,7 +12,7 @@ const pacUrls = [ ]; const commonContext = { - version: '1.19', + version: '1.20', anticensorityPacUrls: [ ...pacUrls, ], diff --git a/package.json b/package.json index ddf0692..6068c31 100755 --- a/package.json +++ b/package.json @@ -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" } -} \ No newline at end of file +}