Package: auto-apt-proxy
Version: 12
Severity: wishlist

This is mainly as a work around for #954904 in apt-cacher-ng

Since the ip address on wifi can change depending on connection, hard coding it is not a good option.

So if auto-apt-proxy can take first entry of hostaname -I as an option, that makes it easy to not use the loopback interface. Or another way could be to have an option to ignore the loopback interface.

I tried creating /usr/local/bin/auto-apt-proxy1 as,

export http_proxy="http://$(hostname -I |awk {'print $1'}):3142"
export HTTP_PROXY=${http_proxy}
echo ${http_proxy}

and then /etc/apt/apt.conf.d/auto-apt-proxy.conf as
Acquire::http::Proxy-Auto-Detect "/usr/local/bin/auto-apt-proxy1";

But

$ sudo apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye-proposed-updates InRelease
Hit:3 http://deb.debian.org/debian bullseye-backports InRelease
Get:4 https://download.jitsi.org stable/ InRelease [1,882 B]
Reading package lists... Done
E: Sub-process ProxyAutoDetect returned an error code (100)
E: Sub-process ProxyAutoDetect returned an error code (100)
E: Sub-process ProxyAutoDetect returned an error code (100)

Reply via email to