
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@poki/netlib
Advanced tools
The Poki Networking Library is a peer-to-peer networking library for web games, leveraging WebRTC datachannels to enable direct UDP connections between
[!WARNING] This library is still under development and considered a beta. While it's being actively used in production by some games, the API can change. Make sure to get in touch if you want to go live with this so we can keep you up-to-date about changes.
True Peer-to-Peer (P2P) Networking
UDP Performance
Easy to Use
Production Ready
yarn add @poki/netlib
# or
npm install @poki/netlib
import { Network } from '@poki/netlib'
const network = new Network('<your-game-id>')
// Create a new lobby
network.on('ready', () => {
network.create()
})
// Or join an existing one
network.on('ready', () => {
network.join('ed84')
})
// Send messages
network.broadcast('unreliable', { x: 100, y: 200 })
// Receive messages
network.on('message', (peer, channel, data) => {
console.log(`Received from ${peer.id}:`, data)
})
For more detailed examples and API documentation:
Your Game
↓
Netlib API
↓
WebRTC DataChannels
↓
(STUN/TURN if needed)
↓
UDP Transport
While Poki provides hosted STUN/TURN and signaling services for free, you can also self-host these components:
Set up your own signaling server
Using the provided Docker image:
$ docker build -t netlib .
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 -e ENV=local netlib
Or by running the signaling server binary directly:
$ go build -o signaling cmd/signaling/main.go
$ ENV=local ./signaling
For persistent storage remove ENV=local
and set DATABASE_URL
to your PostgreSQL database URL.
Configure your own STUN/TURN servers.
Initialize the network with custom endpoints:
const network = new Network('<game-id>', {
signalingServer: 'wss://your-server.com',
stunServer: 'stun:your-stun.com:3478',
turnServer: 'turn:your-turn.com:3478'
})
We welcome contributions! Please see our Contributing Guide for details. This project adheres to the Poki Vulnerability Disclosure Policy.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
The Poki Networking Library is a peer-to-peer networking library for web games, leveraging WebRTC datachannels to enable direct UDP connections between
The npm package @poki/netlib receives a total of 31 weekly downloads. As such, @poki/netlib popularity was classified as not popular.
We found that @poki/netlib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.