禁用一个apt存储库的代理服务器


13

我已经建立了本地apt储存库,但是我的IT部门在代理服务器上缓存了LAN流量。有什么办法可以解决这个问题,以禁用此本地apt存储库的代理设置?在apt.conf或类似?

Answers:


20

只需在/etc/apt/apt.conf.d/99proxy文件中声明如下内容:

Acquire::http::Proxy {
    your.local.first.repository DIRECT;
    your.second.first.repository DIRECT;
};

DIRECT 告诉易于使用直接连接来连接到存储库。


1

这只是@CédricJulien的回答(感谢和)默认为外部代理的其他语法:

Acquire::http::Proxy "http://proxy:8080";
Acquire::http::Proxy {
    in-house.debian.example.com DIRECT;
    no-protocol-colon-or-slashes.example.com DIRECT;
};
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.