
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@deconet/libp2p-webrtc-direct
Advanced tools
Dial using WebRTC without the need to set up any Signalling Rendezvous Point!
A WebRTC transport built for libp2p (not mandatory to use with libp2p) that doesn't require the set up a signalling server. Caveat, you can only establish Browser to Node.js and Node.js to Node.js connections.
> npm install libp2p-webrtc-direct
const WebRTCDirect = require('libp2p-webrtc-direct')
const multiaddr = require('multiaddr')
const pipe = require('pull-stream')
const { collect } = require('streaming-iterables')
const addr = multiaddr('/ip4/127.0.0.1/tcp/9090/http/p2p-webrtc-direct')
const webRTCDirect = new WebRTCDirect()
const listener = webRTCDirect.createListener((socket) => {
console.log('new connection opened')
pipe(
['hello'],
socket
)
})
await listener.listen(addr)
console.log('listening')
const conn = await webRTCDirect.dial(addr)
const values = await pipe(
conn,
collect
)
console.log(`Value: ${values.toString()}`)
// Close connection after reading
await listener.close()
Outputs:
listening
new connection opened
Value: hello
Note that it may take some time for the connection to be established.
The libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out:
MIT © Protocol Labs
FAQs
Dial using WebRTC without the need to set up any Signalling Rendezvous Point!
We found that @deconet/libp2p-webrtc-direct 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.