Host a mirror for faster install?


#1

In the last discussion of setting up a mirror of snap, which is 2 years ago, snap download is recommended for internal servers. However, in my situation, it doesn’t work.

Description

For other package management tools like apt, pypi or conda, which anyone could set up a mirror, modify some config file to switch download server. But for snap, after some googling, I failed to find any how-tos to do the same thing.

In China or any location far from US, snap downloads package SLOWLY. In my university in Beijing, I got 40-100KB/s speed when download/install a snap package. It will cost me over 15 min longer for a single snap install command. If there are some way to set up a mirror, it will be convenient for me to issue a mirror sever, like Tuna, the server will download and sync through backbone network like CERNET from main server located in US. Now, the only solution for me is to set http_proxy in CLI or use proxychains4 to speed up the procedure (save time but lost dollars for VPS).

Question

Thus, I’m curious about if any ways to set up a mirror, or any other alternative ways?

PS: Please let me know if I made some stupid mistakes XD


#2

Have you looked into the snap enterprise proxy? It’s free for up to 5 devices. See https://docs.ubuntu.com/snap-store-proxy/en/


#3

Thanks for your reply! Snap enterprise proxy seems another proxy-like solution and also needs a server remotely. In contrast, I could buy a much cheaper domestic VPS which close to backbone network to reduce download time.


#4

Hi, sorry that you are having a poor download experience in China. We will soon be enabling a broader set of global CDN locations for interactive installs/refreshes that will hopefully improve that situation greatly. I will reply here when that is enabled and you can give it a try.


#5

@Minys This has been enabled as of earlier today if you would like to test and provide feedback. If you still have poor performance, please hit the fastly debug[1] site and provide us with the output (via a pastebin or similar)

  1. https://www.fastly-debug.com