diff --git a/src-tauri/src/constants.rs b/src-tauri/src/constants.rs index 20b461f31..b241ff220 100644 --- a/src-tauri/src/constants.rs +++ b/src-tauri/src/constants.rs @@ -16,6 +16,7 @@ pub mod network { pub mod proxy { /// Single source of the macOS default bypass list; both proxy backends compose from it. + #[cfg(target_os = "macos")] pub const MACOS_DEFAULT_BYPASS: &str = "127.0.0.1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,*.crashlytics.com,"; } diff --git a/src-tauri/src/enhance/chain.rs b/src-tauri/src/enhance/chain.rs index ac2fe27ee..6c627075d 100644 --- a/src-tauri/src/enhance/chain.rs +++ b/src-tauri/src/enhance/chain.rs @@ -24,8 +24,8 @@ pub enum ChainType { #[derive(Debug, Clone)] pub enum ChainSupport { - ClashMeta, - ClashMetaAlpha, + Mihomo, + MihomoAlpha, } // Helper trait to allow async conversion @@ -74,10 +74,10 @@ impl ChainItem { let meta_guard = Self::to_script("verge_meta_guard", ""); vec![ - (ChainSupport::ClashMeta, hy_alpn.clone()), - (ChainSupport::ClashMeta, meta_guard.clone()), - (ChainSupport::ClashMetaAlpha, hy_alpn), - (ChainSupport::ClashMetaAlpha, meta_guard), + (ChainSupport::Mihomo, hy_alpn.clone()), + (ChainSupport::Mihomo, meta_guard.clone()), + (ChainSupport::MihomoAlpha, hy_alpn), + (ChainSupport::MihomoAlpha, meta_guard), ] } @@ -94,7 +94,7 @@ impl ChainSupport { match core { Some(core) => matches!( (self, core.as_str()), - (Self::ClashMeta, "verge-mihomo") | (Self::ClashMetaAlpha, "verge-mihomo-alpha") + (Self::Mihomo, "verge-mihomo") | (Self::MihomoAlpha, "verge-mihomo-alpha") ), None => true, }