feat: add Mihomo API modules and manager (#2869)

• Introduce new API caller implementations for Mihomo in model and module layers.
• Add configuration and API integration files under /src-tauri/src/config/api and /src-tauri/src/model/api.
• Implement a singleton MihomoAPICaller with async API call support and integration tests.
• Create a new MihomoManager module to refresh and fetch proxies from the API.
• Update Cargo.lock and Cargo.toml with additional dependencies (async-trait, env_logger, mockito, tempfile, etc.) related to the Mihomo API support.
This commit is contained in:
Tunglies
2025-03-03 19:31:44 +08:00
committed by GitHub
parent 3e53ea7209
commit 3b69465016
15 changed files with 505 additions and 4 deletions

View File

@@ -67,6 +67,7 @@ getrandom = "0.2"
tokio-tungstenite = "0.26.1"
futures = "0.3"
sys-locale = "0.3.1"
async-trait = "0.1.86"
[target.'cfg(windows)'.dependencies]
runas = "=1.2.0"
@@ -120,3 +121,8 @@ strip = false # 不剥离符号,保留调试信息
[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[dev-dependencies]
env_logger = "0.11.0"
mockito = "1.2.0"
tempfile = "3.17.1"