pkgproxy caches packages for apt, snapd, and go module clients, sharing one listener and one persistent cache.
For apt, traffic is proxied between clients and upstream Debian/Ubuntu-style package archives over plain HTTP, and everything fetched is cached indefinitely. Requests are normalized across equivalent mirrors, so that many mirror hosts serving the same archive collapse onto a single backing-store entry. Point apt at it with Acquire::http::Proxy (or the http_proxy environment variable) and keep your sources.list entries naming their real http:// mirrors. HTTPS-only apt sources still reach their real host through a blind CONNECT tunnel (port 443 only) rather than being cached.
For snapd, requests are relayed to the real snap store while .snap downloads and assertions are cached, content-addressed by sha3-384 with hash-verify-before-cache. Point snapd at it with SNAPPY_FORCE_API_URL.
For go modules, pkgproxy acts as a reverse-origin GOPROXY, chaining to an upstream module proxy (proxy.golang.org by default) on a cache miss. Point the go command at it by setting GOPROXY.
The proxy listens on port 3142 by default and keeps its cache in the snap's persistent data directory, so the cache survives updates. The service starts automatically and needs no further configuration on the snap side.
Run pkgproxy.pkgproxyctl setup apt, setup snap, or setup go for
copy-paste-ready instructions on pointing that client at pkgproxy, or
setup lxd to configure an LXD profile so containers route their apt,
snap, and go module traffic through it too. Run on a terminal for
human-friendly guidance, or pipe to sh for a one-liner that applies the
config directly, e.g. pkgproxy.pkgproxyctl setup apt | sh.
Run pkgproxy.pkgproxyctl stats to see what the cache is actually doing:
per-snap download/hit/revision counts and bandwidth saved, and the apt
pool files saving the most bandwidth.
You are about to open
Do you wish to proceed?
Thank you for your report. Information you provided will help us investigate further.
There was an error while sending your report. Please try again later.
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
On a Raspberry Pi running the latest version of Raspbian snap can be installed directly from the command line:
sudo apt update
sudo apt install snapd
You will also need to reboot your device:
sudo reboot
After this, install the snapd snap in order to get the latest snapd:
sudo snap install snapd
To install PkgProxy, simply use the following command:
sudo snap install pkgproxy
Browse and find snaps from the convenience of your desktop using the snap store snap.
Interested to find out more about snaps? Want to publish your own application? Visit snapcraft.io now.