DDNS
ddns provides DNS discovery and resolver support for DHTTP applications.
The published Cargo package is dyns, and the library target remains ddns.
ddns exposes backend implementations in ddns::h3, ddns::http, and ddns::mdns,
while ddns::resolvers and ddns::publishers act as facades for re-exports and
aggregate helper types.
= { = "dyns", = "0.4.0" }
Crate layout
| Module | Role |
|---|---|
ddns::core |
DNS packet parser, resource-record types, endpoint E record encoding, and HTTP multi-record response wire format. |
ddns::h3 |
DNS-over-HTTP/3 backend implementation. |
ddns::http |
DNS-over-HTTP backend implementation. |
ddns::mdns |
RFC 6762 multicast DNS transport plus LAN resolver/publisher backend implementation. |
ddns::resolvers |
Resolver facade: backend re-exports, resolver chains, and Resolvers aggregation. |
ddns::publishers |
Publisher facade: backend re-exports, scoped publisher atoms, Publishers aggregation, and endpoint publication helpers. |
Features
The default feature set is empty.
| Feature | Enables |
|---|---|
resolvers |
Resolver aggregation types such as Resolvers, ResolversBuilder, and DnsScheme. |
publishers |
Scoped publication helpers such as Publisher, Publishers, PublishScope, EndpointPublicationLoop, and PublishAddresses; backend Publish implementations own any required signing. |
dquic-network |
h3x/dquic network-backed publication helpers such as EndpointBindingAddresses; meaningful together with publishers, and also used by mDNS resolver aggregation. |
h3 |
DNS-over-HTTP/3 backend surface (ddns::h3, plus H3Resolver / H3Publisher re-exports from the facades). |
http |
DNS-over-HTTP backend surface (ddns::http, plus HttpResolver / HttpPublisher re-exports from the facades). |
mdns |
mDNS backend surface (ddns::mdns, plus MdnsResolver / MdnsPublisher re-exports from the facades). |
Backend types live under the resolvers / publishers facades whenever their backend feature is enabled.
The aggregate Resolvers and endpoint-publication helper types are separately gated by the
resolvers and publishers features.
Bootstrap constants
build.rs generates resolver defaults exposed from ddns::resolvers:
| Environment variable | Public constant | Fallback when unset |
|---|---|---|
DHTTP_BOOTSTRAP_URL |
DHTTP_BOOTSTRAP_URL |
https://bootstrap.genmeta.net:20002 |
DHTTP_H3_DNS_SERVER |
DHTTP_H3_DNS_SERVER |
https://ddns.genmeta.net:4433 |
DHTTP_MDNS_SERVICE |
DHTTP_MDNS_SERVICE |
_dhttp.local |
These production fallbacks are used when the corresponding compile-time environment variables are unset.
Quick start
Resolver chain
Enable the resolver aggregation surface and build a chain explicitly:
use Resolvers;
use StreamExt;
async
mDNS discovery
use ;
use StreamExt;
async
Runnable examples:
See examples/README.md for example CLI parameters and response decoding notes.