Acquire::http::proxy ignored / used inconsistently?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Problem description
I have a client (A) and a freight server (B) serving apt packages on the same network. I also have a proxy server (C), which the client uses to talk to "the internet". When I run `sudo apt update`, my client talks to the freight server directly, without contacting the proxy. However, when `apt.daily` runs, the client contacts the proxy, which then connects to the freight server.
Expected behavior
Although updates work in both cases, the current behavior is inconsistent. The proxy should be used in both cases or in neither case.
Setup details
I use Ubuntu 22.04.4 with apt 2.4.11 (amd64). /etc/apt/
Note: I am aware that proxy exceptions can be configured using the "DIRECT" keyword.
description: | updated |
Hi there,
the bug tracker is not the right place for user support. APT does not suddenly pick different proxies when running as a service. It does respect your http_proxy and no_proxy variables. Please note that while http_proxy does not override Acquire: :http:: proxy, no_proxy does. It sounds likely that when you run update manually, you have your freight server in the no_proxy variable.
You have plenty of options to configure this more reliably, such as
1) configure Acquire: :http:: proxy:: archive. ubuntu. com to only proxy for archive.ubuntu.com (repeat for all hosts you want proxy) :http:: proxy to your proxy and configuring Acquire: :http:: proxy:: freightserverho stname "DIRECT" :http:: proxy (or http_proxy) and set no_proxy in /etc/environmen t(.d)
2) configure Acquire:
3) configure Acquire: