|
|
|
|
|
by dmotz
1295 days ago
|
|
WebTorrent is obviously well suited for p2p file distribution, but using a minimal subset of the protocol also provides a nice hack for easily bootstrapping peer connections between web app users. Piggybacking on public mediums already designed to do peer exchange can let you rapidly prototype a WebRTC project without the hassle of running your own server anywhere. I built a library that explores this idea: https://github.com/dmotz/trystero And here's how it talks to WebTorrent servers to bootstrap peer connections: https://github.com/dmotz/trystero/blob/main/src/torrent.js It also allows encrypting your peers' session descriptions to hide them from the torrent server. All of this is of course experimental and I'm very open to feedback. |
|
I wish more people would pay attention to Trystero because it enables so many interesting use cases. It’s the foundation of https://chitchatter.im/ and I recently wrote about the potential of this library: https://dev.to/jeremyckahn/taking-the-power-back-with-web-me...