优化调整、BT下载(有bug)

This commit is contained in:
zhongluofeng
2026-08-27 18:25:45 +08:00
parent 4dd60f42a1
commit d21649c60e
34 changed files with 4991 additions and 198 deletions
+9 -1
View File
@@ -4,7 +4,7 @@ use tauri::{AppHandle, State};
use super::system_proxy::{clear_system_proxy_windows, get_system_proxy_windows, set_system_proxy_windows};
use super::{
KernelInfo, KernelUpdateInfo, MihomoManager, ProfileMeta, ProxySettings, ProxyStatus,
KernelInfo, KernelUpdateInfo, MihomoManager, ProfileMeta, ProxySettings, ProxyStatus, TrafficSnapshot,
};
use crate::process_manager::{ProcessInfo, ProcessManager, ProcessStatus};
@@ -238,6 +238,14 @@ pub async fn proxy_get_connections(
state.get_connections().await
}
#[tauri::command]
#[specta::specta]
pub async fn proxy_traffic(
state: State<'_, MihomoManager>,
) -> Result<TrafficSnapshot, String> {
state.traffic_snapshot().await
}
#[tauri::command]
#[specta::specta]
pub async fn proxy_close_connection(