logoalt Hacker News

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

65 points • by LuKks • last Sunday at 8:10 PM • 17 comments • view on HN

Comments

mircerlancerous • today at 4:07 PM

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

➕ show 1 reply
dirkc • today at 2:37 PM

Do I understand correctly that this is normal webRTC with a custom signaling server using private/public key cryptography, and STUN and TURN servers I can use?

➕ show 1 reply
totetsu • today at 2:30 PM

I just found cloudflare conveniently has some free tier TURN and STUN server allowance.

jckahn • today at 2:32 PM

Great work! Does this offer something beyond what https://trystero.dev/ provides?

➕ show 1 reply
apitman • today at 5:32 PM

Looks like this depends on a signaling server. I find trystero's approach interesting, where it focuses on using decentralized relays like nostr and BitTorrent for signaling: https://github.com/dmotz/trystero

chr15m • today at 2:55 PM

Single signaling server:

    wss://party.leet.ar:41337
What happens to anybody who builds on this when you turn off your server in a few months time?
➕ show 1 reply
gavmor • today at 4:34 PM

It doesn't have built-in signaling and peer discovery, because that's impossible.

It does look kinda neat, though!

➕ show 1 reply
LuKks • last Sunday at 8:10 PM

Works across browsers, Node.js, and React Native.

- P2P servers. Listen for peer connections anywhere, even in the browser.

- Direct connections. Connect to peers across devices and networks.

- Built-in signaling. Automatic SDP/ICE exchange and negotiation.

- Identities. Shareable cryptographic addresses instead of IP addresses.

- Peer discovery. Announce and find peers using shared topics.

- WebRTC API. Use data channels, audio/video tracks and transceivers.

- Ready to use. Signaling, STUN and TURN configured by default.

just_mc • today at 3:07 PM

At first glance, it seems extremely similar to PeerJS.

Ikersl • today at 4:40 PM

[dead]