When developers are passionate about P2P, they don't like seeing a signaling server but that's the standard or specification you could say.
I don't want to force developers to use my opinionated signaling server, but we can provide a best effort and redundant scalable signaling network + peer discovery system by default.
Blind negotiation is important so that the signaling can't even read the SDP/ICE messages, this helps with the goal of letting people run hundreds of signaling servers on their own without need to trust them.
E.g. we need to support signaling using HTTPS to join a tiny Kademlia [decentralized] network of RTCPeerConnection including in the browser. Even a long-running peer with a tab open could be contributing to the network, and a long-running node on a server too because the same code already works everywhere cross-platform.
I will check BitTorrent and Nostr to see if we can expand the signaling options. I'm new into WebRTC and this is an early version, so be patient with me haha :) Thanks
This module is meant to be minimal with no usage assumptions. Imagine a TCP or HTTP server/client API with no opinions, but instead of getting a socket you get a RTCPeerConnection that is connected and ready to use.
You could even run your normal backend over WebRTC + RPC with efficient encoding instead of HTTPS/POST/JSON, because like I said like-webrtc works in Node.js too and it's the same code.
It's not documented in like-webrtc but I will expose the Peer class directly to be more modular e.g.:
const a = new Peer(...)
const b = new Peer(...)
a.on('signal', data => b.signal(data))
b.on('signal', data => a.signal(data))
It already works like that internally. If someone wants to benefit from all the features, Noise encryption, perfect negotiation, etc but use different signaling systems then you should be able to do so.
If someone wants to use pure standalone RTCPeerConnection but you want modern WebRTC cross-platform (Node.js, React Native, browser) then you can use: https://github.com/LuKks/webrtc-runtime (used internally by like-webrtc)
If you want to use WebRTC or you have any questions then feel free to contact me: