
Anti-censorship Chrome extension removed for custom minification - ilyaigpetrov
https://github.com/anticensority/runet-censorship-bypass/issues/10#issuecomment-524615051
======
zamadatix
The 1 MB limit bug report gets on a certain nerve of mine, "I don't think it'd
be fast so no need to change the limit just do these things that'll make it
slower anyways".

There might be an easy way around all of this though, the problem is that the
URLs used START encoded. If you just sourced the raw list and in the extension
live ran it through [https://github.com/pieroxy/lz-string/blob/master/libs/lz-
str...](https://github.com/pieroxy/lz-string/blob/master/libs/lz-
string.min.js) to output the lz compressed pac file to disk (you'll need the
filesystem write permission on the extension) and attach that lz-string
library at the end and call it to decompress (similar to how you do now just
not manual) it's probably a win-win.

I say win-win because on your side the lz compression will probably net a file
~10x smaller than what you have now at the same decode speed and on Google's
side the URLs used are stored a form they can validate against.

~~~
ilyaigpetrov
I've actually found a workaround in the extensions API -- bypassing the script
via `data` field instead of an url doesn't have 1MB restriction. The reason we
compress the script is that it is used not only inside this extension but also
in settings of other browsers/OSes (e.g. Internet Explorer, Windows system
settings, chromium CLI flag `--proxy-pac-url`).

------
jamestomasino
I wish Google would take a note from Mozilla's add-on submission process and
allow the source to be uploaded as a separate package. It's simple to test
that the source package builds to match the compiled code and gives a more
easily readable method for audting. It would also avoid this sort of nonsense.

~~~
ilyaigpetrov
The PAC-script being minified in our case is generated outside of the
extension to make the extension less resource-consuming. PAC-script is
regenerated and updated several times per day. However we may release sources
for the generator, actually the old version of it was published in 2018 at
[1].

[1]:
[https://bitbucket.org/ValdikSS/antizapret/src/master/](https://bitbucket.org/ValdikSS/antizapret/src/master/)

------
Mathnerd314
I guess one could set up a local proxy server and load the PAC file into that,
this seems to be a project that accomplishes it for the Chinese firewall:
[https://github.com/shadowsocks/shadowsocks-
windows](https://github.com/shadowsocks/shadowsocks-windows)

------
ilyaigpetrov
UPDATE: our extension was restored in the WebStore after some letters,
publications and discussions.

------
lxjum
Minification of scripts in an extension can only have nefarious purposes. It
isn't worth it in terms of bandwidth.

~~~
zamadatix
You must not have read past the title:

\- The linked page covers why they needed to do it

\- A chromium bug report on that issue was linked (i.e. they tried to get the
limit removed properly)

\- "* Encode the rules as data rather than generated code" was the idea of a
chromium developer in that bug report

