11

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).

Thanks

Jerry

1 Answer 1

24

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.

1
  • What does 01 mean in the filename 01proxy?
    – Bruce Sun
    Sep 13, 2021 at 2:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .