From 29acdd129e549bdc0eb84ba4d3089fcf10a4d89d Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Mon, 21 Dec 2015 02:05:41 +0500 Subject: [PATCH 1/9] Update README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 23c9395..b3355f7 100755 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -# Anti-censorship Solution for Russia on PAC-scripts +# Anti-censorship for Russia on PAC-scripts -This repo contains my efforts to fight censorhip in Russia. - -## Chrome Extension +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. +This repo contains: +* Chrome Extension: [WebStore](https://chrome.google.com/webstore/developer/edit/npgcnondjocldhldegnakemclmfkngch) | [Sources](https://github.com/ilyaigpetrov/anti-censorship-russia/tree/master/extensions/chromium/minimalistic-pac-setter) +* PAC-scripts performance analyses ## Why I do This @@ -14,6 +16,3 @@ I believe __information mustn't be blocked based on political or other subjectiv My maxim is _"Your freedom ends when it starts to confine the freedom of others"_. [See my 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. From ce329587854d8a9b19696c5f5309eb05730f853f Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Mon, 21 Dec 2015 02:07:00 +0500 Subject: [PATCH 2/9] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b3355f7..48c895e 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Anti-censorship for Russia on PAC-scripts +# Russian Anti-Censorship on PAC-Scripts 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. @@ -8,6 +8,7 @@ This repo contains: [WebStore](https://chrome.google.com/webstore/developer/edit/npgcnondjocldhldegnakemclmfkngch) | [Sources](https://github.com/ilyaigpetrov/anti-censorship-russia/tree/master/extensions/chromium/minimalistic-pac-setter) * PAC-scripts performance analyses +* PAC-script generator based on https://github.com/zapret-info/z-i ## Why I do This From a02b2d13d04e6a0b31d2e8758c3b948744e3240f Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Mon, 21 Dec 2015 02:08:24 +0500 Subject: [PATCH 3/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48c895e..2342529 100755 --- a/README.md +++ b/README.md @@ -16,4 +16,4 @@ I believe __information mustn't be blocked based on political or other subjectiv My maxim is _"Your freedom ends when it starts to confine the freedom of others"_. -[See my arguments against censorship (ru)](https://gist.github.com/ilyaigpetrov/9452b93ef3d7dd3d8cc2) +See [my other arguments against censorship (ru)](https://gist.github.com/ilyaigpetrov/9452b93ef3d7dd3d8cc2) From a1b4c514aa5198659e0a5b038da733a368206d70 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Mon, 21 Dec 2015 02:10:40 +0500 Subject: [PATCH 4/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2342529..f9f21f4 100755 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ I decided to write an anti-censorship extension for Chromium before they strike This repo contains: * Chrome Extension: -[WebStore](https://chrome.google.com/webstore/developer/edit/npgcnondjocldhldegnakemclmfkngch) +[WebStore](https://chrome.google.com/webstore/detail/npgcnondjocldhldegnakemclmfkngch) | [Sources](https://github.com/ilyaigpetrov/anti-censorship-russia/tree/master/extensions/chromium/minimalistic-pac-setter) * PAC-scripts performance analyses * PAC-script generator based on https://github.com/zapret-info/z-i From b5aae8eb2624b73e09be78a188e287cdc7d992f1 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Mon, 21 Dec 2015 02:14:15 +0500 Subject: [PATCH 5/9] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f9f21f4..86cc14e 100755 --- a/README.md +++ b/README.md @@ -1,10 +1,7 @@ # Russian Anti-Censorship on PAC-Scripts -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. - This repo contains: -* Chrome Extension: +* 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) * PAC-scripts performance analyses @@ -17,3 +14,6 @@ I believe __information mustn't be blocked based on political or other subjectiv 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. From f5378319f6c4d74f49b906415767f5db33aaddbe Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Wed, 23 Dec 2015 13:11:57 +0500 Subject: [PATCH 6/9] Update README.md --- pac-performance-analyses/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pac-performance-analyses/README.md b/pac-performance-analyses/README.md index 8014374..81fe067 100755 --- a/pac-performance-analyses/README.md +++ b/pac-performance-analyses/README.md @@ -1,5 +1,7 @@ ## PAC-Script Performance Analysis +__Warning:__ this experimentation wasn't implemented in the extension yet. + Somewhere in PAC-script you may want: ```javascript @@ -18,8 +20,9 @@ I have tested different solutions, and depicted [results](./benchmark/Output.txt ![Host Lookup Chart: Time-Memory, Hits-Misses](./chart/host-lookup-chart.png) -* __IPs indexOf__ – Blocked IP is searched by `indexOf` -* __IPs binary__ – Blocked IP is searched by binary search. For some reason miss time slightly increased. -* __IPs switch__ – Simply `switch(Blocked_IP) { case1: ... caseN: return true }`. Works even better than binary search. Magic. -* __Hosts switch__ – Radix trie built on `switch`. Comparable to __IPs switch__. +* __IPs indexOf__ – Blocked IP is searched by `indexOf` +* __IPs binary__ – Blocked IP is searched by binary search. For some reason miss time slightly increased. +* __IPs switch__ – Simply `switch(Blocked_IP) { case1: ... caseN: return true }`. Works even better than binary search. Magic. +* __Hosts switch__ – Radix trie built on `switch`. Comparable to __IPs switch__. +* __Hosts reversed binary__ – binary search on hosts, but hosts are kept in reversed form: _"gro.evichra"_ instead of _"archive.org"_. From 2381e3d07f6e774d00d4673f6e0fd54dd72aa43f Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Wed, 23 Dec 2015 13:13:46 +0500 Subject: [PATCH 7/9] Update README.md --- pac-performance-analyses/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pac-performance-analyses/README.md b/pac-performance-analyses/README.md index 81fe067..50ec798 100755 --- a/pac-performance-analyses/README.md +++ b/pac-performance-analyses/README.md @@ -24,5 +24,5 @@ I have tested different solutions, and depicted [results](./benchmark/Output.txt * __IPs binary__ – Blocked IP is searched by binary search. For some reason miss time slightly increased. * __IPs switch__ – Simply `switch(Blocked_IP) { case1: ... caseN: return true }`. Works even better than binary search. Magic. * __Hosts switch__ – Radix trie built on `switch`. Comparable to __IPs switch__. -* __Hosts reversed binary__ – binary search on hosts, but hosts are kept in reversed form: _"gro.evichra"_ instead of _"archive.org"_. +* __Hosts reversed binary__ – binary search on hosts, but hosts are kept in reversed form: _"gro.evichra"_ instead of _"archive.org"_. It shouldn't really affect anything, but it does. From 90517d3b199819d5e1e0c1b480801921be922282 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Wed, 23 Dec 2015 13:18:36 +0500 Subject: [PATCH 8/9] Update README.md --- pac-performance-analyses/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pac-performance-analyses/README.md b/pac-performance-analyses/README.md index 50ec798..07e781f 100755 --- a/pac-performance-analyses/README.md +++ b/pac-performance-analyses/README.md @@ -16,7 +16,7 @@ The naive solution is to keep array of blocked ips and check if the host resolve You may do it with `indexOf`, binary search, etc. The shortcoming of every ip solution is that __some providers resolve blocked hosts to wrong ips__, so we eventually need list of hosts. -I have tested different solutions, and depicted [results](./benchmark/Output.txt) in the following chart: +I have tested different [solutions](https://github.com/ilyaigpetrov/anti-censorship-russia/tree/master/pac-generator/src), and depicted [results](./benchmark/Output.txt) in the following chart: ![Host Lookup Chart: Time-Memory, Hits-Misses](./chart/host-lookup-chart.png) @@ -24,5 +24,5 @@ I have tested different solutions, and depicted [results](./benchmark/Output.txt * __IPs binary__ – Blocked IP is searched by binary search. For some reason miss time slightly increased. * __IPs switch__ – Simply `switch(Blocked_IP) { case1: ... caseN: return true }`. Works even better than binary search. Magic. * __Hosts switch__ – Radix trie built on `switch`. Comparable to __IPs switch__. -* __Hosts reversed binary__ – binary search on hosts, but hosts are kept in reversed form: _"gro.evichra"_ instead of _"archive.org"_. It shouldn't really affect anything, but it does. +* __Hosts reversed binary__ – binary search on hosts, but hosts are kept in reversed form: _"gro.evichra"_ instead of _"archive.org"_. It shouldn't really affect anything, but it does, maybe because I also use `dnsDomainIs`. From 1306da6c5d1d9777b5ae812606483f009fac6c26 Mon Sep 17 00:00:00 2001 From: "Ilya Ig. Petrov" Date: Wed, 23 Dec 2015 13:18:59 +0500 Subject: [PATCH 9/9] Update README.md --- pac-performance-analyses/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pac-performance-analyses/README.md b/pac-performance-analyses/README.md index 07e781f..e271ef4 100755 --- a/pac-performance-analyses/README.md +++ b/pac-performance-analyses/README.md @@ -24,5 +24,5 @@ I have tested different [solutions](https://github.com/ilyaigpetrov/anti-censors * __IPs binary__ – Blocked IP is searched by binary search. For some reason miss time slightly increased. * __IPs switch__ – Simply `switch(Blocked_IP) { case1: ... caseN: return true }`. Works even better than binary search. Magic. * __Hosts switch__ – Radix trie built on `switch`. Comparable to __IPs switch__. -* __Hosts reversed binary__ – binary search on hosts, but hosts are kept in reversed form: _"gro.evichra"_ instead of _"archive.org"_. It shouldn't really affect anything, but it does, maybe because I also use `dnsDomainIs`. +* __Hosts reversed binary__ – binary search on hosts, but hosts are kept in reversed form: _"gro.evichra"_ instead of _"archive.org"_. It shouldn't really affect anything, but it does, maybe because I also use `dnsDomainIs` instead of `===`.