Categories
Android HowTos Linux

Installing Android SDK behind proxy requiring authentication

Today I was installing Android SDK on Linux behind authentication proxy server. I tried different settings but there was no way to put user,password in proxy settings. In the end finally I found a workaround to install Squid Proxy on my LinuxMint 11 (Ubuntu based distro) and set proxy to local and it worked enormous!

wget http://http.us.debian.org/debian/pool/main/d/db/libdb5.1_5.1.25-11_amd64.deb
wget http://http.us.debian.org/debian/pool/main/d/db/libdb5.1-dev_5.1.25-11_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/s/squid-langpack/squid-langpack_20110214-1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/s/squid/squid-common_2.7.STABLE9-4ubuntu2_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/s/squid/squid_2.7.STABLE9-4ubuntu2_amd64.deb
dpkg -i libdb5.1_5.1.25-11_amd64.deb  libdb5.1-dev_5.1.25-11_amd64.deb squid-langpack_20110214-1_all.deb squid-common_2.7.STABLE9-4ubuntu2_all.deb squid_2.7.STABLE9-4ubuntu2_amd64.deb

vi /etc/squid/squid.conf

search for ‘cache_peer and  put following around there

cache_peer 192.168.0.100 parent 8080 0 no-query default login=username:password
never_direct allow all

Make a note of following :

Real Proxy Server = 192.168.0.100
8080 = proxy server port
Username = Your authentication proxy user name.
Password = Your Password for proxy.

And restart squid
service squid stop
service squid start

Now define following in your application it will work like a charm;

Proxy Server IP : 127.0.0.1
Port : 3128

Hope that works same for you.