Understanding proxy settings in Ubuntu

2

I'm behind a university proxy and I'm very confused about Ubuntu's proxy settings and I'd love if someone can clarify it for me.

If I look inside /etc/apt/apt.conf it has my custom set proxy as

Acquire::http{Proxy "http://user:pass@proxy:port";};
Acquire::http::proxy "http://user:pass@proxy:port/";
Acquire::https::proxy "https://user:pass@proxy:port/";
Acquire::ftp::proxy "ftp://user:pass@proxy:port/";
Acquire::socks::proxy "socks://user:pass@proxy:port/";

Inside /etc/environment I have

http_proxy="http://proxy:port/"
https_proxy="https://proxy:port/"
ftp_proxy="ftp://proxy:port/"
socks_proxy="socks://proxy:port/"

But if I do this echo $http_proxy then I get

http://differentproxy:differentport

I don't get it from where it's 'echo'ing. Any clarification? I know I can export the $http_proxy variable to the correct proxy but I just want to understand which program/process etc use which settings because apparently there are 3 different settings files. Might even be more.

user1265125

Posted 2013-02-05T18:44:06.797

Reputation: 183

Answers

0

/etc/environment is where export goes, so just add it there. There's a lot of relevant questions on Ask Ubuntu about this. ie, https://askubuntu.com/q/158557/89202

Edit your:

gedit /etc/bash.bashrc

Enter the details in this format.

export http_proxy=http://username:password@proxyhost:port/

export ftp_proxy=http://username:password@proxyhost:port/

Enigma

Posted 2013-02-05T18:44:06.797

Reputation: 3 181

I tested that by doing export http_proxy=10.1.1.1:9090, but my /etc/environment still has the old proxy. – user1265125 – 2013-02-05T19:17:46.090