@libp2p/autonat 2.0.36-8ad44f759 → 2.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -7
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +3 -3
- package/dist/src/index.d.ts +11 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -7
- package/dist/src/index.js.map +1 -1
- package/dist/typedoc-urls.json +8 -0
- package/package.json +8 -8
- package/src/index.ts +11 -7
package/README.md
CHANGED
|
@@ -24,15 +24,20 @@ repo and examine the changes made.
|
|
|
24
24
|
|
|
25
25
|
-->
|
|
26
26
|
|
|
27
|
-
The AutoNAT service
|
|
28
|
-
|
|
29
|
-
peers.
|
|
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.
|
|
30
29
|
|
|
31
|
-
|
|
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.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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()
|
|
36
41
|
|
|
37
42
|
## Example
|
|
38
43
|
|