Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

fix: apply global proxy settings to reqwest client builders in Udemy authentication

Tonho4589d1d82407
diff --git a/src-tauri/src/platforms/udemy/auth.rs b/src-tauri/src/platforms/udemy/auth.rs
index bb3071d6..20aa536d 100644
--- a/src-tauri/src/platforms/udemy/auth.rs
+++ b/src-tauri/src/platforms/udemy/auth.rs
@@ -77,7 +77,7 @@ pub fn build_client_from_saved(saved: &SavedSession) -> anyhow::Result<reqwest::
HeaderValue::from_static("en_US"),
);
- let client = reqwest::Client::builder()
+ let client = crate::core::http_client::apply_global_proxy(reqwest::Client::builder())
.user_agent("okhttp/4.12.0 UdemyAndroid 9.51.2(594) (phone)")
.default_headers(default_headers)
.redirect(reqwest::redirect::Policy::limited(10))
@@ -122,7 +122,7 @@ fn build_enterprise_client(saved: &SavedSession) -> anyhow::Result<reqwest::Clie
HeaderValue::from_static("en_US"),
);
- let client = reqwest::Client::builder()
+ let client = crate::core::http_client::apply_global_proxy(reqwest::Client::builder())
.user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36")
.default_headers(default_headers)
.redirect(reqwest::redirect::Policy::limited(10))