-
Notifications
You must be signed in to change notification settings - Fork 984
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
webrtc-websys: implement webrtc
protocol for browser-to-browser communication
#4389
Comments
libp2p-webrtc-*
): Follow on work to #4248webrtc
protocol for browser-to-browser communication
I'm interested in tackling private<->private ✋ |
Awesome @retrohacker! |
Yes, but currently not sure where to start 😓 Going to spend some time studying your PR and the spec to get a better idea. Still new to rust and rust-libp2p |
If you still interested in tackling it but need help dont be afraid to ask for it @retrohacker :) |
Hi, I'm joining the wasm-wagon. Note: I'm still learning the library, so the following could be total nonsense. I was trying to implement the By spec, once the two parties have established a relayed connection, The naive solution I thought of was to wrap But at the same time, WebRTC is a transport and should be agnostic about which protocol runs on top of it, still it depends on What am I missing? I feel completely off track. |
Is anyone working on this? |
I don't think anyone has started working on it, no. Although there seem to be a few people interested. For anyone who wants to start, the recommended way is to
This way we can all follow along, review, and contribute as time allows. |
If you have the capacity to start, I highly recommend it! Even if you don't know that much Rust or libp2p it's a great way to learn and gather feedback from others in the community. |
Hello @DougAnderson444! Coincidentally, all this past week I have been working with reaching browser-to-browser communication in mind (specifically, I want to achieve chrome extension to chrome extension communication). What I have done up to this point is:
Have something like this for the ...
SwarmBuilder::with_new_identity()
.with_tokio()
.with_other_transport(|id_keys| {
Ok(
webrtc::tokio::Transport::new(
id_keys.clone(),
webrtc::tokio::Certificate::generate(&mut thread_rng())?,
)
.map(|(peer_id, conn), _| (peer_id, StreamMuxerBox::new(conn))),
)
})?
.with_behaviour(|_| ping::Behaviour::default())?
.with_swarm_config(|cfg| cfg.with_idle_connection_timeout(Duration::from_secs(u64::MAX)))
.build(),
... (Focus on the Here is where I would like to ask for initial guidance. My current plan so to implement this certificate functionality in In any case, I can create the draft pull request linking here! (pointing to merge to master, right?) :) Thanks in advance!! |
Hey @LF-Flores, great to see you here too. Another resource to check out if you haven't already is how the JavaScript implementation of browser-to-browser works (no need to re-invent the wheel, it should similar steps but just in Rust instead of JS) I don't think implementing the Certificate functionality is needed, as the browser websys can already connect to the Rust WebRTC server, it's just the circuit relay parts that need to be designed and coded in. @ferrohd's idea behind a custom relay sounds interesting, I don't think there's necessarily consensus on how best to approach it though. Maybe @thomaseizinger has some suggestions before we start cracking?! |
Correct, you'll need to use |
Description
With #4248, we've implemented a
websys
-based version of the WebRTC-direct protocol via browser bindings. To keep the scope of the PR small, thewebrtc
protocol which allows for browser-to-browser connections has not been implemented. This issue tracks the implementation of that protocol in thewebrtc-websys
transport.Spec is: https://github.com/libp2p/specs/blob/master/webrtc/webrtc.md
The text was updated successfully, but these errors were encountered: