Uh oh!
There was an error while loading. Please reload this page.
Add support for proxies #190 - #4203
Conversation
# Conflicts: # src/AppInstallerCLICore/ExecutionContextData.h # src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| switch (setting) | ||
| { | ||
| case AppInstaller::Settings::StringAdminSetting::DefaultProxy: | ||
| return GroupPolicies().GetValueRef<ValuePolicy::DefaultProxy>(); |
There was a problem hiding this comment.
Just double check, if DefaultProxy group policy is not set. The return will be std::nullopt? Why there's a reference_wrapper needed here?
There was a problem hiding this comment.
Yes, GroupPolicies().GetValue*() returns std::nullopt if the policy is not set.
Unless I'm misunderstanding what it does, the reference_wrapper allows us to return a reference of the value instead of copying it. That is the behavior I would expect if we were able to do std::optional<std::string&>.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: yao-msft <50888816+yao-msft@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: yao-msft <50888816+yao-msft@users.noreply.github.com>
Co-authored-by: yao-msft <50888816+yao-msft@users.noreply.github.com>
NEANC.or.HZCK (NEANC)
commented
Aug 15, 2024
I'm very sorry that my issues and PRs are causing problems for you all. Thanks to microsoft and the winget team for their excellent work! |
For #190
See spec on #4152
See #1776 for a related PR for the feature with the core implementation for proxies in wininet
This PR adds basic support for using proxies. Most of the changes are for enabling the configuration and blocking of the feature. This feature will be gated behind an experimental feature setting
AdminSettingsto support settings with string values, instead of only bool flags. The implementation is mostly a copy of the bool case. In the future we should look back at it to reduce duplication of code.setsubcommand tosettingsthat can set the admin settingsManually tested on a VM using mitmproxy
Pending: Adding automated tests tests.
Microsoft Reviewers: Open in CodeFlow