mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-09 00:04:54 +00:00
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:
+18
-3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user