File tree Expand file tree Collapse file tree 2 files changed +14
-23
lines changed
packages/protocol-autonat Expand file tree Collapse file tree 2 files changed +14
-23
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,15 @@ repo and examine the changes made.
24
24
25
25
-->
26
26
27
- The AutoNAT service uses the [ AutoNAT protocol] ( https://docs.libp2p.io/concepts/nat/autonat/ ) .
28
- The service confirms addresses are dialable by remote peers, and updates the list it advertises.
27
+ The AutoNAT service implements the [ AutoNAT protocol] ( https://docs.libp2p.io/concepts/nat/autonat/ )
28
+ to confirm whether addresses the node is listening on are dialable by remote
29
+ peers.
29
30
30
- The service dials randomly selected peers with a request to verify it's external addresses.
31
- The request includes a list of public multiaddrs (addressManager.getObservedAddrs()).
32
- The remote peers dial that list and respond with the results.
31
+ It does not implement NAT hole punching.
33
32
34
- The AutoNAT service uses those responses to either:
35
-
36
- - addressManager.confirmObservedAddr(addr)
37
- - addressManager.removeObservedAddr(addr)
38
-
39
- The result list of candidates and confirmed addresses can be found
40
- at addressManager.getObservedAddrs()
33
+ > \[ !IMPORTANT]
34
+ > [ AutoNat v2] ( https://www.npmjs.com/package/@libp2p/autonat-v2 ) is now
35
+ > available and should be preferred to this module.
41
36
42
37
## Example
43
38
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @packageDocumentation
3
3
*
4
- * The AutoNAT service uses the [AutoNAT protocol](https://docs.libp2p.io/concepts/nat/autonat/).
5
- * The service confirms addresses are dialable by remote peers, and updates the list it advertises.
4
+ * The AutoNAT service implements the [AutoNAT protocol](https://docs.libp2p.io/concepts/nat/autonat/)
5
+ * to confirm whether addresses the node is listening on are dialable by remote
6
+ * peers.
6
7
*
7
- * The service dials randomly selected peers with a request to verify it's external addresses.
8
- * The request includes a list of public multiaddrs (addressManager.getObservedAddrs()).
9
- * The remote peers dial that list and respond with the results.
8
+ * It does not implement NAT hole punching.
10
9
*
11
- * The AutoNAT service uses those responses to either:
12
- * - addressManager.confirmObservedAddr(addr)
13
- * - addressManager.removeObservedAddr(addr)
14
- *
15
- * The result list of candidates and confirmed addresses can be found
16
- * at addressManager.getObservedAddrs()
10
+ * > [!IMPORTANT]
11
+ * > [AutoNat v2](https://www.npmjs.com/package/@libp2p/autonat-v2) is now
12
+ * > available and should be preferred to this module.
17
13
*
18
14
* @example
19
15
*
You can’t perform that action at this time.
0 commit comments