Skip to content

feat: Testing with external peers #227

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 4 commits into
base: main
Choose a base branch
from

Conversation

r-zig
Copy link

@r-zig r-zig commented May 22, 2025

Description

This PR updates the js-libp2p-example-webrtc-private-to-private example to support and document testing peer-to-peer connectivity in realistic network conditions, such as when peers are:

Running on separate machines
Behind NATs or VPNs
Without public IPs
Key changes include:

Binding the development server to all interfaces (0.0.0.0), so the example is reachable from external machines.
Documentation for exposing port 5173, including guidance for environments like AWS EC2.
Recommendation to use a static public IP for the signaling server host to avoid connectivity issues.
Connection type indicator: The UI now displays whether a peer connection is established Directly or via a Relay.
Fixes #226.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

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.

Example cannot be used across real network topologies (e.g. private peers on different machines)
1 participant