Files
EasyTier/easytier/src/instance/dns_server/mod.rs
T
Luna Yao 105f44d322 feat(dns): support local static records (#2708)
* feat(dns): support local static records

* fix(dns): normalize zone names with LowerName, preload static zones, and deprecate tld_dns_zone

- Normalize DNS zone names to LowerName across the server catalog and RPC boundaries to prevent uppercase/non-canonical zone suffixes from clearing node records.
- Preload all configured static zones during server initialization before registering the resolver and applying system DNS configuration.
- Deprecate tld_dns_zone in favor of [dns] domain, keeping tld_dns_zone as a hidden fallback without exposing it in help or schema defaults.
- Keep MagicDnsRecordStore using LowerName and restrict dns_route_identity to node hostname and IP.
2026-11-08 06:58:24 +08:00

25 lines
920 B
Rust

// This module is copy and modified from https://github.com/fanyang89/libdns
#[cfg(all(feature = "magic-dns", feature = "tun"))]
pub(crate) mod config;
#[cfg(all(feature = "magic-dns", feature = "tun"))]
pub(crate) mod server;
#[cfg(all(feature = "magic-dns", feature = "tun"))]
pub(crate) mod zone;
#[cfg(all(feature = "magic-dns", feature = "tun"))]
pub mod client_instance;
#[cfg(all(feature = "magic-dns", feature = "tun"))]
pub mod runner;
#[cfg(all(feature = "magic-dns", feature = "tun"))]
pub mod server_instance;
#[cfg(all(feature = "magic-dns", feature = "tun"))]
pub mod system_config;
#[cfg(all(test, feature = "tun", feature = "magic-dns"))]
mod tests;
pub static MAGIC_DNS_INSTANCE_ADDR: &str = "tcp://127.0.0.1:49813";
pub static MAGIC_DNS_INSTANCE_SOCKET_ADDR: &str = "127.0.0.1:49813";
pub static MAGIC_DNS_FAKE_IP: &str = "100.100.100.101";
pub use easytier_core::config::toml::DEFAULT_ET_DNS_ZONE;