Ipfs-companion: Intercept URLs for JS libs at public CDNs

Created on 31 Jan 2019  路  4Comments  路  Source: ipfs/ipfs-companion

Extracted from https://github.com/ipfs-shipyard/ipfs-companion/issues/570#issuecomment-421811923

Summary

Intercept URLs from public CDNs like unpkg.com and load them from IPFS.

Detection

Two ways:

  • Seamless: work with CDN operators to expose assets on IPFS paths /ipfs/<cid>/**/*.min.js
  • Grunt: identify the most popular assets across free CDNs, create a JSON mapping between filename/URL and CID and ship it with ipfs-companion as additional hint for creating redirects.

Additional Resources

kinenhancement help wanted exintermediate P3 statuready

Most helpful comment

Good question. Decentraleyes is limited by the size of assets they can bundle with extension before it gets too big (resources/ directory).

Companion could improve on that by bundling only a small mapping file (but with much better coverage) and fetching the data from IPFS + pin/preload the most popular ones.

All 4 comments

Will this conflict with Decentraleyes or is the plan to deprecate Decentraleyes? If it is, will there be automagic pinning of the newest versions of the libraries?

(Possibly related https://github.com/ipfs-shipyard/ipfs-companion/issues/682)

Good question. Decentraleyes is limited by the size of assets they can bundle with extension before it gets too big (resources/ directory).

Companion could improve on that by bundling only a small mapping file (but with much better coverage) and fetching the data from IPFS + pin/preload the most popular ones.

GitHub repo link to the Decentraleyes fork: https://github.com/IPFS-Forced-Adoption/IPFS-CDN

I will be following it with interest

Was this page helpful?
0 / 5 - 0 ratings