A caching proxy specifically for apt package caching, also rewrites to the fastest local mirror. Built as a tiny docker image for easy deployment.
Built because apt-cacher-ng is unreliable.
go install github.com/lox/apt-proxy
$GOBIN/apt-proxy
docker build --rm --tag=apt-proxy-dev .
docker run -it --rm --publish=3142 --net host apt-proxy-dev
docker build --rm --tag=apt-proxy-dev .
docker run -it --cidfile last-cid apt-proxy-dev ./build.sh
docker cp $(cat last-cid):/apt-proxy release/
docker build --tag=apt-proxy ./release
rm last-cid
docker run -it --rm --publish=3142 --net host lox24/apt-proxy
http_proxy=http://192.168.33.1:3142 apt-get -o Debug::pkgProblemResolver=true -o Debug::Acquire::http=true update
http_proxy=http://192.168.33.1:3142 apt-get -o Debug::pkgProblemResolver=true -o Debug::Acquire::http=true install apache2