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: doc/CONFIGURATION.md
+20
Original file line number
Diff line number
Diff line change
@@ -781,6 +781,26 @@ By default under nodejs libp2p will attempt to use [UPnP](https://en.wikipedia.o
781
781
782
782
[NAT-PMP](http://miniupnp.free.fr/nat-pmp.html) is a feature of some modern routers which performs a similar job to UPnP. NAT-PMP is disabled by default, if enabled libp2p will try to use NAT-PMP and will fall back to UPnP if it fails.
783
783
784
+
#### Configuring protocol name
785
+
786
+
Changing the protocol name prefix can isolate default public network (IPFS) for custom purposes.
787
+
788
+
```js
789
+
constnode=awaitLibp2p.create({
790
+
config: {
791
+
protocolPrefix:'ipfs'// default
792
+
}
793
+
})
794
+
/*
795
+
protocols: [
796
+
"/ipfs/id/1.0.0", // identify service protocol (if we have multiplexers)
797
+
"/ipfs/id/push/1.0.0", // identify service push protocol (if we have multiplexers)
798
+
"/ipfs/ping/1.0.0", // built-in ping protocol
799
+
]
800
+
*/
801
+
```
802
+
803
+
784
804
## Configuration examples
785
805
786
806
As libp2p is designed to be a modular networking library, its usage will vary based on individual project needs. We've included links to some existing project configurations for your reference, in case you wish to replicate their configuration:
0 commit comments