0

In my network I have Squid proxy server for caching deb-archives. It is installed as squid-deb-proxy package.

I know that special package squid-deb-proxy-client exists in the repositories.
But it requires avahi-utils as a dependency.

How can I set APT on client machines to use squid-deb-proxy without squid-deb-proxy-client?

0

You need to add one line to the APT configuration file /etc/apt/apt.conf or to custom file /etc/apt/apt.conf.d/99proxy:

Acquire::http::Proxy "http://[[user][:pass]@]host[:port]";

where

  • [[user]:[pass]@] are credentials (user is username, pass is password);
  • host is hostname of proxy server or its IP;
  • [:port] is a port (8000 in case of squid-deb-proxy).

Example: http://192.168.12.34:8000 for anonymous proxy -

echo 'Acquire::http::Proxy "http://192.168.12.34:8000";' | sudo tee /etc/apt/apt.conf.d/99proxy

Removal:

sudo rm /etc/apt/apt.conf.d/99proxy
# or 
mv /etc/apt/apt.conf.d/99proxy ~/

See the The Acquire group of man 5 apt.conf.

Note: this line may be added during installation via netboot installer if you have set proxy-server in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.