You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will start the relay node with TCP and QUIC on port 9000, WebSocket on port 8080, and WebRTC on port 8081.
##### Using Provided Scripts
To simplify repeated tests and ensure deterministic peer IDs and multiaddresses, you can use the provided `run*.sh` scripts. These scripts automate the process of starting the relay server with predefined seeds and ports, making it easier to connect different clients for testing.
- **Run the relay server with only TCP and QUIC transports:**
```sh
./run-relay.sh
```
This script starts the relay server with a fixed secret key seed and port, but **only enables TCP and QUIC** transports (no WebSocket or WebRTC).
- **Run the relay server with WebRTC support:**
```sh
./run-relay-webrtc.sh
```
This script starts the relay server with WebRTC enabled on a specified port.
- **Run the relay server with WebSocket support:**
```sh
./run-relay-websocket.sh
```
This script starts the relay server with WebSocket enabled on a specified port.
- **Run the relay server with all supported transports (TCP, QUIC, WebRTC, and WebSocket):**
```sh
./run-relay-all.sh
```
This script starts the relay server with TCP, QUIC, WebSocket, and WebRTC enabled, using deterministic parameters for reproducible tests:
If you do not provide a port for `--websocket-port` or `--webrtc-port`, the relay will not listen on those transports. Port `0` is not supported for WebSocket or WebRTC in this example; you must specify a fixed port number.
Check the script files for details on the specific seeds, ports, and options used. You can modify these scripts to match your testing requirements.
#### 2. The relay node will start listening for incoming connections.
It will print the listening address once it is ready.
3. Connect other **libp2p** nodes to the relay node by specifying the relay's listening address as one of the bootstrap nodes in their configuration.
#### 3. Connect other **libp2p** nodes to the relay node by specifying the relay's listening address as one of the bootstrap nodes in their configuration.
4. Once the connections are established, the relay node will facilitate communication between the connected peers, allowing them to exchange messages and data.
#### 4. Once the connections are established, the relay node will facilitate communication between the connected peers, allowing them to exchange messages and data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the effort, but I don't think we should add run scripts that hard-code the parameters. Most user want to change these parameters anyway, and having to think about them IMO also helps the general understanding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use them through the
libp2p
meta crate?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the tls & noise , but webrtc is not exposed via the libp2p meta crate