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:
Chenx Dust
2026-02-14 14:54:36 +08:00
committed by GitHub
parent 5a777959e3
commit 7a26640c26
15 changed files with 180 additions and 42 deletions
+5 -2
View File
@@ -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()?);