Improve README and enable DNS resolver by default

Rework top-level README: add badges, status/roadmap section, config
search path docs, minimal two-node example with transports, DNS setup
instructions with systemd-resolved and resolv.conf examples, and
connectivity test walkthrough.

Replace ASCII document-relationship diagram with SVG in design docs.

Change DNS resolver default from disabled to enabled (port 5354).
Update config merge to allow higher-priority configs to disable it.
This commit is contained in:
Johnathan Corgan
2026-02-24 18:58:32 +00:00
parent 27da3c0bbf
commit 7260ad2878
6 changed files with 223 additions and 40 deletions
+18 -3
View File
@@ -20,11 +20,15 @@ const DEFAULT_DNS_PORT: u16 = 5354;
/// Default DNS record TTL in seconds (5 minutes).
const DEFAULT_DNS_TTL: u32 = 300;
fn default_true() -> bool {
true
}
/// DNS responder configuration (`dns.*`).
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DnsConfig {
/// Enable DNS responder (`dns.enabled`).
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
/// Enable DNS responder (`dns.enabled`, default: true).
#[serde(default = "default_true")]
pub enabled: bool,
/// Bind address (`dns.bind_addr`).
@@ -40,6 +44,17 @@ pub struct DnsConfig {
pub ttl: Option<u32>,
}
impl Default for DnsConfig {
fn default() -> Self {
Self {
enabled: true,
bind_addr: None,
port: None,
ttl: None,
}
}
}
impl DnsConfig {
/// Get the bind address (default: 127.0.0.1).
pub fn bind_addr(&self) -> &str {