As Pkarr is a new system, we recommend prioritizing the use of SVCB and HTTPS (RFC 9460) records as the primary method for defining and discovering endpoints. For detailed terminology and specifications, please refer to the aforementioned RFC.
This approach enables servers to be accessible via URLs such as https://<pkarr key>
.
Clients can resolve the SignedPacket
for a <pkarr key>
to obtain the server's IP address through A
or AAAA
records. Additionally, the HTTPS
record can provide the server's port number and other useful parameters, such as Encrypted Client Hello (ECH) and Application-Layer Protocol Negotiation (ALPN), which support HTTP/2 and HTTP/3.
Similarly, resolving a URL like pubky://<pkarr key>
involves fetching the SignedPacket
for <pkarr key>
and searching for the HTTPS
resource record named _pubky.pxnu33x7jtpx9ar1ytsi4yxbp6a5o36gwhffs8zoxmbuptici1jy
.
To clarify the process of resolving an endpoint, here is a step-by-step algorithm. While it largely follows standard DNS semantics, it simplifies certain aspects (e.g., ignoring CNAMEs) to aid implementation:
- Locate the
SignedPacket
for theqname
(the hostname or authority part of the URL). The TLD inqname
must be a valid Pkarr public key. - Identify all
HTTPS
records within the resolvedSignedPacket
that match theqname
or a wildcard pattern. - Sort
HTTPS
records in ascending order by theirpriority
field to facilitate failover. - Shuffle records within each priority level to randomize lookup results and support load balancing.
- Examine the
target
field of the firstHTTPS
record:- If the
target
is.
(dot), theSignedPacket
itself is the endpoint. Use theA
andAAAA
records for IP addresses, and optionally useHTTPS
record parameters for connection establishment. - If the
target
is another Pkarr key, query that key for aSignedPacket
and repeat from step (2). If resolution fails, proceed to the nextHTTPS
record in the list. - If the
target
is not a valid Pkarr key, assume it is an ICANN domain name. Use standard DNS resolvers to find the endpoint's IP address or delegate to a conventional HTTP client for resolution.
- If the
Servers that are directly reachable should publish a SignedPacket
with their keypair and create an HTTPS
record at the apex (their public key) with the target .
. This record should specify the server's port
number and any other parameters that assist in establishing a direct connection.
These servers should also publish A
and AAAA
records to allow clients to resolve their IP addresses.
For servers running behind a reverse proxy or hosted by third parties, an HTTPS
record can be created with the target
field set to the domain name of the web host they wish to redirect to.
In environments or browsers that lack support for Pkarr or restrict network access to HTTP endpoints via specific APIs, only targets
that are domain names can be used. This limitation arises because A
/AAAA
records alone cannot facilitate secure connections in such contexts.
To ensure compatibility, servers accessible via Pkarr endpoints must provide at least one endpoint associated with an ICANN domain. This ensures that legacy browsers can connect to the server by selecting this domain-based endpoint.