ipfs-companion icon indicating copy to clipboard operation
ipfs-companion copied to clipboard

Intercept URLs for JS libs at public CDNs

Open lidel opened this issue 6 years ago • 4 comments

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

lidel avatar Jan 31 '19 14:01 lidel

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)

Mikaela avatar Apr 02 '19 10:04 Mikaela

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.

lidel avatar Apr 02 '19 11:04 lidel

Decentraleyes fork using IPFS:

https://www.reddit.com//r/ipfs/comments/hu7bij/a_fork_of_a_fork_of_the_web_extension/

autonome avatar Jul 20 '20 21:07 autonome

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

I will be following it with interest

Mikaela avatar Jul 21 '20 07:07 Mikaela