Update On Sat Apr 19 20:35:22 CEST 2025

This commit is contained in:
github-action[bot]
2025-04-19 20:35:23 +02:00
parent 3888f8359d
commit ac088f20ca
73 changed files with 1593 additions and 1180 deletions

View File

@@ -95,6 +95,19 @@ impl MihomoManager {
self.update_providers_proxies(providers_proxies);
Ok(self)
}
pub async fn close_all_connections(&self) -> Result<(), String> {
let url = format!("{}/connections", self.mihomo_server);
let response = self.send_request(Method::DELETE, url, None).await?;
if response["code"] == 204 {
Ok(())
} else {
Err(response["message"]
.as_str()
.unwrap_or("unknown error")
.to_string())
}
}
}
impl MihomoManager {