The environment variables for controlling proxy behaviour are as follows: http_proxy, ftp_proxy, https_proxy, all_proxy and no_proxy. Unfortunately, some applications require these in upper case, other applications need these variables in lower case, that just the way it is.
The format for declaring a proxy exclusion list is simply a comma separated list, the declaration has some wildcard capabilities but not all applications respect these:
no_proxy=127.0.0.1,*.local.com
Your /etc/environment needs to have the following proxy configuration:
no_proxy=localhost,127.0.0.0/8,*.local
NO_PROXY=localhost,127.0.0.0/8,*.local
all_proxy=socks://proxy.example.com:8080/
ALL_PROXY=socks://proxy.example.com:8080/
http_proxy=http://proxy.example.com:8080
HTTP_PROXY=http://proxy.example.com:8080
ftp_proxy=http://proxy.example.com:8080
FTP_PROXY=http://proxy.example.com:8080
https_proxy=http://proxy.example.com:8080
HTTPS_PROXY=http://proxy.example.com:8080
You must log out before your desktop environment will refresh it's environment variables. As all desktop applications are started by the desktop environment, they subsequently inherit its environment settings.
Next, you'll need to update your apt configuration. Create a file called /etc/apt/apt.conf and edit it to contain these declarations:
Acquire::http::proxy "http://proxy.example.com:8080/";
Acquire::ftp::proxy "ftp://proxy.example.com:8080/";
Acquire::https::proxy "https://proxy.example.com:8080/";
Verify that apt has picked up these settings via this command
apt-config dump | grep -i proxy # lists the proxy settings
Chrome will respect the proxy environment variables but Firefox does not, even though it has apparently addressed this issue
Firefox now has an option under Preferences --> Advanced --> (Network tab) --> Settings (under "Connection" section) to "Use system proxy settings," which will apparently use the system settings from the environment file. – Gabriel Staples – 2016-10-14T18:09:39.877
2
Related: http://askubuntu.com/questions/150210/how-do-i-set-systemwide-proxy-servers-in-xubuntu-lubuntu-or-ubuntu-studio
– GrzegorzOledzki – 2012-11-12T08:09:31.493