mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-10 16:05:37 +00:00
feat: support macOS Network Extension (#1902)
* feat: support macOS Network Extension * fix: disable macOS NE feature in cargo hack check
This commit is contained in:
@@ -49,7 +49,7 @@ impl Service {
|
||||
pub fn new(name: String) -> Result<Self, anyhow::Error> {
|
||||
#[cfg(target_os = "windows")]
|
||||
let service_manager = Box::new(self::win_service_manager::WinServiceManager::new()?);
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(all(target_os = "macos", not(feature = "macos-ne")))]
|
||||
let service_manager: Box<dyn ServiceManager> =
|
||||
Box::new(service_manager::TypedServiceManager::Launchd(
|
||||
service_manager::LaunchdServiceManager::system().with_config(
|
||||
@@ -63,7 +63,10 @@ impl Service {
|
||||
),
|
||||
));
|
||||
|
||||
#[cfg(not(any(target_os = "windows", target_os = "macos")))]
|
||||
#[cfg(not(any(
|
||||
target_os = "windows",
|
||||
all(target_os = "macos", not(feature = "macos-ne"))
|
||||
)))]
|
||||
let service_manager: Box<dyn ServiceManager> =
|
||||
Box::new(service_manager::TypedServiceManager::native()?);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user