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

Allows setting WinGet proxy setting as SFS Client Proxy #5032

Closed
8 changes: 8 additions & 0 deletions src/AppInstallerCommonCore/MSStoreDownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "winget/Rest.h"
#include "winget/HttpClientHelper.h"
#include "winget/UserSettings.h"
#include "winget/NetworkSettings.h"
nidietr-MSFT marked this conversation as resolved.
Show resolved Hide resolved
#ifndef WINGET_DISABLE_FOR_FUZZING
#include <sfsclient/SFSClient.h>
#endif
Expand Down Expand Up @@ -910,6 +911,13 @@ namespace AppInstaller::MSStore
{
SFS::RequestParams sfsClientRequest;
sfsClientRequest.productRequests = { {std::string{ wuCategoryId }, {}} };
if (AppInstaller::Settings::Network().GetProxyUri())
nidietr-MSFT marked this conversation as resolved.
Show resolved Hide resolved
{
std::string proxyUri = AppInstaller::Settings::Network().GetProxyUri().value();
nidietr-MSFT marked this conversation as resolved.
Show resolved Hide resolved

sfsClientRequest.proxy = proxyUri;
AICLI_LOG(Core, Info, << "Passing proxy to SFS client " << proxyUri);
nidietr-MSFT marked this conversation as resolved.
Show resolved Hide resolved
}

auto requestResult = GetSfsClientInstance()->GetLatestAppDownloadInfo(sfsClientRequest, appContents);
if (!requestResult)
Expand Down
Loading