4

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.

4
+50

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.

  • 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

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.