apt-find-proxy, a tool to use APT proxies only if found

APT, the package manager for Debian/Ubuntu has had the ability to use a proxy for many years. However, proxy support is tricky. Suppose you have a proxy at your work, but not at your home? When you take your laptop home, APT won’t be able to update.

Enter apt-find-proxy, my tool to do just that.

There is an undocumented apt.conf setting, Acquire::http::ProxyAutoDetect, which causes APT to run a command to find an APT proxy. This command should return a valid APT proxy URL, or the string DIRECT, which turns off proxying. By using this rather than the Acquire::http method, APT can use a proxy if found and otherwise ignore it.

The easiest way to use apt-find-proxy is to install it from my repository.

Then edit /etc/apt/apt-find-proxy.conf and add your proxies.

By default, apt-find-proxy looks for a proxy at http://apt-cacher.local:3142. Don’t already have a proxy? Install apt-cacher-ng and avahi-daemon from the standard repositories, then set your hostname to “apt-cacher”, and it will just work with apt-find-proxy.

Tags: , , ,

  1. datadores manuais de embalagens’s avatar

    Não conhecia seu blog mas amei o conteúdo. Eu preciso me dedicar mais para
    aprender mais a fundo sobre este desconhecido mundo ( para mim rs
    ). Quais blogs você me indica para me aprofundar mais no assunto ?


  2. Jame Cohen’s avatar

    Thanks for the proxy, I was looking for it for a long time. My follower on Twitter, whom I got with https://soclikes.com/ , suggested to look here, and finally I found it :)


  3. UProxy’s avatar

    Wow, amazing blog structure! How lengthy have you been running a blog for?

    you made running a blog glance easy. The full look of your site is excellent, let alone the content!



Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.