mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: macOS DNS restore failed
This commit is contained in:
@@ -36,7 +36,10 @@ pub async fn use_tun(mut config: Mapping, enable: bool) -> Mapping {
|
|||||||
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", "10.96.0.0/16");
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
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("10.96.0.2".to_string()).await;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
revise!(dns_val, "enhanced-mode", "redir-host");
|
revise!(dns_val, "enhanced-mode", "redir-host");
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
|||||||
Reference in New Issue
Block a user