Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey under a name derived from its
corresponding PublicKey, also known as the EndpointId. Additionally this pkarr
Resource Record is signed using the same SecretKey, ensuring authenticity of the
record.
Pkarr normally stores these records on the Mainline DHT, but also provides two bridges that do not require clients to directly interact with the DHT:
-
Resolvers are servers which expose the pkarr Resource Record under a domain name, e.g.
o3dks..6uyy.dns.iroh.link. This allows looking up the pkarr Resource Records using normal DNS clients. These resolvers would normally perform lookups on the Mainline DHT augmented with a local cache to improve performance. -
Relays are servers which allow both publishing and looking up of the pkarr Resource Records using HTTP PUT and GET requests. They will usually perform the publishing to the Mainline DHT on behalf on the client as well as cache lookups performed on the DHT to improve performance.
PkarrPublisher filters published addresses: only relay addresses are published by default.
To change this behavior, use PkarrPublisherBuilder::addr_filter and set it to e.g. AddrFilter::unfiltered.
This can be useful to enable publishing IP addresses if the iroh endpoint is reachable via public
IP addresses.
For address lookup in iroh the pkarr Resource Records contain the addressing information, providing endpoints which retrieve the pkarr Resource Record with enough detail to contact the iroh endpoint.
There are several Address Lookup’s built on top of pkarr, which can be composed to the application’s needs:
-
PkarrPublisher, which publishes to a pkarr relay server using HTTP. -
PkarrResolver, which resolves from a pkarr relay server using HTTP. -
address_lookup::DnsAddressLookup, which resolves from a DNS server.
Mainline-DHT-based pkarr publishing/lookup lives in the
iroh-mainline-address-lookup crate.
Structs§
- Pkarr
Publisher - Publisher of address lookup information to a pkarr relay.
- Pkarr
Publisher Builder - Builder for
PkarrPublisher. - Pkarr
Relay Client - A pkarr client to publish
SignedPackets to a pkarr relay. - Pkarr
Relay Client Builder - A builder for the
PkarrRelayClient - Pkarr
Resolver - Resolver of address lookup information from a pkarr relay.
- Pkarr
Resolver Builder - Builder for
PkarrResolver.
Enums§
Constants§
- DEFAULT_
PKARR_ TTL - Default TTL for the records in the pkarr signed packet.
- DEFAULT_
REPUBLISH_ INTERVAL - Interval in which to republish the endpoint info even if unchanged: 5 minutes.
- N0_
DNS_ PKARR_ RELAY_ PROD - The production pkarr relay run by number 0.
- N0_
DNS_ PKARR_ RELAY_ STAGING - The testing pkarr relay run by number 0.