Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transparently proxy repositories #46

Open
johncollaros opened this issue Oct 8, 2019 · 2 comments
Open

transparently proxy repositories #46

johncollaros opened this issue Oct 8, 2019 · 2 comments

Comments

@johncollaros
Copy link

Hi,

One of the advantages of apt-cacher-ng was that sources.list files didn't need updating.
Just the Acquire::http::Proxy statement, or http(s)_proxy enviroment line were required.

When you start adding other repos for software projects, either manually or using PPAs, this looks like it will be messy. How does the proxy know which repo you wish to use?

@stappersg
Copy link

I wonder how this relates to #34
Is it same thing these (#46 and #34) issues are about?

@johncollaros
Copy link
Author

Hi @stappersg

No, this is to do with configuring repos in sources.list.
https://github.com/cybozu-go/aptutil/blob/master/cmd/go-apt-cacher/USAGE.md

With apt-cacher-ng, I only have to tell apt to use the proxy, either by setting the environment variable :

http_proxy=http://<apt-cacher-hostname>:<apt-cacher-port>
https_proxy=http://<apt-cacher-hostname>:<apt-cacher-port>

or by configuring apt.conf:

Acquire::http::proxy "http://<apt-cacher-hostname>:<apt-cacher-port>";
Acquire::https::proxy "http://<apt-cacher-hostname>:<apt-cacher-port>";

go-apt requires you to change the hostname for every entry in all sources.list files. Eg:

deb http://security.ubuntu.com/ubuntu trusty main restricted

becomes

deb http://<go-apt-cacher hostname>/ubuntu trusty main restricted

Unless I have misunderstood the configuration.
Could someone knowledgeable chime in? thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants