Friday, May 17, 2013

Behind Proxy Lines !!!

" I want to grow up, but netmon won't let me!"
Quite a famous quote this one - on the T-shirts of many IITians. Apart from the pretension and humor in the quote - sometimes 'netmon' - the IITB proxy really pisses you off!

It tags along a whole bunch of extra work!
There is the ritual of setting up the proxy for all applications accessing the internet, the extra hit of Enter/OK to authenticate the proxy each time you fire up the browser, and then with the Aakash tablets - rooting them and installing ProxyDroid to make the wi-fi device usable(plus Connectify Me on laptop for sharing the ethernet connection as wi-fi).
But you get stumped when there is a software you are installing that demands internet connection, but does not have proxy authentication feature!

So coming to the background for this post - A bunch of my school friends started a Group chat on WhatsApp - and asked me to join. Here lies the problem - I dont have a smartphone!(and for incompatibility reasons, I couldn't install it on the tablet..)
A quick search on the met came out with a workaround - run the BlueStacks android emulator and install WhatsApp on it. Here is Hurdle 1 - Bluestack downloads some binaries online - termed 'runtime data'; and well - no proxy support yet as it is still in beta. Also, by the virtue of its beta status - the installer just freezes at this point!

To pass this hurdle, I had to use ccproxy - which is kind of a proxy in front of the netmon proxy for the computer. So there I spent around half an hour getting the settings right so that Bluestacks continued installation; and then revert back the network settings to the old ones(I personally feel ccproxy is kind of a messy business!)

Now things seemed well and good, but wait - The native application of Bluestacks cannot access internet, and as it is already established - No proxy support. One of the forums suggests the use of ProxyCap - another application that lets you specify those applications that use proxies. So - one more precursor was met - installed ProxyCap and added a 'rule' to allow the network access executable of Bluestacks to have a proxy redirection!

Things were not over yet - as ProxyCap allows setting of HTTP, HTTPS, SOCKS4 and SOCKS5  proxies. I wasn't sure what goes for what kind of requests - so had to do a trial and error - there went another hour.
The end result was this - To load the initial Top Charts apps in the home screen(well, there is the Retry or Cancel popup, but the Cancel button almost never works!), it uses HTTP connection, but to install apps, run network dependent apps or surf the internet via the browser, it uses HTTPS. This translates to me starting ProxyCap in HTTP mode for the startup of Bluestacks, and then switching to HTTPS mode for running Whatsapp(Standard non-marketplace installation; download .apk file and run it via Bluestacks application installer).
Oh yeah, there is that standard trick of installing WhatsApp on non-phone devices - Wait for the SMS verification to time-out, and then get the call with the activation code and use it. 

For some reason, Bluestacks refuses to use the HTTPS proxy during startup; so I have to do the start in HTTP mode and then switch to HTTPS mode to view Whatsapp messages all over again!
Anyway, did find out a few things - you can run WhatsApp on PC, although not in the most elegant way, and also I just found out that Whatsapp did not install on the tablet earlier due to space running out - so process repeat now :D!

No comments:

Post a Comment