Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/AppInstallerCommonCore/MSStoreDownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
#include <AppinstallerLogging.h>
#include "AppInstallerMsixInfo.h"
#include "AppInstallerRuntime.h"
#include "winget/Locale.h"
#include "winget/HttpClientHelper.h"
#include "winget/JsonUtil.h"
#include "winget/Locale.h"
#include "winget/MSStoreDownload.h"
#include "winget/NetworkSettings.h"
#include "winget/Rest.h"
#include "winget/HttpClientHelper.h"
#include "winget/UserSettings.h"
#ifndef WINGET_DISABLE_FOR_FUZZING
#include <sfsclient/SFSClient.h>
Expand Down Expand Up @@ -910,6 +911,12 @@ namespace AppInstaller::MSStore
{
SFS::RequestParams sfsClientRequest;
sfsClientRequest.productRequests = { {std::string{ wuCategoryId }, {}} };
const auto& proxyUri = AppInstaller::Settings::Network().GetProxyUri();
if (proxyUri)
{
AICLI_LOG(Core, Info, << "Passing proxy to SFS client " << *proxyUri);
sfsClientRequest.proxy = *proxyUri;
}

auto requestResult = GetSfsClientInstance()->GetLatestAppDownloadInfo(sfsClientRequest, appContents);
if (!requestResult)
Expand Down
4 changes: 2 additions & 2 deletions src/AppInstallerCommonCore/Public/winget/NetworkSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace AppInstaller::Settings
{
static NetworkSettings& Instance();

const std::optional<std::string> GetProxyUri() const { return m_proxyUri; }
const std::optional<std::string>& GetProxyUri() const { return m_proxyUri; }
// Sets the proxy URI; may do nothing depending on admin settings and group policy
void SetProxyUri(const std::optional<std::string>& proxyUri);

Expand All @@ -30,4 +30,4 @@ namespace AppInstaller::Settings
};

NetworkSettings& Network();
}
}
Loading