#1120071 auto-apt-proxy: hosts based entries no longer work since version 17

#1120071#5
Date:
2025-11-04 19:31:00 UTC
From:
To:
Dear Maintainer,

auto-apt-proxy no longer works with dns host/ip entries for apt-proxy. They
worked up through version 16.8, which is what trixie released with.

My homelab has a dns entry (on the Ubiquiti router) for apt-proxy
which resolves to my Linux server per the instructions.
root@trixie:~# auto-apt-proxy
http://10.10.10.2:3142

On forky it returns nothing.

#1120071#10
Date:
2025-12-05 21:47:32 UTC
From:
To:
Hello,

I've identified the root cause of this regression and created a patch to fix it.

Root Cause:
Commit c2d0159 ("Check for explicitly configured proxies before trying
the gateway") inadvertently removed the
DNS-resolving functions v4_explicit_proxy() and v6_explicit_proxy()
from the detection flow. The code now only
checks /etc/hosts statically via v4_explicit_proxy_etc_hosts and
v6_explicit_proxy_etc_hosts, skipping DNS lookups
entirely.

Fix:
I've submitted a pull request with a minimal one-line fix that
restores DNS hostname resolution while preserving
the intent of commit c2d0159:

https://github.com/terceiro/auto-apt-proxy/pull/4

The patch adds back the DNS-resolving functions to the detection
sequence, allowing configurations that rely on
DNS search domains to work again. This is particularly important for
portable laptop setups that need graceful
fallback when away from the home network.

Testing:
I've verified the fix works correctly on Ubuntu 25.10 (v17), restoring
the same behavior as v16.8 on Debian Trixie.

Please let me know if you need any additional information or testing.

Thank you!

- Kirt

#1120071#15
Date:
2025-12-08 04:29:26 UTC
From:
To:
I can confirm this bug and Kirt Runolfson <kirt@tcd.org>'s fix.

I installed forky via the debian installer weekly build of November
30th on a virtual machine. I use bind 9 for DNS resolution. I have an
alias for apt-proxy, which works just fine for trixie installations,
including on this VM. However it failed under forky. Mr. Runolfson's
patch made things work again.

Thank you.

root@testing:~# host apt-proxy
apt-proxy.localdomain is an alias for issola.localdomain.
issola.localdomain has address 192.168.100.12
root@testing:~#

#1120071#20
Date:
2026-08-11 22:46:22 UTC
From:
To:
Hi,

Can you please run aith AUTO_APT_PROXY_DEBUG=1 and share the output?

#1120071#25
Date:
2026-08-14 17:45:19 UTC
From:
To:
Hi Antonio,

I switched to using an SRV record on my router, so that would not be an
easy test. When filing this bug, I also wrote up the problem in more detail
on the GitHub page and provided a simple PR to fix the reversion. I think
that bug report and the PR contain all the detail we need. Please let me
know if that isn't the case.

#1120071#30
Date:
2026-08-14 21:16:54 UTC
From:
To:
Ah, true, I don't really pay much attention to GitHub. Thanks, I will
apply your patch.

#1120071#35
Date:
2026-08-18 14:23:13 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
auto-apt-proxy, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1120071@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Antonio Terceiro <terceiro@debian.org> (supplier of updated auto-apt-proxy package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 18 Aug 2026 11:05:20 -0300
Source: auto-apt-proxy
Architecture: source
Version: 18
Distribution: unstable
Urgency: medium
Maintainer: Antonio Terceiro <terceiro@debian.org>
Changed-By: Antonio Terceiro <terceiro@debian.org>
Closes: 1120071 1124369 1128058 1142542
Changes:
 auto-apt-proxy (18) unstable; urgency=medium
 .
   [ Paride Legovini ]
   * Revert "autopkgtest: drop test for squid-deb-proxy"
 .
   [ Antonio Terceiro ]
   * Log a message when default gateway can't be looked up
   * hit(): prevent apt-helper call from recursing into auto-apt-proxy
     (Closes: #1142542)
   * detect_squid_deb_proxy: fix log message
   * Give higher precedence to squid-deb-proxy
   * auto-apt-proxy.conf: drop unused auto-apt-proxy::Debug "setting"
   * wait for network to be online
   * Add ability to lookup default gateway with networkctl
   * Use a unique output directory per run
   * avahi: iterate over all address broadcast as potential proxies
   * avahi: handle unrouteable addresss (Closes: #1124369)
 .
   [ Tj ]
   * use legal SRV name (Closes: #1128058)
   * Rename AUTO_APT_PROXY_AVAHI_NAME to AUTO_APT_PROXY_MDNS_NAME
   * Add systemd-resolved mDNS support
 .
   [ Kirt Runolfson ]
   * Restore DNS hostname resolution for apt-proxy (Closes: #1120071)
Checksums-Sha1:
 d3ab241f9cf08257bf07bbe35959d703a2294e59 1843 auto-apt-proxy_18.dsc
 cb9f8feb0c3e963b6507be1fe0977b363938dc55 23628 auto-apt-proxy_18.tar.xz
 e2bafcea92ab83445f052c39aaf85f9fb805bf95 6553 auto-apt-proxy_18_source.buildinfo
Checksums-Sha256:
 4fe629bf4e3c65fb2df756355a6952958a5e9a5a2f063415268e169658a93ddc 1843 auto-apt-proxy_18.dsc
 1507d3b22c5f12d610fa92158538f4351b5a983410913894e053450e21b3be59 23628 auto-apt-proxy_18.tar.xz
 78fab503fd96aadc774603b2e448096c1762f3d8fe96141cc9a8eae6052f5808 6553 auto-apt-proxy_18_source.buildinfo
Files:
 af04d510b8eea0b939ea90a80073058e 1843 net optional auto-apt-proxy_18.dsc
 738b4cb180fe1edbcddc2aec2ddc1cf6 23628 net optional auto-apt-proxy_18.tar.xz
 a26e952e63d7ff03c3e23971b94df9b7 6553 net optional auto-apt-proxy_18_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmqEaXcACgkQ/A2xu81G
C96oyA//Swc1t9ABvI4giLpm0aLs5u/e4unT9KzdgQDMSm3BtupRiXQF+3af55Jb
Phn/X4p+WGXxFzlzlmmaTrRu+saI76g8p7qWWso2Al5VSYetDUEWpJ+Qt2Oe5Q8a
WT6L3MYavWqsevYcqrAcFDtnhAfV1UM10Pz5dtt6v4ej7jevz/+f5RhgIzZ80KnT
a1Pa5vxM7AcfhsDcbIfSMhjZUDJlFtKXxNlWhz0w5lJ7j12SOs6qvOYSzB/DoBGk
P9OUAfcwYkDwAL3aDNY9QBBuxRxp3cnA3UNdXZerTTAzNADVhZkGM4NcWcWI4acr
HI/ClTDuZKC7uV8drk73LLo/qrPBiDM4AOYvBnMTrQxsINzK9bAlP/oSXz4afxVh
HFXC9s34FIE2MaoTJZDXrZSSX6mCHFBIuBbZsEde8CqgLhAlJtY3YJAGSpq6wQJ9
0Jowl2SU4CTNrgEp+qb/kSTzSk+GoF2wdQy8xMQ6MGjJoSdw00oLuXxyGL80pCLT
KWjXPqVJUAJ2j6dTIyfciSaSoWOCRPCLjE66KxPFL24WKoRtdIbDe1kktXX9jpz6
tnp8dv9+ViqcbhSTeST7ilb21miyakaed8c1hX8tJiBwU5xt8xpvsIeqTGq2Swgk
+O2YSz1NnF5Iil7AQalrMys5/AzjFB+T6sMYZED3UgN9ACQTSFU=
=ew+U
-----END PGP SIGNATURE-----