|
67 | 67 | //! ``` |
68 | 68 | //! |
69 | 69 | //! Now let's make sure that the server is public, in other words let's make sure one can reach it |
70 | | -//! through the Internet. From the dialing client: |
| 70 | +//! through the Internet. First, either manually replace `$RELAY_SERVER_IP` in the following |
| 71 | +//! commands or `export RELAY_SERVER_IP=ipaddr` with the appropriate relay server `ipaddr` in |
| 72 | +//! the dailing client and listening client. |
| 73 | +//! |
| 74 | +//! Now, from the dialing client: |
71 | 75 | //! |
72 | 76 | //! 1. Test that you can connect on Layer 3 (IP). |
73 | 77 | //! |
74 | | -//! ``` bash |
75 | | -//! ping $RELAY_SERVER_IP |
76 | | -//! ``` |
| 78 | +//! ``` bash |
| 79 | +//! ping $RELAY_SERVER_IP |
| 80 | +//! ``` |
77 | 81 | //! |
78 | 82 | //! 2. Test that you can connect on Layer 4 (TCP). |
79 | 83 | //! |
80 | | -//! ``` bash |
81 | | -//! telnet $RELAY_SERVER_IP 4001 |
82 | | -//! ``` |
| 84 | +//! ``` bash |
| 85 | +//! telnet $RELAY_SERVER_IP 4001 |
| 86 | +//! ``` |
83 | 87 | //! |
84 | 88 | //! 3. Test that you can connect via libp2p using [`libp2p-lookup`](https://github.com/mxinden/libp2p-lookup). |
85 | 89 | //! |
86 | | -//! ``` bash |
87 | | -//! ## For IPv4 |
88 | | -//! libp2p-lookup direct --address /ip4/$RELAY_SERVER_IP |
89 | | -//! ## For IPv6 |
90 | | -//! libp2p-lookup direct --address /ip6/$RELAY_SERVER_IP |
91 | | -//! ``` |
| 90 | +//! ``` bash |
| 91 | +//! ## For IPv4 |
| 92 | +//! libp2p-lookup direct --address /ip4/$RELAY_SERVER_IP/tcp/4001 |
| 93 | +//! ## For IPv6 |
| 94 | +//! libp2p-lookup direct --address /ip6/$RELAY_SERVER_IP/tcp/4001 |
| 95 | +//! ``` |
| 96 | +//! |
| 97 | +//! The libp2p-lookup output should look something like: |
| 98 | +//! |
| 99 | +//! ``` bash |
| 100 | +//! $ libp2p-lookup direct --address /ip4/111.11.111.111/tcp/4001 |
| 101 | +//! Lookup for peer with id PeerId("12D3KooWDpJ7As7BWAwRMfu1VU2WCqNjvq387JEYKDBj4kx6nXTN") succeeded. |
| 102 | +//! |
| 103 | +//! Protocol version: "/TODO/0.0.1" |
| 104 | +//! Agent version: "rust-libp2p/0.36.0" |
| 105 | +//! Observed address: "/ip4/22.222.222.222/tcp/39212" |
| 106 | +//! Listen addresses: |
| 107 | +//! - "/ip4/127.0.0.1/tcp/4001" |
| 108 | +//! - "/ip4/111.11.111.111/tcp/4001" |
| 109 | +//! - "/ip4/10.48.0.5/tcp/4001" |
| 110 | +//! - "/ip4/10.124.0.2/tcp/4001" |
| 111 | +//! Protocols: |
| 112 | +//! - "/libp2p/circuit/relay/0.2.0/hop" |
| 113 | +//! - "/ipfs/ping/1.0.0" |
| 114 | +//! - "/ipfs/id/1.0.0" |
| 115 | +//! - "/ipfs/id/push/1.0.0" |
| 116 | +//! ``` |
92 | 117 | //! |
93 | 118 | //! ## Setting up the listening client |
94 | 119 | //! |
|
0 commit comments