feat: support to grant permission to clash core

This commit is contained in:
GyDi committed 2023-03-16 11:16:54 +08:00
1 parent fdcbc3904a
commit 9e2812d55c
7 files changed
+177 -3

No files matched your search

+9
View File
@@ -175,6 +175,15 @@ pub async fn restart_sidecar() -> CmdResult {
wrap_err!(CoreManager::global().run_core().await)
}
#[tauri::command]
pub fn grant_permission(core: String) -> CmdResult {
#[cfg(target_os = "macos")]
return wrap_err!(manager::grant_permission(core));
#[cfg(not(target_os = "macos"))]
return Err("Unsupported target");
}
/// get the system proxy
#[tauri::command]
pub fn get_sys_proxy() -> CmdResult<Mapping> {