I am using GNU Icecat (GNU version of Mozilla Firefox) on Trisquel GNU/Linux. In order to minimize/optimize data usage while web surfing, I want to use Google's data compression proxy.
So, how do I use Google Data Compression Proxy on Firefox?
Note/History: I was wandering around to get solution to my problem. The Answer brought me to a chat-room, where I finally found a way.
Best Answer
Using the Google Chrome Data Compression Proxy on non-Chrome browsers involves two steps.
proxy.googlezip.net
and port80
.Chrome-Proxy
header into your request.The
Chrome-Proxy
header should contain the following string:ps=<timestamp>-<num1>-<num2>-<num3>, sid=<md5 string>, b=<build>, p=<patch>, c=<platform>
where:0
<timestamp>
" + "<auth key>
" + "<timestamp>
"ac4500dd3b7579186c1b0620614fdb1f7d61f944
2214
115
win
"As an full example of the header you might have:
Chrome-Proxy: ps=1439961190-0-0-0, sid=9fb96126616582c4be88ab7fe26ef593, b=2214, p=115, c=win
Now, to implement this practically, I think the easiest solution is to use an extension but there does not appear to be one for firefox that already has this functionality.
Therefore, I have implemented my own firefox extension for Firefox version 38 or above that allows anyone to use the Google Chrome Data Compression Proxy on firefox and am including the code below.
The following is the procedure that I used to develop and test the extension, and would allow others to regenerate the extension from scratch.
Get and install
nodejs
Use
npm
from nodejs to installjpm
vianpm install jpm
Note that some versions of Ubuntu package
node
asnodejs
so ifjpm
can't findnode
you may need to install another distribution of nodejs or create a link fornode
tonodejs
Create a new directory for the extension and
cd
into itjpm init
Answer prompts with defaults
Replace your index.js with the code provided below
jpm run
Note that if
jpm
is unable to find firefox in the standard locations, you'll also need to pass the -b flag tojpm
to tell it where to find your browser. (e.g.jpm run -b /path/to/Firefox/Nightly
)You should now have firefox open with this new extension loaded and all traffic proxied through the Google Chrome Data Compression Proxy during this session.
Because
jpm run
creates a temporary profile, you will need tojpm run
this extension anytime you'd like your traffic proxied. You could alsojpm xpi
andInstall Add-on From File
in Add-On manager.You can verify that your data is being proxied by examining the response headers for the
Via
header which indicates data being sent over the Chrome Compression Proxy (e.g.Via: "1.1 Chrome-Compression-Proxy"
)You can determine how much data you are saving by comparing the
Content-Length
header to theX-Original-Content-Length
header in server responses.Code for index.js follows: