I'm currently running squid-deb-proxy to cache apt-related downloads, I was wondering if the same could be done with snaps as well.


The squid-deb-proxy works because the files are served over plain HTTP, and generally do not require authentication (ones that do are usually over HTTPS and tend to not be cached).

Snaps however, are served over HTTPS due to the inherent requirements of authenticating to the store, and the possibility that some snaps are for purchase, and similar situations. To cache the data via a proxy, you will need to break the TLS connection by creating a certificate which you own, and which can be seen as valid by snapd when it attempts to verify the certificate.

| improve this answer | |
  • That's unfortunate, so that means aside from having a convoluted setup, there's no easy way to do this? I've had a working squid with ssl enabled before but success seem to be a hit 'n miss in most cases, decided to scrap it all together. – Rey Leonard Amorato Jun 9 '18 at 11:43
  • Well, it's HTTPS, and all traffic is end-to-end encrypted, so in order to cache it somewhere in the middle, you obviously need to break that encryption. You could cache chunks of encrypted data, but there's no way to know what the data contains, or if it will remain valid (even if it was valid, it'd only still be valid for the one client, not all clients in the network). – dobey Jun 9 '18 at 12:16

At the first glance Ubuntu has Snap Store Proxy but then if you'd look closer into it you'll realise they expect that:

  • you shall tinker with Postgresql
  • configure some un-explained "domain name"
  • generate keys and then register this proxy
  • wait till they approve it

and only then you'd be able to save time and traffic with caching… "For evaluation purposes, we automatically grant the use of up to 5 devices."

| improve this answer | |
  • This last comment is gone now. It seems you can use unlimited number of devices – Adam Ryczkowski Feb 15 at 18:29

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.