package dns // DNSSettings represents router DNS forwarder, upstream and cache configuration. type DNSSettings struct { Servers []string `json:"servers"` // Configured static upstream DNS servers (e.g. 1.1.1.1, 8.8.8.8) DynamicServers []string `json:"dynamic_servers"` // Dynamic DNS servers learned from DHCP/PPP AllowRemoteRequests bool `json:"allow_remote_requests"` // Accept queries from LAN devices (port 53) CacheSize int `json:"cache_size"` // Dnsmasq cache size in entries (default 1000) Domain string `json:"domain"` // Local domain e.g. "home.lan" DoHServer string `json:"doh_server,omitempty"` // Optional DNS-over-HTTPS URL VerifyDoHCert bool `json:"verify_doh_cert"` // Validate DoH certificate StaticRecords []StaticRecord `json:"static_records"` // Local static DNS records } // StaticRecord represents a static DNS mapping (hostname -> IP / CNAME) type StaticRecord struct { ID string `json:"id"` Name string `json:"name"` // FQDN or hostname e.g. "myrouter.lan" Type string `json:"type"` // "A", "AAAA", "CNAME", "TXT" Address string `json:"address"` // Target IP address or target FQDN TTL int `json:"ttl,omitempty"` // TTL in seconds (default 3600) Comment string `json:"comment,omitempty"` Disabled bool `json:"disabled"` } // DNSStatus provides live status for the router DNS system. type DNSStatus struct { ActiveServers []string `json:"active_servers"` AllowRemoteRequests bool `json:"allow_remote_requests"` CacheSize int `json:"cache_size"` StaticCount int `json:"static_count"` Domain string `json:"domain"` ResolvConfContent string `json:"resolv_conf_content"` ServiceRunning bool `json:"service_running"` }