Skip to content
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-direct end-to-end #1225

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft

Webrtc-direct end-to-end #1225

wants to merge 22 commits into from

Conversation

lchenut
Copy link
Contributor

@lchenut lchenut commented Nov 15, 2024

Related issue: #698
Related PRs:

Preview of WebRTC-Direct Transport end-to-end

This PR introduces an untested implementation of the WebRTC-Direct transport for nim-libp2p. It leverages the nim-webrtc library (built using Mbed-TLS, Usrsctp, and in-house components) to provide a reference for how WebRTC-Direct could be implemented in Nim.

Purpose

This draft serves as a preview for the intended architecture and approach to WebRTC-Direct transport within nim-libp2p. It is not intended to be merged but rather to guide further development or refinement of the original PR.
This was done to circumvent future changes that will be made in nim-webrtc as SCTP and DataChannel are still being reviewed or worked on.

Follow these steps to test the WebRTC-Direct transport implementation:

  1. Install js-libp2p:
    • Checkout a specific version if needed. I personally use this old one.
  2. Run the WebRTC Browser-to-Server Example:
    • Locate the WebRTC browser-to-server example in the js-libp2p repository (e.g., in the examples directory).
    • Start the example server, and open the browser interface at the local address it provides.
  3. Compile and Launch the Nim Test Program:
    • At the root of the nim-libp2p repository, compile the testwebrtc.nim example
    • When prompted, copy the multiaddress from the Nim test program and paste it into the webpage of the JS-libp2p server.
  4. Interact Using WebRTC-Direct:
    • Once connected, you can establish communication via WebRTC-Direct between the js-libp2p browser instance and the nim-libp2p server.
    • You can check if everything is working correctly using wireshark and comparing it to the go implementation.

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

Successfully merging this pull request may close these issues.

2 participants