You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+78-9Lines changed: 78 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -97,28 +97,27 @@ Multiaddr allows expressing tunnels very nicely.
97
97
# /ip4/10.20.30.40/tcp/443
98
98
99
99
DNS Resolution
100
-
-------------
100
+
--------------
101
101
102
-
Multiaddr supports DNS-based address resolution using the DNSADDR protocol.
102
+
Multiaddr supports DNS-based address resolution using the DNSADDR protocol. This is particularly useful for resolving bootstrap node addresses and maintaining peer IDs during resolution.
For comprehensive examples including bootstrap node resolution, protocol comparison, and py-libp2p integration, see the `DNS examples <https://github.com/multiformats/py-multiaddr/tree/master/examples/dns>`_ in the examples directory.
140
+
141
+
Thin Waist Address Validation
142
+
-----------------------------
143
+
144
+
Multiaddr provides thin waist address validation functionality to process multiaddrs and expand wildcard addresses to all available network interfaces. This is particularly useful for server configuration, network discovery, and dynamic port management.
145
+
146
+
147
+
.. code-block:: python
148
+
149
+
from multiaddr import Multiaddr
150
+
from multiaddr.utils import get_thin_waist_addresses, get_network_addrs
151
+
152
+
# Network interface discovery
153
+
ipv4_addrs = get_network_addrs(4)
154
+
print(f"Available IPv4 addresses: {ipv4_addrs}")
155
+
# Available IPv4 addresses: ['192.168.1.12', '10.152.168.99']
For comprehensive examples including error handling, practical usage scenarios, and detailed network interface information, see the `thin waist examples <https://github.com/multiformats/py-multiaddr/tree/master/examples/thin_waist>`_ in the examples directory.
0 commit comments