fix(enhance): protect app-owned config from manual overrides

This commit is contained in:
wonfen
2026-07-04 07:45:13 +08:00
parent e578e473d5
commit 336bd9d735
2 changed files with 332 additions and 37 deletions
+2
View File
@@ -129,6 +129,8 @@ pub(super) async fn init_dns_config() -> Result<()> {
// 创建DNS子配置
let dns_config = serde_yaml_ng::Mapping::from_iter([
("enable".into(), Value::Bool(true)),
// 与前端 DNS 默认一致,并供 dns.ipv6 锁定使用
("ipv6".into(), Value::Bool(true)),
("listen".into(), Value::String(":53".into())),
("enhanced-mode".into(), Value::String("fake-ip".into())),
("fake-ip-range".into(), Value::String("198.18.0.1/16".into())),