Repository navigation
Adding support for a custom proxy input - #218
Conversation
Requires ingesting sfs-client update including microsoft/sfs-client#218
|
Merging directly to main? No develop branch? I see winget waiting for this fix.. will they validate your proxy support in winget before you make an official release? |
Yeah, our philosophy is that main is always building & working, but API users should be picking up from release-tagged commits. Thus, pushing to main should not affect a user immediately. They should run validation before integrating a new release. The PM who's interested in the feature has already validated it internally using our PR and a modification they made to winget (microsoft/winget-cli#5030) and said it's working fine. |
Requires ingesting sfs-client update from microsoft/sfs-client#218
Pulling SfsClient subtree release 1.1.0 [SfsClient Release 1.1.0](https://github.com/microsoft/sfs-client/releases/tag/1.1.0) Which brought especially [SfsClient - Client: proxy support #84](microsoft/sfs-client#218) This subtree update is required for WinGet Download Proxy support [WinGet download doesn't work through a proxy #5030](#5030) Also requires passing the appropriate proxy to SfsClient which is done as part of separate PR [Allows setting WinGet proxy setting as SFS Client Proxy #5032](#5032)
Allows setting WinGet proxy setting as the SFS Client Proxy. Fixes the issue below [WinGet download doesn't work through a proxy #5030](#5030) This PR requires SfsClient subtree updated to 1.1.0 [SfsClient update 1.1.0 for proxy support #5052](#5052) Which brings especially [Adding support for a custom proxy input #218](microsoft/sfs-client#218) This PR replaces closed PR below [Allows setting WinGet proxy setting as SFS Client Proxy #5032](#5032) <!-- To check a checkbox place an "x" between the brackets. e.g: [x] --> - [x] I have signed the [Contributor License Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs). - [x] This pull request is related to an issue.
Related Issues
Why is this change being made?
WinGet has a feature where a user can specify a proxy string. Some users of winget download are interested in using the feature so they can use a proxy to bypass enterprise blocking of the service URL, and sfs client would need to support the proxy string in its network connection layer.
For the curl implementation inside the client, that means passing in a string to CURLOPT_PROXY setting.
This PR is implementing support for a new input parameter for a request to supply a custom proxy.
What is being changed?
std::optional<std::string> proxyargument onrequestParamsin the Client APIs. The correspondent request will use that proxy when connecting to the service to get product information.proxystring is passed toCURLOPT_PROXYsettingProxyServerclass reusing the model for theMockWebServerclass and the cpp-httplib library. It just redirects GET and POST requests to the original server target URL.How was the change tested?
New tests are being added as mentioned above.