Super slow downloads in China
The great firmwall is dropping a huge percentage of packets from the LVFS to users in China, deliberately. This makes some of the larger downloads take many minutes to download, and the speed is unbearably slow.
One of the suggestions on Twitter was to use IPFS to mirror the firmware content (and so IPFS downloads from China would use a node from inside the firewall and thus be super quick. This poses a few problems:
-
We could only mirror firmware not limited by embargo restrictions (although I can talk to the lawyers about this)
-
We probably want to make this opt-in per firmware or per-vendor, perhaps just a
enable_ipfs
boolean on theFirmware
object -
We'd have to store the
ipfs
(the immutable object hash) and ipns (the hash that points to the latest ipfs hash) on theFirmware
object. Theipns
hash would need to be published in the metadata. -
We'd need to use
py-ipfs-http-client
toadd_bytes()
the content withenable_ipfs=True
and noipfs
data. And thenclient.name.publish()
andFirmware
withipfs
and noipns
hash. -
We'd need to install ipfs on the LVFS and allow downloads. I've got no idea on the bandwidth this would require, although making it opt-in from users would provide some kind of slow start
-
The client would need to opt in to using IPFS, either something like
fwupdmgr --enable-ipfs
or infwupd.conf
-- and maybe they also want to specify a gateway rather than using the IPFS daemon. Downloads would need to then useipfs cat
which can be redirected in fwupdmgr, although progress remaining might be tricky.