-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm-node: Add support for WebRTC #1712
Comments
As a small note, WebRTC is unfortunately not available from within JS workers (despite WebSockets being available, don't ask me), so we would have to do some messages exchanges between outside and inside the worker to make that work. |
Considering that we might need to add another encryption layer within the DTLS+SCTP stream, it makes sense to me to simply open one SCTP channel for everything and apply Noise+Yamux to it. As such, I've crossed out the first point.
Maybe it turns out that in the end we'll need to do it, but for now it's not necessary. |
WebRTC should solve a problem related to blacklisted IP addresses, which I won't go into details to avoid someone "exploiting" this (though it's not really an exploit, just a way to be annoying). |
What's left from the transport perspective:
|
After #2352:
|
warning: uses my fork of libp2p and webrtc-rs library Impl: libp2p/rust-libp2p#2622 Spec: libp2p/specs#412 Refs paritytech/smoldot#1712
Closes #1712 Co-authored-by: Pierre Krieger <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
After #2579, what remains to do is:
|
Another thing to do is fix compatibility with Firefox. |
cc libp2p/specs#412 cc #1712 This PR finishes implementing the WebRTC spec by adding the last remaining item: the messages framing. Implementing this messages framing while minimizing the amount of data copies is rather challenging. Instead of going for the complicated solution, I went for the more easy solution of having an intermediate read buffer where data is first copied. Going for the simple solution decreases the chances of bugs and increases the ease of debugging, so it's preferable at the moment. In the future, once WebRTC is fully working, we can rewrite this messages framing code in a more optimized way. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Refs paritytech/smoldot#1712 Impl libp2p/rust-libp2p#2622 - WebRTC transport is enabled for non-validators and developers by default. - The transport will generate and store the certificate, which is required for WebRTC identity, in base dir. In the future, when a new version of `ring` library is released, the certificate will be deterministically derived from the node's peer ID.
Refs paritytech/smoldot#1712 Impl libp2p/rust-libp2p#2622 - WebRTC transport is enabled for non-validators and developers by default. - The transport will generate and store the certificate, which is required for WebRTC identity, in base dir. In the future, when a new version of `ring` library is released, the certificate will be deterministically derived from the node's peer ID.
Closing as done. |
Refs paritytech/smoldot#1712 Impl libp2p/rust-libp2p#2622 - WebRTC transport is enabled for non-validators and developers by default. - The transport will generate and store the certificate, which is required for WebRTC identity, in base dir. In the future, when a new version of `ring` library is released, the certificate will be deterministically derived from the node's peer ID.
See https://github.com/libp2p/specs/ for how to implement this.
Two things need to be done:
bindings-smoldot-light.js
to support WebRTC.The text was updated successfully, but these errors were encountered: