|
1 |
| -# |
2 |
| - |
3 |
| -- [Configuration](#configuration) |
4 |
| - - [Overview](#overview) |
5 |
| - - [Modules](#modules) |
6 |
| - - [Transport](#transport) |
7 |
| - - [Stream Multiplexing](#stream-multiplexing) |
8 |
| - - [Connection Encryption](#connection-encryption) |
9 |
| - - [Peer Discovery](#peer-discovery) |
10 |
| - - [Content Routing](#content-routing) |
11 |
| - - [Peer Routing](#peer-routing) |
12 |
| - - [DHT](#dht) |
13 |
| - - [Pubsub](#pubsub) |
14 |
| - - [Customizing libp2p](#customizing-libp2p) |
15 |
| - - [Examples](#examples) |
16 |
| - - [Basic setup](#basic-setup) |
17 |
| - - [Customizing Peer Discovery](#customizing-peer-discovery) |
18 |
| - - [Setup webrtc transport and discovery](#setup-webrtc-transport-and-discovery) |
19 |
| - - [Customizing Pubsub](#customizing-pubsub) |
20 |
| - - [Customizing DHT](#customizing-dht) |
21 |
| - - [Setup with Content and Peer Routing](#setup-with-content-and-peer-routing) |
22 |
| - - [Setup with Relay](#setup-with-relay) |
23 |
| - - [Setup with Auto Relay](#setup-with-auto-relay) |
24 |
| - - [Setup with Keychain](#setup-with-keychain) |
25 |
| - - [Configuring Dialing](#configuring-dialing) |
26 |
| - - [Configuring Connection Manager](#configuring-connection-manager) |
27 |
| - - [Configuring Transport Manager](#configuring-transport-manager) |
28 |
| - - [Configuring Metrics](#configuring-metrics) |
29 |
| - - [Configuring PeerStore](#configuring-peerstore) |
30 |
| - - [Customizing Transports](#customizing-transports) |
31 |
| - - [Configuring the NAT Manager](#configuring-the-nat-manager) |
32 |
| - - [Browser support](#browser-support) |
33 |
| - - [UPnP and NAT-PMP](#upnp-and-nat-pmp) |
34 |
| - - [Configuration examples](#configuration-examples) |
| 1 | +# |
| 2 | + |
| 3 | +- [Overview](#overview) |
| 4 | +- [Modules](#modules) |
| 5 | + - [Transport](#transport) |
| 6 | + - [Stream Multiplexing](#stream-multiplexing) |
| 7 | + - [Connection Encryption](#connection-encryption) |
| 8 | + - [Peer Discovery](#peer-discovery) |
| 9 | + - [Content Routing](#content-routing) |
| 10 | + - [Peer Routing](#peer-routing) |
| 11 | + - [DHT](#dht) |
| 12 | + - [Pubsub](#pubsub) |
| 13 | +- [Customizing libp2p](#customizing-libp2p) |
| 14 | + - [Examples](#examples) |
| 15 | + - [Basic setup](#basic-setup) |
| 16 | + - [Customizing Peer Discovery](#customizing-peer-discovery) |
| 17 | + - [Setup webrtc transport and discovery](#setup-webrtc-transport-and-discovery) |
| 18 | + - [Customizing Pubsub](#customizing-pubsub) |
| 19 | + - [Customizing DHT](#customizing-dht) |
| 20 | + - [Setup with Content and Peer Routing](#setup-with-content-and-peer-routing) |
| 21 | + - [Setup with Relay](#setup-with-relay) |
| 22 | + - [Setup with Auto Relay](#setup-with-auto-relay) |
| 23 | + - [Setup with Keychain](#setup-with-keychain) |
| 24 | + - [Configuring Dialing](#configuring-dialing) |
| 25 | + - [Configuring Connection Manager](#configuring-connection-manager) |
| 26 | + - [Configuring Transport Manager](#configuring-transport-manager) |
| 27 | + - [Configuring Metrics](#configuring-metrics) |
| 28 | + - [Configuring PeerStore](#configuring-peerstore) |
| 29 | + - [Customizing Transports](#customizing-transports) |
| 30 | + - [Configuring the NAT Manager](#configuring-the-nat-manager) |
| 31 | + - [Browser support](#browser-support) |
| 32 | + - [UPnP and NAT-PMP](#upnp-and-nat-pmp) |
| 33 | + - [Configuring protocol name](#configuring-protocol-name) |
| 34 | +- [Configuration examples](#configuration-examples) |
35 | 35 |
|
36 | 36 | ## Overview
|
37 | 37 |
|
@@ -374,11 +374,7 @@ const node = await Libp2p.create({
|
374 | 374 | dht: { // The DHT options (and defaults) can be found in its documentation
|
375 | 375 | kBucketSize: 20,
|
376 | 376 | enabled: true, // This flag is required for DHT to run (disabled by default)
|
377 |
| - randomWalk: { |
378 |
| - enabled: true, // Allows to disable discovery (enabled by default) |
379 |
| - interval: 300e3, |
380 |
| - timeout: 10e3 |
381 |
| - } |
| 377 | + clientMode: false // Whether to run the WAN DHT in client or server mode (default: client mode) |
382 | 378 | }
|
383 | 379 | }
|
384 | 380 | })
|
@@ -788,7 +784,7 @@ By default under nodejs libp2p will attempt to use [UPnP](https://en.wikipedia.o
|
788 | 784 |
|
789 | 785 | #### Configuring protocol name
|
790 | 786 |
|
791 |
| -Changing the protocol name prefix can isolate default public network (IPFS) for custom purposes. |
| 787 | +Changing the protocol name prefix can isolate default public network (IPFS) for custom purposes. |
792 | 788 |
|
793 | 789 | ```js
|
794 | 790 | const node = await Libp2p.create({
|
|
0 commit comments