Update readme and security checking messages
This commit is contained in:
parent
6f51d4e17f
commit
1ed6e8f546
3 changed files with 7 additions and 15 deletions
|
@ -12,9 +12,12 @@
|
||||||
|
|
||||||
It is a javascript library that once included in a website, makes every new user a mirror of the specific URL he has opened and allows it to serve it to all the other users that also are accessing the same website, so the website's server doesn't have to.
|
It is a javascript library that once included in a website, makes every new user a mirror of the specific URL he has opened and allows it to serve it to all the other users that also are accessing the same website, so the website's server doesn't have to.
|
||||||
|
|
||||||
This way users can share the content between themselves, and even if the website crashes or goes offline, all the content can be found online (on the CacheP2P) and as long as there are users accessing it will not dissapear from Internet.
|
This way users can share the content between themselves, reducing the number of requests for estatic content to the server.
|
||||||
|
|
||||||
|
If the website crashes or has problems (the script can be included in the server's error page), all the content that users were accessing in that moment can be retrieved from one another and as long as there are users accessing it no problem will be seen.
|
||||||
|
|
||||||
|
For more information, please read the [documentation](http://www.cachep2p.com/documentation.html) or [how it works](http://www.cachep2p.com/api.html) page.
|
||||||
|
|
||||||
### License
|
### License
|
||||||
|
|
||||||
MIT. Copyright (c) [CacheP2P, LLC](https://www.CacheP2P.com)
|
MIT. Copyright (c) [CacheP2P](https://www.CacheP2P.com)
|
||||||
|
|
11
cachep2p.min.js
vendored
11
cachep2p.min.js
vendored
File diff suppressed because one or more lines are too long
4
index.js
4
index.js
|
@ -96,7 +96,7 @@ function CacheP2P(opts, callback){
|
||||||
if(all_links[i].href === got_page.url){
|
if(all_links[i].href === got_page.url){
|
||||||
console.log('found link that points to url', each_url)
|
console.log('found link that points to url', each_url)
|
||||||
var link_to_page = all_links[i]
|
var link_to_page = all_links[i]
|
||||||
self.emit('alert', "Checking sha1 of content received: "+sha.sync(got_page.page)+"...")
|
self.emit('alert', "Security check of content received: "+sha.sync(got_page.page)+"...")
|
||||||
self.emit('success', "Got this site's '" +all_links[i].text+"' in Cache (sha1: "+got_page.page_hash+" ✔)")
|
self.emit('success', "Got this site's '" +all_links[i].text+"' in Cache (sha1: "+got_page.page_hash+" ✔)")
|
||||||
self.emit('success', "The main server will not be used when '"+link_to_page.text+"' is clicked.")
|
self.emit('success', "The main server will not be used when '"+link_to_page.text+"' is clicked.")
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ function CacheP2P(opts, callback){
|
||||||
self.emit('webtorrent', 'Sending this page to peer ('+bytes+' bytes)')
|
self.emit('webtorrent', 'Sending this page to peer ('+bytes+' bytes)')
|
||||||
})
|
})
|
||||||
torrent.on('wire', function (wire) {
|
torrent.on('wire', function (wire) {
|
||||||
self.emit('webtorrent', 'Peer ('+wire.remoteAddress+') connected over '+wire.type+' (Connection ID: '+wire.peerId.substr(0,10)+').')
|
self.emit('webtorrent', 'Peer ('+wire.remoteAddress+') connected over '+wire.type+'.')
|
||||||
})
|
})
|
||||||
// document.title = document.title
|
// document.title = document.title
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue