Skip to content

Winget Ignores network.downloader setting #4695

Closed
@chuhyeonjin

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    In-PRIssue related to a PRIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    Projects

    • Status

      Released

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions