Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
hyperdrive
Advanced tools
A file sharing network based on rabin file chunking and append only feeds of data verified by merkle trees.
A file sharing network based on rabin file chunking and append only feeds of data verified by merkle trees.
npm install hyperdrive
APIs/protocols might be still break.
Main things missing are:
First create a new feed to share
var hyperdrive = require('hyperdrive')
var fs = require('fs')
var drive = hyperdrive(aLevelDB)
var pack = drive.add()
var stream = pack.entry({
name: 'my-file.txt',
mode: 0644
})
fs.createReadStream('my-file.txt').pipe(stream)
pack.finalize(function () {
var link = pack.id.toString('hex')
console.log(link, '<-- this is your hyperdrive link')
})
Then to share it
var disc = require('discovery-channel')()
var server = net.createServer(function (socket) {
socket.pipe(drive.createPeerStream()).pipe(socket)
})
server.listen(0, function () {
function ann () {
// discovery-channel currently only works with 20 bytes hashes
disc.announce(link.slice(0, 20), server.address().port)
}
ann()
setInterval(ann, 10000)
var lookup = disc.lookup(hash.slice(0, 20))
lookup.on('peer', function (ip, port) {
var socket = net.connect(port, ip)
socket.pipe(drive.createPeerStream()).pipe(socket)
})
})
If you run this code on multiple computers you should be able to access the content in the feed by doing
var feed = drive.get(link) // the link identifies/verifies the content
feed.get(0, function (err, entry) { // get the first entry
console.log(entry) // prints {name: 'my-file.txt', ...}
var content = drive.get(entry)
content.get(0, function (err, data) {
console.log('first block of the file', data)
content.get(1, ...)
})
})
MIT
FAQs
Hyperdrive is a secure, real-time distributed file system
We found that hyperdrive demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.