mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-12 10:57:13 +00:00
src/tutorials/hole-punching: Clarify use of libp2p-lookup & server IP (#2616)
This commit is contained in:
parent
c427bb3958
commit
0c1ac781a2
@ -67,7 +67,11 @@
|
||||
//! ```
|
||||
//!
|
||||
//! Now let's make sure that the server is public, in other words let's make sure one can reach it
|
||||
//! through the Internet. From the dialing client:
|
||||
//! through the Internet. First, either manually replace `$RELAY_SERVER_IP` in the following
|
||||
//! commands or `export RELAY_SERVER_IP=ipaddr` with the appropriate relay server `ipaddr` in
|
||||
//! the dailing client and listening client.
|
||||
//!
|
||||
//! Now, from the dialing client:
|
||||
//!
|
||||
//! 1. Test that you can connect on Layer 3 (IP).
|
||||
//!
|
||||
@ -85,9 +89,30 @@
|
||||
//!
|
||||
//! ``` bash
|
||||
//! ## For IPv4
|
||||
//! libp2p-lookup direct --address /ip4/$RELAY_SERVER_IP
|
||||
//! libp2p-lookup direct --address /ip4/$RELAY_SERVER_IP/tcp/4001
|
||||
//! ## For IPv6
|
||||
//! libp2p-lookup direct --address /ip6/$RELAY_SERVER_IP
|
||||
//! libp2p-lookup direct --address /ip6/$RELAY_SERVER_IP/tcp/4001
|
||||
//! ```
|
||||
//!
|
||||
//! The libp2p-lookup output should look something like:
|
||||
//!
|
||||
//! ``` bash
|
||||
//! $ libp2p-lookup direct --address /ip4/111.11.111.111/tcp/4001
|
||||
//! Lookup for peer with id PeerId("12D3KooWDpJ7As7BWAwRMfu1VU2WCqNjvq387JEYKDBj4kx6nXTN") succeeded.
|
||||
//!
|
||||
//! Protocol version: "/TODO/0.0.1"
|
||||
//! Agent version: "rust-libp2p/0.36.0"
|
||||
//! Observed address: "/ip4/22.222.222.222/tcp/39212"
|
||||
//! Listen addresses:
|
||||
//! - "/ip4/127.0.0.1/tcp/4001"
|
||||
//! - "/ip4/111.11.111.111/tcp/4001"
|
||||
//! - "/ip4/10.48.0.5/tcp/4001"
|
||||
//! - "/ip4/10.124.0.2/tcp/4001"
|
||||
//! Protocols:
|
||||
//! - "/libp2p/circuit/relay/0.2.0/hop"
|
||||
//! - "/ipfs/ping/1.0.0"
|
||||
//! - "/ipfs/id/1.0.0"
|
||||
//! - "/ipfs/id/push/1.0.0"
|
||||
//! ```
|
||||
//!
|
||||
//! ## Setting up the listening client
|
||||
|
Loading…
x
Reference in New Issue
Block a user