npm-kubo
npm-kubo copied to clipboard
Leverage IPFS nodes for download
Downloading from dist.ipfs.io
may fail due to routing or service issues.
It does not leverage the fact that data could be downloaded from a local IPFS node, or alternative gateway.
Switching download logic to something like ipfs-or-gateway should mitigate issues described in https://github.com/ipfs/npm-go-ipfs-dep/issues/37, where our gateway broke CI for various projects.
The idea
- introduce an implicit (but configurable) list of gateways to try
- try downloading from each of them, in order, and fail only when all of them fail
- default list should work for most of people:
[default local, default public]
- try local IPFS gateway first (default:
http://127.0.0.1:8080/ipns/dist.ipfs.io
) - if that fails, fallback to a public one (default:
https://ipfs.io/ipns/dist.ipfs.io
)
- try local IPFS gateway first (default:
- allow people to provide their own list (to use own nodes, or trusted public ones such as cloudflare)
@aphelionz would that help?
Seems good, let's give it a shot!