Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
EndpointInfo combines an iroh_base::EndpointId with EndpointData:
the addressing and metadata that discovery services publish and resolve.
Discovery services use AddrFilter to control which addresses are published.
This module also provides serialization to and from pkarr signed packets and DNS TXT records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
-
_irohis the record name as defined byIROH_TXT_NAME. -
<z32-endpoint-id>is the z-base-32 encoding of theEndpointId. -
<origin-domain>is the domain name of the publishing DNS server,N0_DNS_ENDPOINT_ORIGIN_PRODis the server operated by number0 for production.N0_DNS_ENDPOINT_ORIGIN_STAGINGis the server operated by number0 for testing. -
TXTis the DNS record type.
The returned TXT records must contain a string value of the form key=value as defined
in RFC1464. The following attributes are defined:
-
relay=<url>: The homeRelayUrlof this endpoint. -
addr=<addr> <addr>: A space-separated list of sockets addresses for this iroh endpoint. Each address is an IPv4 or IPv6 address with a port.
Structsยง
- Addr
Filter - A filter and/or reordering function applied to transport addresses, typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
Exceeded Error - Error returned when an input value is too long for
UserData. - User
Data - User-defined data that can be published and resolved through endpoint discovery.