5 ms·
Is there a way to do this without the signaling server?
by whitehexagon 2y ago
Is there a way to do this without the signaling server?
- dmotz 2y agoYou might be interested in my side project Trystero https://github.com/dmotz/trystero https://github.com/dmotz/trystero It abstracts away the work of signaling and connects peers via open decentralized networks like BitTorrent, Nostr, MQTT, IPFS, etc.
- fullspectrumdev 2y agoNot had time to read through the docs properly, but would this work for CLI apps (Node compiled to an executable?) or similar? The problems this solves look interesting for a few CLI tools I want to build :)
- evbogue 2y agoI am also curious about the progress on this feature: https://github.com/dmotz/trystero/issues/24 https://github.com/dmotz/trystero/issues/24 for more info
- turblety 2y agoI think the closest you might get is something like the bittorrent dht. There are still bootstrap servers for the first few connections, but there's really no getting away from that, right? https://github.com/webtorrent/bittorrent-dht https://github.com/webtorrent/bittorrent-dht
- tfolbrecht 2y agoNot with the three major browsers and NAT unfortunately. https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Protocols https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/...
- wuiheerfoj 2y agocheck out NAT hole-punching in libp2p: https://docs.libp2p.io/concepts/nat/hole-punching/ https://docs.libp2p.io/concepts/nat/hole-punching/ scroll down a bit for the STUNless/TURNless bit
- deleted 2y ago[deleted]
- iod 2y agoWebtorrent Use a free signalling server from the webtorrent community. You can skip the torrent part of the implementation and just use the signalling, it's awesome. You can use a libraries like: https://github.com/webtorrent/bittorrent-tracker https://github.com/webtorrent/bittorrent-tracker https://github.com/subins2000/p2pt https://github.com/subins2000/p2pt to get started. For me, I found the protocol is simple enough where I just use small vanilla javascipt implementation to talk to the websocket servers to generate the signalling messages. I wish more people knew about this and realize how easy it can be to bring WebRTC to their applications. List of some free webtorrent trackers: wss://tracker.openwebtorrent.com wss://tracker.files.fm:7073 wss://tracker.webtorrent.dev ---> Usage stats for the last one: https://tracker.webtorrent.dev https://tracker.webtorrent.dev Some free stun servers for NAT traversal: stun:stun.cloudflare.com stun:stun.l.google.com:19302
- catapart 2y agoThank you for this! I knew this shit was done by someone already and I've spent two years resisting the urge to re-invent this wheel. p2pt is exactly what I knew was possible and have been looking for!
- nhkcode 2y agoThis is super cool and almost makes it possible building PWAs that only need a dumb http server to deliver the app as a bunch of static files and still allow users to synchronize data between their devices. It still depends on the tracker but if the user could change the tracker it sounds like it's currently the best way to get clients to communicate with each other without depending on a server provided by the PWA.
- Sean-Der 2y agoYep! If you do one non-browser WebRTC agents https://github.com/pion/offline-browser-communication https://github.com/pion/offline-browser-communication This could be possible browser to browser! I don’t think that has ever been an official use case