The headless browser for AI agents and web scraping
fix(stealth): pass proxy config to StealthHttpClient (#141)
cpp1992c6f6ce2cc2ad
diff --git a/Cargo.toml b/Cargo.tomlindex ebdb8d3a..90e073f7 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -29,7 +29,7 @@ servo_arc = "0.4"cssparser = "0.34"tokio = { version = "1", features = ["full"] }tokio-tungstenite = "0.26"-reqwest = { version = "0.12", features = ["cookies", "gzip", "brotli", "deflate", "native-tls-vendored"], default-features = false }+reqwest = { version = "0.12", features = ["cookies", "gzip", "brotli", "deflate", "native-tls-vendored", "socks"], default-features = false }serde = { version = "1", features = ["derive"] }serde_json = "1"url = "2"diff --git a/crates/obscura-browser/src/page.rs b/crates/obscura-browser/src/page.rsindex 94fb5666..a7c5082c 100644--- a/crates/obscura-browser/src/page.rs+++ b/crates/obscura-browser/src/page.rs@@ -54,7 +54,14 @@ impl Page {let frame_id = id.clone();#[cfg(feature = "stealth")]let stealth_client = if context.stealth {- Some(Arc::new(StealthHttpClient::new(context.cookie_jar.clone())))+ // wreq doesn't support SOCKS5; Clash mixed port handles both.+ let stealth_proxy = context.proxy_url.as_ref().map(|u| {+ u.replacen("socks5://", "http://", 1)+ });+ Some(Arc::new(StealthHttpClient::with_proxy(+ context.cookie_jar.clone(),+ stealth_proxy.as_deref(),+ )))} else {None};