

Data compression proxy for Chrome for Android (beta) - igrigorik
https://developers.google.com/chrome/mobile/docs/data-compression

======
coopdog
Hope there's an opt out. I can imagine all this web history coming back to
bite some day.

For example during a murder trial: "And is it true Mr X, that you browsed the
page 'Top 10 amusing CSI murder strategies" "Yes, but.." "And was number 6 not
the exact method used to murder Ms Y?" _Jury murmers in disapproval_

It's like numerology, the more data points you have the higher than odds of
finding a couple of data points that coincidentally line up, all in a
conveniently subpoena friendly Google data centre.

~~~
igrigorik
You have to explicitly enable it in chrome://flags - the default is off. So,
yes, there is definitely an opt out!

~~~
mmastrac
Can we run our own proxies? That would be a good compromise - and we could
tunnel SSL to our own servers safely and privately.

~~~
cbr
This guy did: [http://00f.net/2012/06/02/mod-pagespeed-as-a-proxy-for-
your-...](http://00f.net/2012/06/02/mod-pagespeed-as-a-proxy-for-your-phone/)

And so did this guy: [http://vincent.bernat.im/en/blog/2011-mobile-browsing-
conten...](http://vincent.bernat.im/en/blog/2011-mobile-browsing-content-
optimization.html)

You could even take mod_pagespeed and start selling your own competing
optimizing proxy; it's open source.

(Evil idea: run an optimizing proxy in a part of the world with very slow or
expensive-per-byte internet and make money via ad insertion or replacement.)

~~~
mmastrac
Now to figure out how to combine this with mod_spdy.

------
fomojola
One of the things they explicitly call out is DNS late binding: it doesn't
look like they make any exceptions for CDNs and other services that use geo-IP
lookups. You could argue that the speed improvements do away with some of the
need for CDNs, but there will probably be some other cases that this breaks.
You'd want some way for a specific domain to opt-out: perhaps a DNS text
record that gets read and indicates that a site shouldn't be optimized?

~~~
igrigorik
The IP address of the visitor is forwarded in X-Forward-For, which is a
standard header and CDN's can leverage that. Having said that, note that this
can actually work against you.. The whole idea is that all of the requests are
multiplexed over SPDY between the device and the proxy. So you actually want
the closest resource to the proxy, not to the device (and the proxy as close
to the device as possible, of course.. :))

------
zobzu
So yeah, I know, it actually works, it actually provides benefits. I know,
opera has this option too.

But really, sending all my data via google, as if all the rest going through
them wasn't enough.. doesn't make me all that comfortable. No one company
should control OS, client, data at rest and data flows. It's too much
responsibilities in one single place.

------
greggman
How does it know if the image is just going to be displayed and can therefore
be recompressed vs when the image is used for data? For example many WebGL
apps have data in PNGs because they are normal maps or heighmaps. Mucking with
the data will mess them up.

Other apps store data in their PNGs. For example Monoco encodes its saved game
files as screenshot PNGs and stores the save data in the lower order bits of
each pixel. Mucking with the data would make it impossible to load saved
games.

Is there a way for a page to opt out for these cases?

~~~
igrigorik
Specify "Cache-Control: no-transform" on assets that need to be skipped.

~~~
greggman
And how do I do this if I don't control the server? For example there's all
these samples being served off of github.

<http://mrdoob.github.com/three.js/>

AFAIK there's no way to specify a header from standard HTML and it's highly
unlikely that most people will have access to the servers that serve their
content to set these headers on a per file basis

------
joshfraser
I don't have an Android phone handy, but I'd love to poke at this. Does anyone
know the IP addresses they're using for the proxy? Is there any authentication
that limits this to Chrome on Android or are they essentially running this as
an open proxy?

~~~
hosay123
Be assured that if you were not identified, they'd have no reason to run the
service in the first place..

Without looking I can safely say it's not a public proxy, probably tied to
your device's Google Accounts session.

~~~
igrigorik
"note that secure connections (HTTPS) are routed directly from your mobile
device to the destination, bypassing the optimization proxy – only HTTP
requests are routed through and optimized by the proxy. Further, the use of
the service does not require a Google account; navigation in incognito tabs
bypasses the proxy; original IP address of your device is forwarded to the
destination via the X-Forwarded-For header – the data compression service is a
transparent proxy."

~~~
zobzu
That's actually cool. I hope they'll keep it that way.

------
piyush_soni
I think it's the same thing Opera Mobile has been doing for a long time now
...

~~~
vivekjishtu
Yes Opera Mobile has the turbo mode which is similar to this technology
<http://www.opera.com/turbo> where it proxies the connection and compresses
the data.

Opera Mini on the other hand uses OBML
[http://dev.opera.com/articles/view/opera-binary-markup-
langu...](http://dev.opera.com/articles/view/opera-binary-markup-language/)
which is an entirely different thing.

~~~
StavrosK
OBML is a superset of a compressing proxy.

------
ksec
I wonder if the Engine behind it is Open Source or could we use this services
from other browsers like Firefox?

This is beneficial for Getting pass Firewall restriction, from China Firewall
to Office Internal Firewalls. Speed up Internet connection, especially in
places where the shared internet is extremely slow. ( Office or Public
Computers )

While i am already using my own VPN for this purpose. It is much slower
compared to a normal internet collection if your VPS is not located close to
you.

------
yock
This seems to only be available to devices capable of a mobile data
connection. My WiFi-only Nexus 7 doesn't have the options while my Galaxy
Nexus does. I suppose the utility of this service would be limited on a true
WiFi connection, but I commonly use my GNex's hotspot capabilities. It's a
shame that it seems I can't use this over that connection.

Edit: Seems there's a newer version, but the Play Store tells me it's
incompatible with my Nexus 7. That would explain the missing flag.

~~~
igrigorik
Nexus 7 incompatibility appears to be a bug... stay tuned.

------
valgaze
This seems like a rough equivalent of "Onavo" for Android:
<http://www.onavo.com/apps/android_extend/>

~~~
chinpokomon
Similar perhaps in that they both compress the stream. Onavo creates a VPN
between your device and their proxy server, but it still uses the traditional
TCP/IP stack. Google's solution will hopefully work better. Onavo only worked
over cellular data and in my testing it was noticeably slower. The advantage
was only in the amount of data. I'm hoping, and from the sound of things, this
solution will reduce bandwidth and return data faster than an unproxied
connection.

------
wonderfuly
wondering if this means I can bypass the GFW in China to visit some blocked
sites(facebook.com, etc) ?

------
est
In theory it could also be used to circumvent country lock for videos and
such?

~~~
fpgeek
Well, that probably depends on whose locks you're trying to get around.
igrigorik noted that the proxy does pass along the user's IP address in the
X-Forward-For header, which could be used to preserve a country lock.

Who will actually do that? I can only speculate. I'd expect Google video sites
to pay attention (they tend to be pretty technically savvy in implementing
their country blocks). On the other hand, I suspect most non-Google sites to
not pay attention unless the proxy usage becomes large enough to notice (or
unless they're already triggering off of X-Forward-For for other proxies and
the like).

------
qiller
Wonder if they just reused bits of now dead Google Accelerator...

~~~
igrigorik
PageSpeed optimization libraries (under the hood):
<https://developers.google.com/speed/pagespeed/psol>

