Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
auto-peer.js automates the peer.js connection establishment and connects all auto-peer.js clients with each other using webRTC.
The auto-peer.js library is an experimental webRTC client/server library which relies heavily on peerjs and socket.io
The idea auto-peer.js was developed when creating a multi media installation for a couple of tablets. It should allow to communicate from tablet to tablet as fast as possible.
from http://engineering.spilgames.com/mastering-webrtc/
auto-peer.js core consists of a node websocket backend and a client side script. When the user opens the application a new client is created. This client asks the backend to tell all existing clients to establish a new webRTC connection.
Take a look at the example directory.
Server
var app = require('express')();
var http = require('http').Server(app);
var autoPeer = require('auto-peer')(http);
app.get('/', function (req, res) {
res.sendFile(__dirname + '/index.html');
});
http.listen(3000, function () {
console.log('listening on *:3000');
});
Client
<script src="/auto-peer.min.js"></script>
<script>
// Please get your own free key at http://peerjs.com/
var autoPeer = new AutoPeer({key: 'lwjd5qra8257b9'});
autoPeer.on('example-message', function(data){
console.log('received data', data);
});
autoPeer.send('example-message', 'This is a message to all connected peers');
</script>
auto-peer.js is an experimental library and was not meant to be used in productive environment. As a client is able to send commands to any other client you should never evaluate html or javascript code transmitted by auto-peer.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Copyright (c) 2014 Jan Nicklas. Licensed under the MIT license.
FAQs
Automatic peer connection
The npm package auto-peer receives a total of 5 weekly downloads. As such, auto-peer popularity was classified as not popular.
We found that auto-peer 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.