mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-12 10:47:28 +02:00
refactor: do not use system proxy on windows
This commit is contained in:
1 parent
435092de30
commit
745a4da17c
1 file changed
+4
-1
@@ -96,8 +96,12 @@ impl WayfernManager {
|
|||||||
inner: Arc::new(AsyncMutex::new(WayfernManagerInner {
|
inner: Arc::new(AsyncMutex::new(WayfernManagerInner {
|
||||||
instances: HashMap::new(),
|
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()
|
http_client: Client::builder()
|
||||||
.timeout(Duration::from_secs(2))
|
.timeout(Duration::from_secs(2))
|
||||||
|
.no_proxy()
|
||||||
.build()
|
.build()
|
||||||
.expect("Failed to build reqwest client for wayfern_manager"),
|
.expect("Failed to build reqwest client for wayfern_manager"),
|
||||||
}
|
}
|
||||||
@@ -416,7 +420,6 @@ impl WayfernManager {
|
|||||||
.arg(format!("--remote-debugging-port={port}"))
|
.arg(format!("--remote-debugging-port={port}"))
|
||||||
.arg("--remote-debugging-address=127.0.0.1")
|
.arg("--remote-debugging-address=127.0.0.1")
|
||||||
.arg(format!("--user-data-dir={}", temp_profile_dir.display()))
|
.arg(format!("--user-data-dir={}", temp_profile_dir.display()))
|
||||||
.arg("--disable-gpu")
|
|
||||||
.arg("--no-first-run")
|
.arg("--no-first-run")
|
||||||
.arg("--no-default-browser-check")
|
.arg("--no-default-browser-check")
|
||||||
.arg("--disable-background-mode")
|
.arg("--disable-background-mode")
|
||||||
|
|||||||
Reference in new issue
Block a user