7 ms·
Overlay networks based on WebRTC
- EGreg 3y agoGood work! I just want to point out that WebRTC requires servers for STUN and TURN. If I may, we also developed an open source solution for WebRTC videoconferencing, livestreaming and even peer-to-peer broadcasting to unlimited numbers of people! Feel free to use it: https://community.qbix.com/t/teleconferencing-and-live-broadcasts/181 https://community.qbix.com/t/teleconferencing-and-live-broad...
- megous 3y agoIt does not require either of those.
- ongy 3y agoNAT traversal is the first point on the feature list of the linked repo. So in context, it's important to point out. While in theory it doesn't it reduces the possible connections quite a bit. Though STUN servers are plenty on the internet and free to use. There's even a service providing TURN (US geo though), but I have no idea who runs it and what their business model is, so I wouldn't rely on it.
- eyegor 3y agoHaving used webrtc in offline environments (host device broadcast a local wifi), I can say it's a royal pain to use without ice/stun/turn servers. I had to manually mangle the sdp packets to make it work because browsers would randomly decide they needed ip privacy (from the device they connected to by ip...) where they'd translate ips to some_hash.local and try to find a turn server. I tried hosting a coturn server too, but browsers would sometimes ignore it since it was a local address. Mangling the sdp handshake is reliable but feels pretty jank.
- xori 3y agoHyperswarm has been my go-to for stuff like this, but you bring up a good point that I don't think it's encrypted. https://github.com/holepunchto/hyperswarm https://github.com/holepunchto/hyperswarm
- apitman 3y agoOnto the list[0] it goes. I always have the feeling that WebRTC had so much more potential than has been realized. I wonder how things might have turned out differently if it had better server and browser support ~5 years ago. I remember trying to use it for a game at the time and had trouble finding a good server implementation, and had all sorts of issues with Safari. In the near future I'm not sure there will be much reason to use it over WebTransport, unless you're doing p2p. I actually prefer WebRTC's data channel API, since you can get separate datagram streams, whereas with WebTransport you have to multiplex them yourself[1]. [0]: https://github.com/anderspitman/awesome-tunneling https://github.com/anderspitman/awesome-tunneling [1]: https://datatracker.ietf.org/doc/html/rfc9221#name-multiplexing-datagrams https://datatracker.ietf.org/doc/html/rfc9221#name-multiplex...
- billywhizz 3y agoi've long felt the same. i came to conclusion the browser vendors decided it was kind of a mistake. it enables all sorts of local first and p2p things that cut out the service providers. hopefully it will get some attention again. i have done a bunch of really interesting experiments with data channels. being able to choose the reliability is nice for sure.
- treyd 3y ago> it enables all sorts of local first and p2p things that cut out the service providers. And this is another reason why the web will always be a shaky foundation for local first and p2p software.
- deleted 3y ago[deleted]
- Sean-Der 3y agoWebRTC will live on. I think it will continue to grow from grassroots efforts. WebRTC has P2P and it also doesn't require the user to have any knowledge of Video/Networking. The alternatives to it are more geared at 'video developers'. I don't know which way the future will go.
- 3y ago
- rmdes 3y agoFelicitas is one of those devs, every repository on her profile is a gem to learn from, and well documented!
- tptacek 3y agoI can't tell for sure without actually checking the repo out but this looks to be GCM with random nonces using a command line flag string as the fixed key for the network. If you're trying to build a modern encrypted multipoint overlay network, MLS is a good place to start.
- k__ 3y agoIs this like web-onion?
- egberts1 3y agoThat's the first thing I disable in all enterprise/office PCs' browser: WebRTC. Disclosure: I am an cybersecurity architect of IDS/NDS/XNS.
- deleted 3y ago[deleted]
- egberts1 3y agoMeh, WebRTC ... it's not for everyone.
- bjconlan 3y agoI'm curious as to why? Introduce difficulty to promote some ICE holepunching access to the device?
- nottorp 3y agoI don't know why the OP disables it, but chrome used to block my desktop from sleeping because 'WebRTC has active peer connections'. I don't appreciate web pages or applications or whatever blocking my system from sleeping so i just turn off WebRTC since then. Edit: I was not doing anything related to video, audio, p2p or anything else implying long running connections explicitly. Some "experts" were doing it behind my back on their pages. Don't know and don't care why.
- egberts1 3y agoPerhaps holepunching of a certain offsite JS-based app in your browser is the problem there. InfoSec know this all too well. Things like JS-based portscanning, file-less malware in JS datastore, …
- mrkramer 3y agoWebTorrent[0] is also good WebRTC P2P project. [0] https://en.wikipedia.org/wiki/WebTorrent https://en.wikipedia.org/wiki/WebTorrent
- evbogue 3y agoI recently started using Trystero to send messages and video around via WebRTC. https://oxism.com/trystero/ https://oxism.com/trystero/
- pappapisshu 3y agoADGT.js [0] was another P2P overlay network based on WebRTC. [0] https://doi.org/10.1002/cpe.4254 https://doi.org/10.1002/cpe.4254
- lostmsu 3y agoI am actually working on something like this in https://borg.games https://borg.games ( also see https://github.com/BorgGames/borggames.github.io https://github.com/BorgGames/borggames.github.io ) Basically the idea is that the only endpoint available through regular HTTPS is the signaling server, and the other services are accessible via WebRTC by requesting peers from the signaling server with service's public key. There are multiple things I am planning to layer over p2p connections: CDN, virtual LANs to play games "locally", gameserver hosting, etc
- dboreham 3y agoWebRTC is widely misunderstood. It is not a p2p-enabling technology. It requires a mechanism for passing messages between nodes prior to establishing a session (this is called "signaling" in the literature). So it's another turtle layer: it's a scheme for communicating between nodes provided they can already communicate. So why does it exist? Answer: to reduce the cost to provide a service where bulk data flows are p2p. It does this by trying to get said flows over UDP with NAT traversal directly between the host networks for communicating nodes. The canonical example is internet telephony. But it does this on the assumption that there will be a long tail of node pairs for which a hairpin route through a server will be needed. It doesn't remove the need for servers, only the resources needed for those servers. Everyone who says they have built a true p2p system with WebRTC is confused[1]. [1] You can build such a thing with WebRTC, but only if the nodes are not browser hosted and have public IPs. If you think that's useful then you're also confused.
- Sean-Der 3y agoWhat protocols/networks do you consider P2P? Every P2P technology I have used requires some bootstrapping. I have done WebRTC with zero signaling, but browser only one side[0]. I wish the w3c/ietf would care, but that’s the issue with corporate/profit driven standards! [0] https://github.com/pion/offline-browser-communication https://github.com/pion/offline-browser-communication
- Uptrenda 3y agoBootstrapping is an interesting problem. If there's a large P2P network (think like Gnutella) there's papers that have proposed using port scanning of residential IP ranges to find peers that belong to the network. It's an interesting approach because there's no centralized bootstrapping servers. But, port scanning is inefficient and such an approach may only be viable if a network is large (I may be wrong here.) Still, I think it's cool how little work has been done on these problems. I am still really into p2p networks. For my own project I observed that all of the main networks in some way still depend on trusted introduction points. Just many of them and combined. So I think using infrastructure that's federated and open is a good design (in my case: public MQTT servers is what my own software is based on.)
- Uptrenda 3y ago[...] using STUN. I'm convinced no one actually knows what STUN is. I always see these references to STUN in P2P contexts. STUN is just a shitty protocol that shows what your external IP and port is. That's literally it. You can't use it by itself to do any kind of NAT traversal. There is an RFC that lists how to use STUN lookups to enumerate a NAT (but its far from definitive) and anything useful requires looking at other papers about NATs to apply the results. This is what you would need to do before you did hole punching. [...] webrtc. See, the thing about webrtc is: its a vague, low-quality spec. It uses over-simplified descriptions of peers, NATs, and hole punching algorithms, over a design that would provide better reachability. But the approach that webrtc takes is to just fallback to TURN for edge-cases (TURN is a proxy protocol.) The problem with that is it's likely that TURN will be used significantly for things like mobile devices due to symmetric NATs. This means maintaining infrastructure for your 'p2p' system when you don't have to. Overall, I am a fan of the fact that webrtc is in the browser and its 'standardized' but I think that the actual implementation of what its trying to achieve doesn't work well for the real Internet.
- samtuke 3y agoAwesome it's AGPL3 licensed