Please bear with me, I've searched as best I can with no apparent solutions.

I'm behind my companies firewall, we have a couple of proxy servers that we can use to get out onto the big wide internet. My company's IT group has kindly mirrored the main Debian repos inside the WAN.

I would like to use a couple of repos outside the WAN (i.e. the Internet). Is it possible to tell apt-get to use a proxy for these, and not for the others?

With both enabled and a proxy defined in apt.conf, it barfs on the stuff inside the firewall, and without a proxy defined it barfs on the sources outside the firewall.

There is some mention in the man page for apt.conf, but putting a proxy statement in the source.list file doesn't work (unless I've got the syntax wrong).




Create file /etc/apt/apt.conf.d/01proxy with content like this:

Acquire::http::Proxy::external.repo.host "http://your.proxy.host/";

With the following settings all http requests to repositories on external.repo.host would be proxied via http proxy at your.proxy.host.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.