
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
icebreaker-peer-tls
Advanced tools
npm install --save icebreaker
npm install --save icebreaker-peer-tls
var _ = require('icebreaker')
require('icebreaker-peer-tls')
require('icebreaker-msgpack')
var muxrpc = require('muxrpc')
var os = require('os')
var fs = require('fs')
// for example
var cert = fs.readFileSync('./node_modules/icebreaker-peer-tls/test/public-cert.pem')
var key = fs.readFileSync('./node_modules/icebreaker-peer-tls/test/private-key.pem')
var manifest={
os:{
hostname:'sync',
platform:'sync',
arch:'sync'
},
peer:{
name:'sync',
port:'sync'
}
}
var peer1 = _.peers.tls({port:5059,cert:cert,key:key})
peer1.on('connection',onConnection)
peer1.on('started',connectPeers)
peer1.start()
var peer2 = _.peers.tls({port:5060,cert:cert,key:key})
peer2.on('connection',onConnection)
peer2.on('started',connectPeers)
peer2.start()
var count = 0
function connectPeers(){
if(++count===2){
peer1.connect(peer2)
}
}
function onConnection(connection){
var rpc = muxrpc(manifest,manifest)({
os:{
hostname:os.hostname,
platform:os.platform,
arch:os.arch
},
peer:{
name : function(){return this.name}.bind(this),
port : function(){return this.port}.bind(this),
}
})
rpc.peer.name(function(err,name){
if(err){
console.log(err)
process.exit(1)
}
console.log('\nData from peer:',name)
})
rpc.peer.port(function(err,port){
console.log('port:',port)
})
rpc.os.hostname(function(err,hostname){
console.log('hostname:',hostname)
})
rpc.os.platform(function(err,platform){
console.log('platform:',platform)
})
rpc.os.arch(function(err,arch){
console.log('arch:',arch)
})
_(connection,_.msgpack.decode(),rpc.createStream(),_.msgpack.encode(),connection)
}
MIT
FAQs
icebreaker-peer-tls
We found that icebreaker-peer-tls demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.