add tld-dns-zone for customizing top-level domain (TLD) zone (#1436)

This commit is contained in:
agusti moll
2025-10-03 18:18:10 +02:00
committed by GitHub
parent ad7dc3a129
commit 5e48626cb9
9 changed files with 91 additions and 40 deletions

View File

@@ -507,6 +507,12 @@ struct NetworkOptions {
)]
accept_dns: Option<bool>,
#[arg(
long = "tld-dns-zone",
env = "ET_TLD_DNS_ZONE",
help = t!("core_clap.tld_dns_zone").to_string())]
tld_dns_zone: Option<String>,
#[arg(
long,
env = "ET_PRIVATE_MODE",
@@ -935,6 +941,10 @@ impl NetworkOptions {
.enable_relay_foreign_network_kcp
.unwrap_or(f.enable_relay_foreign_network_kcp);
f.disable_sym_hole_punching = self.disable_sym_hole_punching.unwrap_or(false);
// Configure tld_dns_zone: use provided value if set
if let Some(tld_dns_zone) = &self.tld_dns_zone {
f.tld_dns_zone = tld_dns_zone.clone();
}
cfg.set_flags(f);
if !self.exit_nodes.is_empty() {