Web lists-archives.com

Re: apt-cacher-ng related program and package suggestion

* tuxderlinuxfuchs77@xxxxxxxxx [Wed, Jun 14 2017, 09:57:50PM]:
>    Hello,
>    I have a suggestion for a client program/package in combination with
>    apt-cacher-ng
>    Consider following situation:
>    User U_A has a laptop which he uses at home and at university
>    He has a poor internet connection in both places.
>    So he set up apt-cacher-ng services in both places but they are on
>    different networks (he does not have permission to change the network
>    settings at university to make the IP addresses of the apt-cacher-ng
>    servers math)
>    Lets say at home the server HOST_1 is [1]
>    At university: server: HOST_2: [2]
>    He uses Ubuntu (so this should work for Debian in a similar way).
>    He makes a backup "/etc/apt/sources.list.bak" of /etc/apt/sources.list
>    At university he sets up the cache repo as follows (after overwriting the
>    /etc/apt/sources.list with a copy of the backup if it was changed to use
>    the home apt-cacher-ng)
>    sed -i 's/de.archive.ubuntu.com/'
>    /etc/apt/sources.list
>    The same procedure at home.
>    The shown way is not very comfortable.

You can automate this easily with a one-liner in /etc/network/ip-up.d/ ,
for example.

Actually, apt-cacher-ng provides a similar kind of automation but it can
only decide between "use a proxy" and "don't use a proxy" and the need
to switch by checking whether that proxy server is broken/unreachable by
timeout or a user hook script. This can be used well in a proxy cascade,
i.e. one apt-cacher-ng running on the mobile device itself in
non-storing mode, and local applications use that proxy on localhost.

There is, however, no support for multiple proxies that would be
switchable upon the mentioned conditions check. This could be added,
maybe in future. Please open a feature requeston Alioth (apt-cacher-ng
space) or in the BTS.


Every great idea is worthless without someone to do the work. --Neil Williams