Why does this contain both data channels and WebTransport? Isn't the latter just more data channels?
edit: OK, I found this issue.
https://github.com/WICG/local-peer-to-peer/issues/29
Ugh... this is just so poorly thought through. We keep ending up with overly complex protocols that have too many states and too many options and too many control messages to accomplish what a more simple API could provide, and so to implement all of this we keep needing too much code and too many special cases and too many round trips to establish anything.
https://wicg.github.io/local-peer-to-peer/#security-same-ori...
The W3C won't ever adopt a system like this. They intentionally nerfed all local-loopback servers to never be able to effectively use websockets or ssl. That seems like a place to start before adopting this.
I honestly don't believe we will be able to meaningfully change or improve browsers without abandoning the w3c and starting standards over almost from scratch. Brave exists, but we would need to do better than that and design more general p2p protocols and systems.
I made something that achieved similar results with existing technologies by abusing STUN/TURN. It does not handle discovery but it does allow local communication without a server.
https://blog.yifangu.com/2024/07/16/crossing-the-mixed-conte...
Local peer to peer? Please, just give us QUIC API for Peer-to-peer Connections https://github.com/w3c/p2p-webtransport and bring back Network Discovery https://www.w3.org/TR/discovery-api/ or something like it.
Conflating a couple separate specs together for a single use case is bad. Keep specs lower level. P2p connectivity should be a thing, unto itself. Local networking should be a thing.
See also, direct socket API in Chrome 131, 5 days ago, https://news.ycombinator.com/item?id=42022649