fix(apt_proxy): https sources take the http proxy too (NetOrk/netork#1811) #64

Merged
christianmanivong merged 3 commits from fix/apt-https-proxy into main 2026-11-01 07:25:56 +00:00
3 Commits
Author SHA1 Message Date
christianmanivong 86959b7599 Merge remote-tracking branch 'origin/main' into fix/apt-https-proxy
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m11s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / test (3.13) (pull_request) Successful in 1m0s
driver / lowest (pull_request) Successful in 33s
driver / build (pull_request) Successful in 33s
driver / security (pull_request) Successful in 1m7s
CI / driver (pull_request) Successful in 2m50s
driver / publish (pull_request) Skipped
2026-11-01 08:21:18 +01:00
christianmanivong c71ddd7fe6 refactor(apt_proxy): smaller parts, under the standard's complexity limit
driver / lint (pull_request) Successful in 17s
driver / standard (pull_request) Failing after 20s
driver / types (pull_request) Successful in 1m8s
driver / test (3.13) (pull_request) Successful in 1m6s
driver / test (3.12) (pull_request) Successful in 1m12s
driver / lowest (pull_request) Successful in 47s
driver / build (pull_request) Successful in 55s
driver / security (pull_request) Successful in 1m33s
CI / driver (pull_request) Failing after 3m0s
driver / publish (pull_request) Skipped
The quality ratchet counted _dump, parse_apt_proxy and _https_direct over
complexity 10 (NetOrk/netork#1811). Same behaviour, same tests.
2026-11-01 08:13:20 +01:00
christianmanivong 3b6c5f9585 fix(apt_proxy): https sources take the http proxy too (NetOrk/netork#1811)
driver / lint (pull_request) Successful in 17s
driver / standard (pull_request) Failing after 18s
driver / types (pull_request) Successful in 1m7s
driver / test (3.13) (pull_request) Successful in 1m3s
driver / test (3.12) (pull_request) Successful in 1m7s
driver / lowest (pull_request) Successful in 33s
driver / build (pull_request) Successful in 28s
driver / security (pull_request) Successful in 1m1s
CI / driver (pull_request) Failing after 2m22s
driver / publish (pull_request) Skipped
apt's https method asks Acquire::https::Proxy and then Acquire::http::Proxy,
for the host and then for all. An 00proxy with the http line alone therefore
sent download.docker.com and every other https source to apt-cacher-ng, which
answers 403 CONNECT denied without a PassThroughPattern, and the whole upgrade
failed.

- The report carries https_proxy, https_per_host and https_settings;
  https_proxy_for(report, host) is the proxy apt takes for one https host.
- check_https_source() fetches one https source the way apt does.
- configure_package_proxy gains an https step: one https source through the
  new proxy. Where the proxy refuses it, 00proxy also says
  Acquire::https::Proxy "DIRECT", later https lines to the same proxy are
  commented out, and the source is fetched direct. An HTTP error from the
  mirror counts as let through.
- apt_fetch_command takes https URLs; comment_out_command takes a scheme.
2026-11-01 07:58:05 +01:00