mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-10 11:37:21 +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:
@@ -88,15 +88,19 @@ export async function dispatchItem(id: string): Promise<boolean> {
|
||||
const getProxyArgs = async (settings: ReturnType<typeof useSettingsStore.getState>) => {
|
||||
if (settings.proxyMode === 'system') {
|
||||
try {
|
||||
return await invoke('get_system_proxy');
|
||||
const sysProxy = await invoke('get_system_proxy');
|
||||
return typeof sysProxy === 'string' && sysProxy ? sysProxy : "none";
|
||||
} catch (e) {
|
||||
console.warn("Failed to get system proxy:", e);
|
||||
return null;
|
||||
return "none";
|
||||
}
|
||||
}
|
||||
if (settings.proxyMode === 'custom' && settings.proxyHost) {
|
||||
return `http://${settings.proxyHost}:${settings.proxyPort}`;
|
||||
}
|
||||
if (settings.proxyMode === 'none') {
|
||||
return "none";
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user