From b87767db2e085a11bcc59b5fc8970cc349e37c27 Mon Sep 17 00:00:00 2001 From: iHsin Date: Sat, 11 Jul 2026 03:52:00 +0800 Subject: [PATCH] feat: use IP-based DoT upstream DNS servers Replace domain-based DoT nameservers (dns.alidns.com, dot.pub) with IP-based DoT nameservers (223.5.5.5, 223.6.6.6, 1.1.1.1) to avoid an extra DNS resolution hop for the upstream servers themselves. AliDNS cert includes iPAddress SAN for 223.5.5.5 and 223.6.6.6; Cloudflare cert includes iPAddress SAN for 1.1.1.1. Signed-off-by: iHsin Assisted-by: OpenClaw:deepseek-v4-flash --- uniffi/clash-android-ffi/src/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/uniffi/clash-android-ffi/src/lib.rs b/uniffi/clash-android-ffi/src/lib.rs index 96cb6a8..0d6a3c8 100644 --- a/uniffi/clash-android-ffi/src/lib.rs +++ b/uniffi/clash-android-ffi/src/lib.rs @@ -253,14 +253,21 @@ async fn run_clash( vec![ NameServer { net: DNSNetMode::DoT, - host: Host::Domain("dns.alidns.com".to_string()), + host: Host::Ipv4(Ipv4Addr::new(223, 5, 5, 5)), port: 853, interface: None, proxy: None, }, NameServer { net: DNSNetMode::DoT, - host: Host::Domain("dot.pub".to_string()), + host: Host::Ipv4(Ipv4Addr::new(223, 6, 6, 6)), + port: 853, + interface: None, + proxy: None, + }, + NameServer { + net: DNSNetMode::DoT, + host: Host::Ipv4(Ipv4Addr::new(1, 1, 1, 1)), port: 853, interface: None, proxy: None,