chore: handle download interuptions

This commit is contained in:
zhom
2026-03-16 15:48:52 +04:00
parent 76dd0d84e8
commit 2cf9013d28
5 changed files with 112 additions and 28 deletions
+9 -1
View File
@@ -293,9 +293,17 @@ async fn fetch_dynamic_proxy(
url: String,
format: String,
) -> Result<crate::browser::ProxySettings, String> {
crate::proxy_manager::PROXY_MANAGER
let settings = crate::proxy_manager::PROXY_MANAGER
.fetch_dynamic_proxy(&url, &format)
.await?;
// Validate the proxy actually works by routing through a temporary local proxy
crate::proxy_manager::PROXY_MANAGER
.check_proxy_validity("_dynamic_test", &settings)
.await
.map_err(|e| format!("Proxy resolved but connection failed: {e}"))?;
Ok(settings)
}
#[tauri::command]