Configure apt to use proxy for only some hosts - is that possible?

Shu Shang yzshangs at 126.com
Thu Sep 30 09:07:18 UTC 2021


I reside in Mainland China and it's very painful to connect to 
dl.winehq.org without using a proxy.

However, using a proxy means the connection is extremely slow to our 
local mirror (for example: mirrors.tuna.tsinghua.edu.cn)

I currently have a /usr/local/bin/proxyapt shell script that copies the 
proxy.conf file to and from /etc/apt/apt.conf.d, I run that when I need 
to upgrade wine, but it is still painful.

So is there a way to make apt know for which hosts should it use proxy?
-- 
 From RavenclawOIer with love





More information about the ubuntu-users mailing list