mirror of
https://github.com/nimbold/Firelink.git
synced 2026-09-01 13:38:01 +00:00
fix(network): explicitly disable proxy fallbacks for none and system modes
Disabled implicit system/environment variable proxy fallbacks in reqwest, yt-dlp, and aria2c when no proxy is explicitly provided. Updated useDownloadStore to strictly return 'none' when 'none' is selected or when 'system' proxy is empty, matching IDM/FDM behavior and ignoring http_proxy environment variables.
This commit is contained in:
@@ -703,7 +703,11 @@ fn build_client(payload: &DownloadPayload) -> Result<Client, String> {
|
||||
builder = builder.user_agent(user_agent);
|
||||
}
|
||||
if let Some(proxy) = payload.proxy.as_deref().filter(|value| !value.is_empty()) {
|
||||
builder = builder.proxy(reqwest::Proxy::all(proxy).map_err(|error| error.to_string())?);
|
||||
if proxy == "none" {
|
||||
builder = builder.no_proxy();
|
||||
} else {
|
||||
builder = builder.proxy(reqwest::Proxy::all(proxy).map_err(|error| error.to_string())?);
|
||||
}
|
||||
}
|
||||
|
||||
builder.build().map_err(|error| error.to_string())
|
||||
|
||||
Reference in New Issue
Block a user