Open extensionsapp opened 8 years ago
Haven't thought about it, sounds interesting.
But the middleware would only need to add the javascript file at the end of the pages, is that what you mean?
https://github.com/PixelsCommander/ViralJS
I think ViralJS has similar functionality.
@extensionsapp yes, but ViralJS is susceptible to man-in-the-middle attacks. WebTorrent is encrypted and far more secure a technology than ViralJS
@goatandsheep this is fine, make ExpressJS middleware CacheP2P.
var CacheP2P = require('cachep2p');
var CacheP2PContainer = new CacheP2P();
myExpressApp.use(CacheP2PContainer.middleware);
@extensionsapp so the middleware would generate the security file based on the routes?
@goatandsheep I have a two million pages on my site, need create it's list atomaticly.
document.security_sha1 = {
'http://cachep2p.com/': '8a01e1d8c19294d6ad9a4af20cdab1798e4111b2',
'http://cachep2p.com/documentation.html': 'c49db33e97c4f81d8fd7b705e707031a37fbdb1c',
'http://cachep2p.com/contact.html': '299e74db8950463efa30fb5f30bc17d2fcb5b801',
}
@extensionsapp perhaps a webpack plugin
@goatandsheep for the system to become popular, I think it would be good to work in "2 clicks".
npm install cachep2p
var CacheP2P = require('cachep2p');
var CacheP2PContainer = new CacheP2P();
myExpressApp.use(CacheP2PContainer.middleware);
So it would be very good.
@extensionsapp the only way you could to that is with a dynamic security.js file, such that the user's security file is only as big as the number of pages it has cached. When you send your response for each page, you'd send the magnet link. There's no way any user would want to store a 1 million line security file on their computer. and that would kinda defeat the purpose.
We could modify CacheP2P to check the checksum of a specific from the server by opening something like for http://www.example.com/content1 check http://www.example.com/content1.checksum and from there, include only the checksum of the links in that page in the HTML it self, so from there on, it can rely on Caches and have the verifications to ensure all those caches are valid.
Any update for this matter? I have implemented something similar in Python and would be glad to work on a pull request for this feature.
Hello.
How to use CacheP2P on ExpressJS 4? It's possible?