Skip to content

Draft: WebRTC Implementation for Browser to Browser #5978

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

elijahhampton
Copy link
Contributor

Description

Closes #4389. WebRTC implementation for browser to browser. This PR is currently in draft. More functionality will be added in the coming days. The PR is open for feedback and suggestions as the implementation is completed.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

…sport to work with a relay server. Implements a protobuf stream wrapper to write Signaling messages over the relay. Exposes the rtc peer connection on a Connection.
Copy link
Contributor

mergify bot commented Apr 8, 2025

This pull request has merge conflicts. Could you please resolve them @elijahhampton? 🙏

…unctions to libp2p_webrtc_utils. Adds tracking for connection states through callbacks for SignalingProtocol. Creates directory for circuit-relay-v2 implementation.
Comment on lines 1 to 4
fn main() {
prost_build::compile_protos(&["src/proto/message.proto"], &["src/proto"])
.unwrap();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick FYI, we should not use prost but instead use quick-protobuf :). See #3024

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks for catching that.

…y with browser transport, not feature gated. Addition of circuit relay v2 package to libp2p exports. Addition of circuit relay v2 protobuf structures.
@elenaf9 elenaf9 self-requested a review April 17, 2025 11:37
@elijahhampton
Copy link
Contributor Author

@DougAnderson444 @dariusc93

Hello, I have pushed my updates for the progress I've made on this PR. I am stuck with the dialing process to the relay server. Do you mind reviewing the PR and potentially providing some guidance on what I might be doing wrong? I am using my example in examples/webrtc-browser and I get stuck when attempting to reserve the relay upon calling reserve_relay. Specifically when trying to negotiate the HOP protocol. I am using js-libp2p circuit relay to test this logic.

I realize I've exposed a number of functions and structs that are crate specific as I am attempting to get this working and then potentially merge everything back into the webrtc-websys crate.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webrtc-websys: implement webrtc protocol for browser-to-browser communication
2 participants