Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Winget Ignores network.downloader setting #4695

Closed
chuhyeonjin opened this issue Jul 31, 2024 · 0 comments · Fixed by #4696
Closed

Winget Ignores network.downloader setting #4695

chuhyeonjin opened this issue Jul 31, 2024 · 0 comments · Fixed by #4696
Labels
In-PR Issue related to a PR Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@chuhyeonjin
Copy link

Brief description of your issue

InstallerDownloader NetworkSettings::GetInstallerDownloader() const
{
// The default is DeliveryOptimization.
// We only use WinINet if specified by settings, or if we want to use proxy (as DO does not support that)
InstallerDownloader setting = User().Get<Setting::NetworkDownloader>();
if (setting != InstallerDownloader::WinInet && m_proxyUri)
{
AICLI_LOG(Core, Info, << "Forcing use of wininet for download as DO does not support proxy");
return InstallerDownloader::WinInet;
}
else // Default or DO
{
return InstallerDownloader::DeliveryOptimization;
}
}

As the comment in above method explained, winget should use WinINet if specified by settings, or if the user wants to use a proxy.

But if I set the network.downloader settings to "wininet", then winget still uses DO downloader.

Steps to reproduce

If you use proxy and set network.downloader setting to "do" or "default", then Winget uses WinINet downloader.
In other cases, Winget uses DO downloader.

network.downloader: "wininet" & > winget.exe install --verbose <package> -> uses DO downloader.
network.downloader: "wininet" & > winget.exe install --verbose --proxy http://127.0.0.1:8118 <package> -> uses DO downloader.
network.downloader: "do" & > winget.exe install --verbose --proxy http://127.0.0.1:8118 <package> -> uses WinINet downloader.

Expected behavior

Winget should use WinINet downloader instead of DO downloader when the user set the network.downloader settings to "wininet".

Actual behavior

Winget uses DO downloader.

Environment

Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3880
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Enabled
DefaultProxy                              Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jul 31, 2024
@chuhyeonjin chuhyeonjin changed the title Winget Ignores network.downloader setting Winget Ignores network.downloader setting Jul 31, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added In-PR Issue related to a PR and removed Needs-Triage Issue need to be triaged labels Jul 31, 2024
@denelon denelon added this to the 1.9 Client milestone Oct 10, 2024
@denelon denelon added this to WinGet Oct 22, 2024
@denelon denelon moved this to Done in WinGet Oct 22, 2024
@denelon denelon added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Oct 22, 2024
@denelon denelon moved this from Done to Released in WinGet Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In-PR Issue related to a PR Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants