Change default timeouts to 1s and add possibility to configure them
- Set default timeout for resolving with
getentand proxy checks viaapt-helperto 1 second as the original 5 seconds easily adds up to more than 30 seconds to detect our proxy in networks where the _gateway doesn't reject packets and the SRV entry is in use. (Closes: #1108265) - Add new apt.conf configuration settings
- AutoAptProxy::Timeout::DNS="1" for getent lookups
- AutoAptProxy::Timeout::Proxy="1" for apt-helper proxy tests
- AutoAptProxy::Debug="" to enable debugging permanently
- AutoAptProxy::Cache"60" to allow different values than 60s caching
Thoughts?
cb@trixie ~ % agi ./auto-apt-proxy_16.8_all.deb
Note, selecting 'auto-apt-proxy' instead of './auto-apt-proxy_16.8_all.deb'
DOWNGRADING:
auto-apt-proxy
Summary:
Upgrading: 0, Installing: 0, Downgrading: 1, Removing: 0, Not Upgrading: 0
Download size: 0 B / 11.0 kB
Space needed: 1024 B / 12.3 GB available
Continue? [Y/n]
Get:1 /home/cb/auto-apt-proxy_16.8_all.deb auto-apt-proxy all 16.8 [11.0 kB]
(Reading database ... 60875 files and directories currently installed.)
Preparing to unpack .../cb/auto-apt-proxy_16.8_all.deb ...
Unpacking auto-apt-proxy (16.8) over (16.8) ...
Setting up auto-apt-proxy (16.8) ...
Installing new version of config file /etc/apt/apt.conf.d/auto-apt-proxy.conf ...
Processing triggers for man-db (2.13.1-1) ...
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
Notice: Download is performed unsandboxed as root as file '/home/cb/auto-apt-proxy_16.8_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
cb@trixie ~ % cat /etc/apt/apt.conf.d/auto-apt-proxy.conf
Acquire::http::Proxy-Auto-Detect "/usr/bin/auto-apt-proxy";
AutoAptProxy::Debug "";
AutoAptProxy::Timeout::DNS "1";
AutoAptProxy::Timeout::Proxy "1";
AutoAptProxy::Cache "60";
cb@trixie ~ % sudo vim /etc/apt/apt.conf.d/auto-apt-proxy.conf
cb@trixie ~ % sudo rm -Rf /tmp/.auto-apt-proxy-1000
cb@trixie ~ % auto-apt-proxy
[2025-07-27T09:47:47+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://127.0.0.1:3142
[2025-07-27T09:47:47+00:00] auto-apt-proxy: DEBUG: looking for approx at http://127.0.0.1:9999
[2025-07-27T09:47:47+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher at http://127.0.0.1:3142
[2025-07-27T09:47:47+00:00] auto-apt-proxy: DEBUG: looking for squid at http://127.0.0.1:8000
[2025-07-27T09:47:47+00:00] auto-apt-proxy: DEBUG: IPv4 gateway: 10.10.2.1
[2025-07-27T09:47:47+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://10.10.2.1:3142
[2025-07-27T09:47:48+00:00] auto-apt-proxy: DEBUG: looking for approx at http://10.10.2.1:9999
[2025-07-27T09:47:49+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher at http://10.10.2.1:3142
[2025-07-27T09:47:50+00:00] auto-apt-proxy: DEBUG: looking for squid at http://10.10.2.1:8000
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://[::1]:3142
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: looking for approx at http://[::1]:9999
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher at http://[::1]:3142
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: looking for squid at http://[::1]:8000
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: Resolving hostname: getent ahostsv4 apt-proxy
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: apt-proxy IPv4: 10.10.2.7
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://10.10.2.7:3142
[2025-07-27T09:47:51+00:00] auto-apt-proxy: DEBUG: detected proxy: http://10.10.2.7:3142
http://10.10.2.7:3142
cb@trixie ~ % sudo sed -i 's/1/5/g' /etc/apt/apt.conf.d/auto-apt-proxy.conf
cb@trixie ~ % sudo rm -Rf /tmp/.auto-apt-proxy-1000
cb@trixie ~ % auto-apt-proxy
[2025-07-27T09:48:28+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://127.0.0.1:3142
[2025-07-27T09:48:28+00:00] auto-apt-proxy: DEBUG: looking for approx at http://127.0.0.1:9999
[2025-07-27T09:48:28+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher at http://127.0.0.1:3142
[2025-07-27T09:48:28+00:00] auto-apt-proxy: DEBUG: looking for squid at http://127.0.0.1:8000
[2025-07-27T09:48:28+00:00] auto-apt-proxy: DEBUG: IPv4 gateway: 10.10.2.1
[2025-07-27T09:48:28+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://10.10.2.1:3142
[2025-07-27T09:48:33+00:00] auto-apt-proxy: DEBUG: looking for approx at http://10.10.2.1:9999
[2025-07-27T09:48:38+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher at http://10.10.2.1:3142
[2025-07-27T09:48:43+00:00] auto-apt-proxy: DEBUG: looking for squid at http://10.10.2.1:8000
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://[::1]:3142
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: looking for approx at http://[::1]:9999
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher at http://[::1]:3142
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: looking for squid at http://[::1]:8000
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: Resolving hostname: getent ahostsv4 apt-proxy
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: apt-proxy IPv4: 10.10.2.7
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: looking for apt-cacher-ng at http://10.10.2.7:3142
[2025-07-27T09:48:48+00:00] auto-apt-proxy: DEBUG: detected proxy: http://10.10.2.7:3142
http://10.10.2.7:3142