Android internet via WIFI hotspot using a proxy requiring authentication
A slight diversion from actual programming. But worth the post.
Recently i got a Samsung Galaxy S GT-I9000 phone. Great phone, but not without its issues.
Anyway to skip to the meat of this problem.
I wanted a way to connect the phone to the internet at work.
There’s 2 issues however.
1) The company doesn’t have a WIFI hotspot
2) The internet is of course behind a proxy that requires authentication.
So I had 2 issues I needed solving. A WIFI connection to the company internet, and a way to provide proxy addresses and authentication.
Now the latest firmware I have DOES support adding a proxy address, but, oddly enough, no way of adding authentication details. This is using Gingerbread.XWJVH and firmare 2.3.3.
I believe the Opera browser for the droid DOES support proxy authentication, but this is not what I was after. I wanted ALL apps on my phone to be able to connect to the net.
After digging a bit and reading some sources that require rooting the device, I found what for me is a viable solution, not rooting required!
Since I have a laptop that has WIFI, I thought I would create a WIFI-hotspot for my droid phone.
ONLY the default phone doesn’t detect ad-hoc wifi connections…no really it doesn’t!
Secondly I was sure there was a way for the laptop to handle the authentication, since the droid was useless at this.
So heres the answer I used
1) Install Connectify http://www.connectify.me/
This application creates a discoverable WIFI hotspot for your pphone.
I’m using the free version. After installing it requires a reboot.
Fill in the required settings under ‘settings’, and start the hotspot.
Congratulations! You now have a WIFI hotspot your droid can see.
Enable you phone’s wifi, scan and connect to the hotspot.
Under clients you can see when your phone has connected.
2) Enable internet sharing in windows, to enable other connections to share your internet.
Do this on the wireless adapter that connectify is using. In my case this is wireless network connection 2.
3) Download and install python for windows. This is needed for the next step.
4) Download and install NTLMaps.
As far as I understand this. It works as a double proxy. Connections are made to the NTLMaps proxy, which routes them to your company proxy providing the given authentication.
Setup NTLMap for your specific case. I only had to change the following config settings
5) Finally add the proxy details to your Android phone that NTLMap is using. In above example that is my computer name (or IP I guess) and the listen port, 8082. These settings can be found under the advaced WIFI settings for you phone.
Run NTLMap and Viola!
Your adroid is connected to the net!
UPDATE!! Unfortunately I seem to have found a problem with this solution. Some apps like Android Market, G-Talk etc use different ports to the standard HTTP port 80. I THINK is is causing them not to connect. But whatever the reason only the browser seems to be able to properly connect using above solution :( Awww that sux!