← Wed, Nov 11 digest

Peer-to-peer WebRTC connections with built-in signaling and discovery

read article ↗ hn thread ↗

like-webrtc is a JavaScript library providing peer-to-peer WebRTC connections across browsers and Node.js with built-in cryptographic identities, signaling, and topic-based discovery.

summary is enough The library offers a clean API for WebRTC, but follows familiar patterns seen in existing tools like Trystero and PeerJS.

summary

The library wraps WebRTC to allow browsers and Node.js instances to listen for direct connections using public-key cryptography as addresses. It includes a default WebSocket signaling server and STUN/TURN configurations out of the box for NAT traversal and topic-based discovery. Commenters compare it to tools like Trystero and PeerJS, noting that a central relay infrastructure is still required for setup.

key points

  1. Uses public-key cryptography to give peers shareable cryptographic addresses instead of raw IPs.
  2. Enables peer discovery through shared topics for both direct connections and swarms.
  3. Comes pre-configured with default STUN, TURN, and WebSocket signaling servers for immediate out-of-the-box usage.

who should read it

JavaScript developers building real-time, decentralized, or peer-to-peer browser applications.

discussion positive

consensus

Commenters discuss how the library compares to existing tools like Trystero and PeerJS, emphasizing that like all WebRTC solutions, it still requires central STUN and signaling infrastructure to bootstrap connections.

pushback

A few users point out potential risks in depending on the author's hardcoded public signaling server if it goes offline.

best comment by mircerlancerous ↗

Just to make sure it's clear, this is not a fully in-browser solution; unfortunately an external STUN server is still required. Would be great if the browser gave us a way to discover peers fully in-browser, even just on a local network

Clarifies the technical reality that external STUN and signaling servers are unavoidable for modern browser-based peer discovery.

Generated by an LLM from the article and thread. Check the sources before relying on it.