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
Copy file name to clipboardExpand all lines: examples/auto-relay/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ While direct connections to nodes are preferable, it's not always possible to do
7
7
8
8
Before moving into the examples, you should run `npm install` on the top level `js-libp2p` folder, in order to install all the dependencies needed for this example.
9
9
10
-
This example comes with 3 main files. A `relay.js` file to be used in the first step, a `auto-relay.js` file to be used in the second step and a `other-node.js` file to be used on the third step. All of this scripts will run their own libp2p node, which will interact with the previous ones. This way, you need to have all of them running as you proceed.
10
+
This example comes with 3 main files. A `relay.js` file to be used in the first step, a `auto-relay.js` file to be used in the second step and a `other-node.js` file to be used on the third step. All of these scripts will run their own libp2p node, which will interact with the previous ones. All nodes must be running in order for you to proceed.
11
11
12
12
## 1. Set up a relay node
13
13
14
-
Aiming to support nodes with connectivity issues, you will need to set up a relay node for the former nodes to bind.
14
+
In the first step of this example, we need to configure and run a relay node in order for our target node to bind to for accepting inbound connections.
15
15
16
16
The relay node will need to have its relay subsystem enabled, as well as its HOP capability. It can be configured as follows:
17
17
@@ -74,7 +74,7 @@ TODO: Docker Image with a repo
74
74
75
75
## 2. Set up a node with Auto Relay Enabled
76
76
77
-
One of the typical use cases for Auto Relay is nodes behind a NAT or browser nodes thanks to their limitations regarding listening for new connections. For running a libp2p node that automatically binds itself to connected HOP relays, you can see the following:
77
+
One of the typical use cases for Auto Relay is nodes behind a NAT or browser nodes due to their inability to expose a public address. For running a libp2p node that automatically binds itself to connected HOP relays, you can see the following:
As you can see in the code, we need to provide the `relayAddr` as a process argument. This node will dial the relay and automatically bind to the relay.
122
+
As you can see in the code, we need to provide the relay address, `relayAddr`, as a process argument. This node will dial the provided relay address and automatically bind to it.
123
123
124
-
You should now run the following to start the relay node:
124
+
You should now run the following to start the node running Auto Relay:
0 commit comments