Skip to content

HTTPS and authorization #19

@Frog-Lover-Antony

Description

@Frog-Lover-Antony

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:PASSWORD@apt.domain.name/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:PASSWORD@apt.domain.name/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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions