refactor: mihomo ipc (#7601)

* refactor: mihomo ipc request

* refactor: remove redundant write locks and await on mihomo handle

* fix(rule): handle non-string types in ProviderButton labels

* refactor: handle non-string value types in RuleItem component

* refactor(tauri): remove unnecessary await in get_base_config call

* chore: update tauri-plugin-mihomo deps

* refactor: rename ConnectionId to WsConnectionId

* chore: update tauri-plugin-mihomo-api dependency reference

* chore(config): use Proxy::default in profile test initialization
This commit is contained in:
oomeow
2026-07-28 15:16:01 +00:00
committed by GitHub
parent 3515c79e2b
commit b71a1e4ec5
24 changed files with 68 additions and 134 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ pub fn on_web_content_process_terminated(webview: &tauri::Webview) {
// reload 必须与清理同任务、排在其后,否则清理可能误清重载后新页面的订阅(竞态)。
let webview = webview.clone();
crate::process::AsyncHandler::spawn(move || async move {
if let Err(err) = handle::Handle::mihomo().await.clear_all_ws_connections().await {
if let Err(err) = handle::Handle::mihomo().clear_all_ws_connections().await {
logging!(warn, Type::Window, "清理 Mihomo WebSocket 连接失败: {err}");
} else {
logging!(info, Type::Window, "已清理全部 Mihomo WebSocket 连接");