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 Sep 15, 2017
2 parents 6b01b77 + 8ac8fab commit ccdebc8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This repo contains:
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://script.google.com/d/1uKNRz6w-BbOef8bC9lsWpzYMJxczjFXfMKK8fq6nYTzyPcVxzjGB9ynb/edit?usp=sharing
[pac-generator]: https://script.google.com/d/1RlqqfUmYNpEhekySfOqdzJ8L4eV1GsHYDjPD1DexxEW0RcGvuCSQlWa0/edit?usp=sharing

## Why I do This

Expand All @@ -29,9 +29,7 @@ I decided to write an anti-censorship extension for Chromium before they strike
## How it Works

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 one on Google Drive, Antizapret or on Anticenz).
2. On every request PAC script checks if host is blocked OR if it's IP is blocked using `switch(..) {..}` trie-like structure (Google Drive PAC script).
Antizapret PAC script checks for IPs only with `indexOf`.
Anticenz PAC script checks for hosts and IPs with `indexOf`, but lacks some IPs.
3. If address is blocked PAC script returns proxy server to the browser: Antizapret, or Anticenz if the first one fails.
4. PAC scripts on servers are updated periodically from https://github.com/zapret-info/z-i
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 + CloudFlare)).
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, both Antizapret and Anticensority use Antizapret proxy servers.
4. PAC scripts on servers are updated periodically from https://github.com/zapret-info/z-i.
1 change: 1 addition & 0 deletions extensions/chromium/runet-censorship-bypass/grep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
grep -r $@ ./src --exclude-dir=vendor --exclude-dir=node_modules
1 change: 0 additions & 1 deletion extensions/chromium/runet-censorship-bypass/grep.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,10 @@
// UPDATE & MIGRATION
console.log('Updating from ', oldStorage.version, 'to', antiCensorRu.version);
const key = antiCensorRu._currentPacProviderKey;
if (key !== null) {
antiCensorRu._currentPacProviderKey = 'Антицензорити';
if (oldStorage.version === ' 0.0.1.2') {
if (key !== null && key !== 'onlyOwnSites') {
antiCensorRu._currentPacProviderKey = 'Антицензорити';
}
}

antiCensorRu.pushToStorageAsync(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const commonContext = {
version: '1.3',
version: '1.5',
anticensorityPacUrls: [
// First official, shortened:
'https://rebrand.ly/ac-chrome-anticensority-pac',
Expand Down

0 comments on commit ccdebc8

Please sign in to comment.