« Where's My Data? | Main | What's the most popular number (under 976)? »
May 05, 2005
Google Web Accelerator - A Small Hack
Google Labs released a Web Accelerator yesterday that is supposed to make your web surfing faster by serving you compressed pages and images right from Google's servers. From the site:
Google Web Accelerator is an application that uses the power of Google's global computer network to make web pages load faster. Google Web Accelerator is easy to use; all you have to do is download and install it, and from then on many web pages will automatically load faster than before.
I have seen this for dial-up connections from companies like NetZero and Netscape but not for a broadband connection like this. My first thought was that it must be using some sort of proxy server. This happened to be the case. However, it took me a while to get the specifics.
When Web Accelerator is turned on, you can go to Tools --> Internet Options --> Connections --> Lan Settings in Internet Explorer and see that "Use automatic configuration script" has been checked and an address of http://localhost:9100/proxy.pac has been entered. However, going to that page as well as http://localhost:9100 did nothing. I then decided to search my computer for proxy.pac but found nothing. Then, on a whim I decided to search for *.pac, which found one file: C:\Documents and Settings\Chuck\Local Settings\Temp\GoogleWebAccelerator.pac -- However, this file was locked by the application so I could not view, copy, move or delete it. There was nothing I could do to view the contents of this file and when I stopped the accelerator, the file disappeared.
I tried a number of things, including abruptly turning off the computer and restarting in Safe Mode, as well as creating a batch file with a continuous loop to try to copy the file to another location. My last thought was to download a Live Knoppix CD in order to try to read it directly from the file system but I did not feel like downloading a 700 meg file and running the CD when I wanted to know the contents of the file now.
I finally realized that when the Web Accelerator starts, GoogleWebAccelerator.pac has a size of 0 bytes. Once I go to a web page, the file increases to 2k or so. This told me that Internet Explorer must be going to http://localhost:9100/proxy.pac a single time and finding the proxy information. Then, GoogleWebAccelerator.pac fills with the same information which I could not access.
What I finally decided to do was use the Win32 implementation of wget from UnixUtils to view the file before Internet Explorer did and I was finally able to see the contents of proxy.pac / GoogleWebAccelerator.pac. The exact command was wget http://localhost:9100/proxy.pac. This places proxy.pac in the directory where you ran the command. Make sure to run this after starting the accelerator but before going into Internet Explorer. Here is what was inside (Pardon the formatting):
function FindProxyForURL_2831062(url, host) {
return "DIRECT";
}
var private_re = new RegExp("^((0\\.0\\.0\\.0)|(127
\\.\\d+\\.\\d+\\.\\d+)|(10\\.\\d+\\.\\d+\\.\\d+)|(172\\.(1[6789]|2[0-
9]|3[01])\\.\\d+\\.\\d+)|(169\\.254\\.\\d+\\.\\d+)|(192\\.168
\\.\\d+\\.\\d+)|(22[3-9]\\.\\d+\\.\\d+\\.\\d+)|(2[3-5][0-9]
\\.\\d+\\.\\d+\\.\\d+)|([^.]*\\.[^.]*\\.google\\.com)|([^.]*))$");
var bypass_re = new RegExp("^((gmail\\.google\\.com)|
(.*windowsupdate\\.microsoft\\.com)|(.*download\\.windowsupdate\\.com))$");
function FindProxyForURL(url, host) {
if (host == "localhost" || host == "127.0.0.1")
return "DIRECT";
var url_proxy = FindProxyForURL_2831062(url, host);
if (private_re.test(host) ||
bypass_re.test(host) ||
url.substring(0,5) != "http:" ||
"DIRECT" != url_proxy
)
return url_proxy;
else
return "PROXY localhost:9100; " + url_proxy;
}
The JavaScript functions try to differentiate between local and Internet requests. If it is an Internet request, the String
"'PROXY localhost:9100; ' + url_proxy" is returned. Otherwise, the site is loaded using a DIRECT connection.
I have not dug too much further into this besides what I have just written. I just wanted to relay my experience of how I was able to see inside a locked file that required some tinkering in order gain access.
Posted by Chuck at May 5, 2005 04:00 PM
Trackback Pings
TrackBack URL for this entry:
http://www.chuckcaplan.com/blog/mt-tb.cgi/18
Comments
I haven't tried it, but the prefetching done by the google user agent to update websides is what worries me most.
A really interesting discussion is going on over at webmasterworld.com Googleguy, a google employee is involved in the thread also.
Posted by: Dan Boyd at May 6, 2005 05:03 AM
just copy and paste http://localhost:9100/proxy.pac into a download amanger and it should work
Posted by: mohammed at July 15, 2005 05:59 AM
This fkg proxy made me Format my PC cuz' this proxy didn't let me use my wireless conection so this is... crap
Posted by: Jonathan at December 18, 2005 10:16 PM
Hi
Just to let you know this address http://localhost:9100/proxy.pac shut down my internet and would not let me log on at all.I have dsl from sympatico and it took a tech over the phone 45mins to finds the problem,as the dsl line on the tech side was working for my computer.Thanks for nothing GOOGLE.
Vee
Posted by: Vee at January 27, 2006 11:42 PM
Hey guys, ok i see some people have the same problem as i do can anyone tell me how to fix it
Posted by: Johan at March 8, 2006 09:30 AM
I agree that this Google accelerator is simply crap!!! It is avoiding my PC to conecct under regular proxy connection. Rgrds, JK.
Posted by: Juank at March 29, 2006 01:31 PM
love google but proxy pac has screwed me this time how can i fix it without system restore?
Posted by: francie at May 3, 2006 02:46 PM