fix: tun allocates the wrong private network segment, causing conflicts.

This commit is contained in:
huzibaca 2024-11-25 01:06:51 +08:00
parent 97f8022276
commit ea5d6f9c46
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

View File

@ -34,11 +34,11 @@ pub async fn use_tun(mut config: Mapping, enable: bool) -> Mapping {
revise!(dns_val, "enable", true); revise!(dns_val, "enable", true);
revise!(dns_val, "ipv6", true); revise!(dns_val, "ipv6", true);
revise!(dns_val, "enhanced-mode", "fake-ip"); revise!(dns_val, "enhanced-mode", "fake-ip");
revise!(dns_val, "fake-ip-range", "10.96.0.0/16"); revise!(dns_val, "fake-ip-range", "192.18.0.1/16");
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{ {
crate::utils::resolve::restore_public_dns().await; crate::utils::resolve::restore_public_dns().await;
crate::utils::resolve::set_public_dns("10.96.0.2".to_string()).await; crate::utils::resolve::set_public_dns("192.18.0.2".to_string()).await;
} }
} else { } else {
revise!(dns_val, "enhanced-mode", "redir-host"); revise!(dns_val, "enhanced-mode", "redir-host");