Sunday, August 10, 2008

Apt behind a proxy

Just a small update, wanted to get my Ubuntu box working behind the varsity proxy, where RUCUS host an Apt mirror. Finally got around to reading up, and have reduced my configuration (apt.conf) to this:
Acquire {
HTTP {
Proxy "http://username:password@wwwproxy.ru.ac.za:3128";
Proxy::ubuntu.rucus.ru.ac.za "DIRECT";
};
};

Make sure that your environment doesn't have the http_proxy variable set (use unset http_proxy to remove it), since apt-get will use it by default. This config will allow you to access external repositories, as well as the local ones. Probably not the best thing to store your password in clear text, but since it's easy enough to sniff it...