libp2p / libp2p/rust-libp2p

Relay server: support listening on both WebRTC and WebSocket

Open
#6,029 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

decision-pending
Dominant language
Rust
Stars
5.6k
Forks
1.3k
Avg merge
8h 47m
Merged PRs (30d)
19

Description

Description

Proposed solution:
Add configuration and implementation to allow the relay server to bind to both WebRTC and WebSocket addresses.
Use case:

Clients behind different NAT/firewall setups.
Improved interoperability with different types of libp2p implementations.
Related work:

Demonstration of JavaScript WebRTC peers connecting through the Rust relay server:
js-libp2p-examples Issue #226
js-libp2p-examples PR #227

Motivation

This work is part of a comprehensive test of WebRTC support across different libp2p implementations. The current focus is on enabling JavaScript peers to connect via a Rust relay server. In the future, the goal is to extend these tests to include scenarios where JavaScript and Rust private peers can interoperate using WebRTC through the relay. Supporting both WebRTC and WebSocket transports on the relay server will improve connectivity options and interoperability for clients using different protocols.

Current Implementation

Currently, the relay server does not listen on either WebRTC or WebSocket transports. This is needed for JavaScript peers—and, in the future, Rust peers using WebRTC—to connect to the relay server.

Are you planning to do it yourself in a pull request?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the relay server's transport configuration and listener entry point, then review the linked JavaScript examples issue and pull request for interoperability expectations. Done means the relay can be configured to bind both WebRTC and WebSocket addresses and support clients using either transport.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.