apt-proxy icon indicating copy to clipboard operation
apt-proxy copied to clipboard

HTTPS and authorization

Open Frog-Lover-Antony opened this issue 2 years ago • 1 comments

I am trying to set up a local caching proxy for a debian-based commercial system. The official repository is HTTPS only and requires basic auth. I add a /etc/apt/auth.conf.d/ file with credentials on the client machine so that apt could communicate with the server. Using basic auth URI (https://LOGIN:[email protected]/os) also works with apt/wget/curl/browser.

Starting apt-proxy in docker with docker run -it --rm --name=apt-proxy -p 3142:3142 soulteary/apt-proxy --debian=https://LOGIN:[email protected]/os/ shows no apparent errors during mirror benchmarking but running http_proxy=http://apt.local:3142 apt-get -o Debug::pkgProblemResolver=true -o Debug::Acquire::http=true update on client machine results in Server log:

2023/08/01 10:34:57 {ip} "CONNECT //apt.domain.name:443 HTTP/1.1" (Bad Gateway) 0 SKIP 1.274456ms
2023/08/01 10:34:57 http: proxy error: unsupported protocol scheme ""
2023/08/01 10:34:57 http: superfluous response.WriteHeader call from github.com/soulteary/apt-proxy/internal/server.(*responseWriter).WriteHeader (proxy.go:120)

Is it a simple client configuration problem or there actually aren't easy ways to implement such a thing?

Frog-Lover-Antony avatar Aug 01 '23 13:08 Frog-Lover-Antony

apt-proxy does not seem to work with https at all, I'm not sure why it says otherwise here.

Frog-Lover-Antony avatar Aug 01 '23 13:08 Frog-Lover-Antony