7dez11
PROXY







How to work behind a proxy server (Crunchbang, Debian).

Desktop environments like Gnome, KDE or Unity do provide a GUI
. As Openbox does not here's a little guide how to do it manually. No magic involved!


To adapt system settings - edit /etc/environment:

sudo vim /etc/environment

Add:

http_proxy=http://ip:port
https_proxy=https://ip:port
ftp_proxy=ftp://ip:port
socks_proxy=socks://ip:port
no_proxy=localhost
no_proxy=127.0.0.1

Save and exit.

This should work too:
In a shell type:
export http_proxy=http://10.203.0.1:5187/
export https_proxy=http://10.203.0.1:5187/
export ftp_proxy=http://10.203.0.1:5187/
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
To undo type:
unset HTTP_PROXY
unset http_proxy
unset HTTPS_PROXY
unset https_proxy
unset FTP_PROXY
unset ftp_proxy


see: https://wiki.archlinux.org/index.php/Proxy_settings



Synaptic:

Go to Settings, Network and tick “Manual proxy configuration”. Insert your proxy settings. Click OK. Done.

(Edit: Synaptic seems to use the system settings in /etc/environment and so does not necessarily need to be configured.)


Synaptic package manager



Apt:

Edit /etc/apt/apt.conf

sudo vim /etc/apt/apt.conf

Write:

Acquire::http::Proxy "http://ip:port";

Save. Exit. You might need to reboot.


Firefox:

Firefox does not use the system settings like chromium for example does. So you have to manually edit its preferences.

It's under Advanced / Network / Connection Settings.

Here tick “Manual proxy configuration:” and also “Use this proxy server for all protocols”.

Enter your proxy settings. Close the settings window. Done.


Other programs:

I believe aptitude uses apt.conf file. Wget queries environment.conf.


(Concerning proxies which need authentication – something like this should work:

"http://username:password@ip:port"

Not tested though!)