An internal package repository should not have to leave the office network and come back through an external proxy. You can give APT a host-specific exception without disabling the proxy for every download.

For example, an APT configuration fragment can contain:

Acquire::http::Proxy "http://proxy.example:8080/";
Acquire::http::Proxy::packages.office.example "DIRECT";
Acquire::https::Proxy::packages.office.example "DIRECT";

The example keeps a default HTTP proxy and exempts the named repository host for both listed transport settings. For its external default route, the HTTP proxy list offers candidates when public proxies are allowed; keep the internal repository direct. Set any required default HTTPS proxy separately to match the actual environment.

Use a host, not a repository URL

The suffix is a hostname: no https://, no path, and no trailing slash. Several repositories on the same host share that routing exception. It is not a per-directory firewall rule.

DIRECT is an APT proxy-selection value, documented in the HTTP transport manual. It does not mean “use a different mirror,” and it does not change which packages the repository publishes.

Follow the download beyond its first URL

If a repository redirects to another hostname, that request has its own routing decision. The same applies when metadata and package archives come from different hosts. Keep exceptions aligned with the hosts the internal service actually needs.

A direct route also needs ordinary reachability and correct certificate trust. A successful bypass selection cannot make an inaccessible internal server respond.

Review the effective APT configuration after placing the fragment in the normal configuration directory. A later host-specific entry can change the result. Avoid copying a browser's wildcard bypass syntax into this key; APT's documented host setting is the relevant interface.

Erthyglow kevrennek