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.

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.

Solution

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.
http://www.python.org/download/

4) Download and install NTLMaps.
http://ntlmaps.sourceforge.net/
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
 LISTEN_PORT: 8082
 PARENT_PROXY: 10.205.0.41
 PARENT_PROXY_PORT: 8080
 ALLOW_EXTERNAL_CLIENTS: 1
 NT_DOMAIN: domain.org
 USER: username
 PASSWORD: password

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!

About these ads

About schuits

IT Developer for over 10 years.

Posted on August 29, 2011, in Android and tagged , , , , , , , . Bookmark the permalink. 5 Comments.

  1. Thanks man, this was really helpfull for me. But it stil sucks that android doesnt have such basic functionality like proxy autentication…..

    Regards

  2. Will this work android 2.2? I ask since i dont have any option proxy related option on my phone..

  3. If Connectify does not work or you can’t purchase the premium one then here is the free Wi fi hotspot with proxy setting tutorial. Plz have a look. How to Make Wi Fi HotSpot on Laptop under College Proxy Server

    • Well this is a pretty old post. So I’m sure a lot has changed.
      Incidentally. With the proxy blocking certain ports. I now use OpenVPN for android and a VPNBook VPN login. Works very well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: