A fork of the webextension Decentraleyes that redirects some CDN traffic to IPFS


I forked a fork of a fork of the Firefox extension Decentraleyes, but instead of redirecting certain CDN traffic to your local file system, it uses IPFS.
If you have the extension IPFS companion installed and “use custom gateway” enabled, your custom gateway will be used for the CDN traffic, otherwise the official IPFS public gateway will be used.
Currently, only all of the jQuery (Core, UI, etc.) files on the jQuery CDN and some on the Microsoft CDN are redirected, but I want to expand that list.

You can check out the extension here https://addons.mozilla.org/en-US/firefox/addon/ipfs-cdn/. It is available for both Firefox Desktop and Android.

The source code is here: https://github.com/IPFS-Forced-Adoption/IPFS-CDN
I added a very simple Python script to allow you to check that all of the listed hashes in the extension file map to a real copy of the original file.

The extension works on Google Chrome just fine without any alterations, but I haven’t planned to publish it there, yet.


This is interesting creative idea. I took a look at code, list of components is way too small to have any real world effects, there are way more CDN and JS frameworks.

It will be good to have auto updateable list of files probably using ipns. To support auto generation of such list we can have statistics on used js or font files and if user allow, report most used to Central server so they can be included in list.

Yes, and many websites (almost) exclusively use their own CDN nowadays, like this website.

So yeah, I could have my extension periodically fetch the list (or a bloom filter of it) of hashes that have been cached on the IPFS. I am not sure if I would like to serve the entire content over IPNS, maybe just the list of available content.

For every suitable web request, my extension would still dial up the original URL to fetch the header and extract the (strong) ETag, so I can verify the authenticity of the content served over the IPFS using that ETag. This only works if I can guess the hash function used for its creation (if it is a hash) and if the function is reasonably collision free. I am sure few people salt their ETags, luckily.
Then you wouldn’t even have to trust whomever maintains the redirection list and I could allow the users of my extension to automatically update the list without having to audit anything myself.
Of course, having users automatically update the list over pubsub without a central server sounds awesome, but it would probably make it very easy for anyone to track people’s surf history (I am very new to pubsub and will continue reading on it, maybe there is a way to satisfactorily anonymize your surf history).

Then, there is the important issue of privacy. Obviously, I cannot have the extension cache anything that has been requested with POST/COOKIE-parameters or wants to set cookies itself. Hopefully, that would be enough.

Overall, I guess maybe even 30% of all content would be cacheable this way.

I’m very inexperienced, so please feel free to point out any thinking errors I made.

Are you familiar with LocalCDN? It’s a fork of Decentraleyes with a lot more supported CDNs, but I didn’t see any simple way to copy them over.

Sorry for the Lage answer. I know LocalCDN. I actually know two addons called LocalCDN, one of my addon is a fork of, which I forgot to mention.

I have been busy the last days, but will upload my new add-on that I mentioned today or tomorrow. I guess I will abandon the original IPFS CDN and focus on the new one. Because the new one will cache everything automatically, anyway.

The code is 95% done, hopefully the Mozilla reviewer accepts my add-on as safe enough to use.