refactor: do not use system proxy on windows

This commit is contained in:
zhom
2026-07-09 14:23:11 +04:00
parent 435092de30
commit 745a4da17c
+4 -1
View File
@@ -96,8 +96,12 @@ impl WayfernManager {
inner: Arc::new(AsyncMutex::new(WayfernManagerInner {
instances: HashMap::new(),
})),
// CDP is always on loopback. Disable env/system proxies so a Windows
// WinHTTP/IE proxy (or HTTP_PROXY) cannot intercept /json/version and
// return 502 Bad Gateway while the browser is actually listening.
http_client: Client::builder()
.timeout(Duration::from_secs(2))
.no_proxy()
.build()
.expect("Failed to build reqwest client for wayfern_manager"),
}
@@ -416,7 +420,6 @@ impl WayfernManager {
.arg(format!("--remote-debugging-port={port}"))
.arg("--remote-debugging-address=127.0.0.1")
.arg(format!("--user-data-dir={}", temp_profile_dir.display()))
.arg("--disable-gpu")
.arg("--no-first-run")
.arg("--no-default-browser-check")
.arg("--disable-background-mode")