Saturday 12 January 2013

Connect RasPi through stupid proxy

best solution: http://www.fosspedia.com/how-to-make-apt-get-to-work-through-a-proxy/

sudo vi /etc/apt/apt.conf
i
Acquire::http::proxy "http://username:passw@proxyIP:port";
export no_proxy=localhost;
:x


done!

also, for ubuntu:
http://askubuntu.com/questions/150210/how-do-i-set-systemwide-proxy-servers-in-xubuntu-lubuntu-or-ubuntu-studio


better solution: (from http://askubuntu.com/questions/89437/how-to-install-packages-with-apt-get-on-a-system-connected-via-proxy)

This method worked for me.....just have a try...
check the file /etc/apt/apt.conf
The contents were:

Acquire::http::proxy "http://<proxy>:<port>/"
Acquire::ftp::proxy "ftp://<proxy>:<port>/"
Acquire::https::proxy "https://<proxy>:<port>/"


This was the reason why you could reach proxy but couldn't get past it, since there is no username password information. So just put that info into it.. Acquire::http::proxy "http://<username>:<password>@<proxy>:<port>/"; Acquire::ftp::proxy "ftp://<username>:<password>@<proxy>:<port>/"; Acquire::https::proxy "https://<username>:<password>@<proxy>:<port>/";

save the file and you are done...
BROTIP: More better add these lines in another file, /etc/apt/apt.conf.d/80proxy. This will ensure that after a version upgrade changes won't be lost.

this is good for browsing, but not apt-get:
http://www.linuxforums.org/forum/networking/131591-linux-connect-though-proxy.html
TuxKnight says:

To allow your server to access internet via a proxy, Add the following line to the ~/.bashrc
export http_proxy=http://<proxy>:<port>/
If you need a username & password to access the proxy add the following to the ~/.bashrc
export http_proxy=http://<username>:<password>@<proxy>:<port>/ Awesome. Thanks!

No comments:

Post a Comment