doc: update documentation for /ipfs -> /p2p multiaddr switch
See: https://github.com/libp2p/libp2p/issues/79
Steven Allen committed
Dec 14, 2019 at 19:38 UTC
15c35a5a95b226be66a77ed7ea87754c31d6c650
6 files changed
+22
-22
core/commands/p2p.go
+2
-2
@@ -87,8 +87,8 @@ Forward connections made to <listen-address> to <target-address>.
87
connections and/or handlers. It must be prefixed with '` + P2PProtoPrefix + `'.
88
89
Example:
90
- ipfs p2p forward ` + P2PProtoPrefix + `myproto /ip4/127.0.0.1/tcp/4567 /ipfs/QmPeer
91
- - Forward connections to 127.0.0.1:4567 to '` + P2PProtoPrefix + `myproto' service on /ipfs/QmPeer
90
+ ipfs p2p forward ` + P2PProtoPrefix + `myproto /ip4/127.0.0.1/tcp/4567 /p2p/QmPeer
91
+ - Forward connections to 127.0.0.1:4567 to '` + P2PProtoPrefix + `myproto' service on /p2p/QmPeer
92
93
`,
94
},
core/commands/swarm.go
+2
-2
@@ -354,7 +354,7 @@ var swarmConnectCmd = &cmds.Command{
354
355
The address format is an IPFS multiaddr:
356
357
-ipfs swarm connect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
357
+ipfs swarm connect /ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
358
`,
359
},
360
Arguments: []cmds.Argument{
@@ -399,7 +399,7 @@ var swarmDisconnectCmd = &cmds.Command{
399
'ipfs swarm disconnect' closes a connection to a peer address. The address
400
format is an IPFS multiaddr:
401
402
-ipfs swarm disconnect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
402
+ipfs swarm disconnect /ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
403
404
The disconnect is not permanent; if ipfs needs to talk to that address later,
405
it will reconnect.
docs/examples/go-ipfs-as-a-library/main.go
+9
-9
@@ -293,19 +293,19 @@ func main() {
293
294
bootstrapNodes := []string{
295
// IPFS Bootstrapper nodes.
296
- "/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
297
- "/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
298
- "/dnsaddr/bootstrap.libp2p.io/ipfs/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
299
- "/dnsaddr/bootstrap.libp2p.io/ipfs/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
296
+ "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
297
+ "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
298
+ "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
299
+ "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
300
301
// IPFS Cluster Pinning nodes
302
- "/ip4/138.201.67.219/tcp/4001/ipfs/QmUd6zHcbkbcs7SMxwLs48qZVX3vpcM8errYS7xEczwRMA",
303
- "/ip4/138.201.67.220/tcp/4001/ipfs/QmNSYxZAiJHeLdkBg38roksAR9So7Y5eojks1yjEcUtZ7i",
304
- "/ip4/138.201.68.74/tcp/4001/ipfs/QmdnXwLrC8p1ueiq2Qya8joNvk3TVVDAut7PrikmZwubtR",
305
- "/ip4/94.130.135.167/tcp/4001/ipfs/QmUEMvxS2e7iDrereVYc5SWPauXPyNwxcy9BXZrC1QTcHE",
302
+ "/ip4/138.201.67.219/tcp/4001/p2p/QmUd6zHcbkbcs7SMxwLs48qZVX3vpcM8errYS7xEczwRMA",
303
+ "/ip4/138.201.67.220/tcp/4001/p2p/QmNSYxZAiJHeLdkBg38roksAR9So7Y5eojks1yjEcUtZ7i",
304
+ "/ip4/138.201.68.74/tcp/4001/p2p/QmdnXwLrC8p1ueiq2Qya8joNvk3TVVDAut7PrikmZwubtR",
305
+ "/ip4/94.130.135.167/tcp/4001/p2p/QmUEMvxS2e7iDrereVYc5SWPauXPyNwxcy9BXZrC1QTcHE",
306
307
// You can add more nodes here, for example, another IPFS node you might have running locally, mine was:
308
- // "/ip4/127.0.0.1/tcp/4010/ipfs/QmZp2fhDLxjYue2RiUvLwT9MWdnbDxam32qYFnGmxZDh5L",
308
+ // "/ip4/127.0.0.1/tcp/4010/p2p/QmZp2fhDLxjYue2RiUvLwT9MWdnbDxam32qYFnGmxZDh5L",
309
}
310
311
go connectToPeers(ctx, ipfs, bootstrapNodes)
docs/experimental-features.md
+6
-6
@@ -229,7 +229,7 @@ ipfs bootstrap add <multiaddr>
229
230
For example:
231
```
232
-ipfs bootstrap add /ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64
232
+ipfs bootstrap add /ip4/104.236.76.40/tcp/4001/p2p/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64
233
```
234
235
Bootstrap nodes are no different from all other nodes in the network apart from
@@ -302,7 +302,7 @@ connections on `127.0.0.1:SOME_PORT` to the server node listening
302
on `/x/kickass/1.0`.
303
304
```sh
305
-> ipfs p2p forward /x/kickass/1.0 /ip4/127.0.0.1/tcp/$SOME_PORT /ipfs/$SERVER_ID
305
+> ipfs p2p forward /x/kickass/1.0 /ip4/127.0.0.1/tcp/$SOME_PORT /p2p/$SERVER_ID
306
```
307
308
Next, have your application open a connection to `127.0.0.1:$SOME_PORT`. This
@@ -343,7 +343,7 @@ ipfs p2p listen /x/ssh /ip4/127.0.0.1/tcp/22
343
***Then, on "client" node:***
344
345
```sh
346
-ipfs p2p forward /x/ssh /ip4/127.0.0.1/tcp/2222 /ipfs/$SERVER_ID
346
+ipfs p2p forward /x/ssh /ip4/127.0.0.1/tcp/2222 /p2p/$SERVER_ID
347
```
348
349
You should now be able to connect to your ssh server through a libp2p connection
@@ -465,13 +465,13 @@ already online node would have to be restarted.
465
In order to connect peers QmA and QmB through a relay node QmRelay:
466
467
- Both peers should connect to the relay:
468
-`ipfs swarm connect /transport/address/ipfs/QmRelay`
468
+`ipfs swarm connect /transport/address/p2p/QmRelay`
469
- Peer QmA can then connect to peer QmB using the relay:
470
-`ipfs swarm connect /ipfs/QmRelay/p2p-circuit/ipfs/QmB`
470
+`ipfs swarm connect /p2p/QmRelay/p2p-circuit/p2p/QmB`
471
472
Peers can also connect with an unspecific relay address, which will
473
try to dial through known relays:
474
-`ipfs swarm connect /p2p-circuit/ipfs/QmB`
474
+`ipfs swarm connect /p2p-circuit/p2p/QmB`
475
476
Peers can see their (unspecific) relay address in the output of
477
`ipfs swarm addrs listen`
docs/file-transfer.md
+2
-2
@@ -45,8 +45,8 @@ addresses (like the example below), then your nodes are online.
45
"ID": "QmTNwsFkLAed15kQEC1ZJWPfoNbBQnMFojfJKQ9sZj1dk8",
46
"PublicKey": "CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZb6znj3LQZKP1+X81exf+vbnqNCMtHjZ5RKTCm7Fytnfe+AI1fhs9YbZdkgFkM1HLxmIOLQj2bMXPIGxUM+EnewN8tWurx4B3+lR/LWNwNYcCFL+jF2ltc6SE6BC8kMLEZd4zidOLPZ8lIRpd0x3qmsjhGefuRwrKeKlR4tQ3C76ziOms47uLdiVVkl5LyJ5+mn4rXOjNKt/oy2O4m1St7X7/yNt8qQgYsPfe/hCOywxCEIHEkqmil+vn7bu4RpAtsUzCcBDoLUIWuU3i6qfytD05hP8Clo+at+l//ctjMxylf3IQ5qyP+yfvazk+WHcsB0tWueEmiU5P2nfUUIR3AgMBAAE=",
47
"Addresses": [
48
- "/ip4/127.0.0.1/tcp/4001/ipfs/QmTNwsFkLAed15kQEC1ZJWPfoNbBQnMFojfJKQ9sZj1dk8",
49
- "/ip4/192.168.2.131/tcp/4001/ipfs/QmTNwsFkLAed15kQEC1ZJWPfoNbBQnMFojfJKQ9sZj1dk8",
48
+ "/ip4/127.0.0.1/tcp/4001/p2p/QmTNwsFkLAed15kQEC1ZJWPfoNbBQnMFojfJKQ9sZj1dk8",
49
+ "/ip4/192.168.2.131/tcp/4001/p2p/QmTNwsFkLAed15kQEC1ZJWPfoNbBQnMFojfJKQ9sZj1dk8",
50
],
51
"AgentVersion": "go-ipfs/0.4.11-dev/",
52
"ProtocolVersion": "ipfs/0.1.0"
docs/transports.md
+1
-1
@@ -1,6 +1,6 @@
1
## /ws and /wss -- websockets
2
3
-If you want browsers to connect to e.g. `/dns4/example.com/tcp/443/wss/ipfs/QmFoo`
3
+If you want browsers to connect to e.g. `/dns4/example.com/tcp/443/wss/p2p/QmFoo`
4
5
- [ ] An SSL cert matching the `/dns4` or `/dns6` name
6
- [ ] go-ipfs listening on `/ip4/127.0.0.1/tcp/8081/ws`