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

Proxy options support #190

Open
KiruyaMomochi opened this issue May 19, 2020 · 51 comments · May be fixed by #1776
Open

Proxy options support #190

KiruyaMomochi opened this issue May 19, 2020 · 51 comments · May be fixed by #1776
Assignees
Labels
Experimental This experimental feature can be enabled in settings In-PR Issue related to a PR Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@KiruyaMomochi
Copy link

KiruyaMomochi commented May 19, 2020

Description of the new feature/enhancement

Something like:

winget install git.git --proxy="http://127.0.0.1:2345"

This will make winget download git through the proxy server.

@KiruyaMomochi KiruyaMomochi added the Issue-Feature This is a feature request for the Windows Package Manager client. label May 19, 2020
@jantari
Copy link

jantari commented May 19, 2020

Possible proxy configuration options are:

  • Environment variables ( e.g. WINGET_PROXY_URL)
  • Auto-detecting settings from inetcpl.cpl aka IE
  • command line arguments
  • config file
  • registry config separate from IE. This would tie in nicely with ADMX (group policy) templates down the road

@zuozishi
Copy link

1080端口,老局域网用户了

@timiil
Copy link

timiil commented May 23, 2020

please consider also proxy the download link inside the package , for example ,

winget install kodi --proxy http://xxx/

please also proxy the download link 'https://mirrors.kodi.tv/releases/windows/win64/kodi-18.7-Leia-x64.exe' which insided the installation package.

@denelon denelon added this to the Package Manager Backlog milestone May 23, 2020
@faustool
Copy link

Possible proxy configuration options are:

  • Environment variables ( e.g. WINGET_PROXY_URL)
  • Auto-detecting settings from inetcpl.cpl aka IE
  • command line arguments
  • config file
  • registry config separate from IE. This would tie in nicely with ADMX (group policy) templates down the road

I would recommend standard variables like HTTP_PROXY or HTTPS_PROXY

@t-mxcom
Copy link

t-mxcom commented Jun 16, 2020

When adding proxy support, please do not forget supporting proxies that require NTLM-authentication!!!
In an enterprise environment where the workstations are joined to a domain, and the users use domain accounts, entering a password should not be necessary! (Windows Integrated Authentication)

Thank you!

@klesh
Copy link

klesh commented Jul 27, 2020

Any plan regarding this feature?

@sharpninja

This comment was marked as spam.

@HydrogenDeuterium

This comment was marked as spam.

@hxse

This comment was marked as spam.

@sourcedelica

This comment was marked as spam.

@kybom

This comment was marked as spam.

1 similar comment
@qiyuey

This comment was marked as spam.

@fMichaleczek

This comment was marked as spam.

@liuilin

This comment was marked as spam.

@logique233

This comment was marked as spam.

@UM-RMeeker

This comment was marked as spam.

@Mindzy
Copy link

Mindzy commented Jul 18, 2021

Also need for winget upgrade

@zhaofeng-shu33

This comment was marked as spam.

@d0zingcat
Copy link

Why not try set http_proxy=http://localhost:7890 and set https_proxy=http://localhost:7890?

@michaelrinderle
Copy link

@d0zingcat because its not socks5.

@d0zingcat
Copy link

@d0zingcat because its not socks5.

Maybe you could use Privoxy(windows)/polipo(macOS) to parse socks5 to http?

@ngalioth

This comment was marked as spam.

@michaelrinderle
Copy link

not that its an equivalent but even spotify can run over socks5. it would be nice to run winget through tor like all my other package managers to curb targeted injection attacks.

@ykgw-liuxin

This comment was marked as spam.

@gerroon

This comment was marked as spam.

@eternalphane eternalphane linked a pull request Dec 5, 2021 that will close this issue
10 tasks
@ghost ghost added the In-PR Issue related to a PR label Dec 5, 2021
@ChesterZengJian
Copy link

Need it

@lo-w

This comment was marked as spam.

@cgfork

This comment was marked as spam.

@AndrewLauu

This comment was marked as spam.

@biaocy
Copy link

biaocy commented Dec 17, 2022

System-wide proxy actually works.
Windows version: Win 10 22H2 (19045.2251)
Powershell version: 7.3.1

@toshiya14

This comment was marked as spam.

1 similar comment
@char-46

This comment was marked as spam.

@gerroon
Copy link

gerroon commented Jan 13, 2023

The whole point of asking for a custom proxy support is to make sure one is not using systemwide proxy. The systemwide proxy opens connections to everything else o the system.

@walkonbothsides

This comment was marked as spam.

@NJCCJohnWatson

This comment was marked as spam.

@altiris4ever
Copy link

As a workaround i use: "bitsadmin /util /setieproxy localsystem MANUAL_PROXY "
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-util-and-setieproxy

@denelon
Copy link
Contributor

denelon commented Feb 17, 2023

All,

Please be respectful of others who are watching this Issue. Every comment is sent out as an e-mail to every user watching this Issue. Adding comments like "Need it" or "+1" is just causing more noise. We track relative priority by the number of 👍 on the original post for the Issue. I've hid the majority of these comments, as they do not add to the scope of the issue or offer support for others who also want this feature and are essentially "subscribed" because they have added their 👍.

This issue is now high on the backlog. We have several security concerns we have to address in order to enable this feature. As soon as we have a design that is acceptable for our security requirements, we will look to sequence this work for engineering.

You can see how we prioritize work on the Roadmap.

@denelon denelon modified the milestones: v1.5-Client, v.Next-Client Apr 19, 2023
@itodouble
Copy link

Is there any plan that can be used ?

@char-46
Copy link

char-46 commented Oct 3, 2023

It's been more than three years since this issue was created, and we see that this issue has a linked PR #1776, which solves some problems. After that PR, this issue was added to the milestones: v1.3-Client, v1.4-Client, v1.5-Client and now v.Next-Client. As the differences between commits increase due to the development of master branches, merge PR has become a challenge by now. Moreover, according to RoadMap, this issue is already the issue with the largest number of 👍 among milestone: v.Next-Client. Can we first merge this PR as an experimental feature, and then gradually fix it according to the new problems we encounter?

@denelon
Copy link
Contributor

denelon commented Nov 11, 2023

We have to adhere to our internal security standards which is why that PR hasn't been merged. We're working on getting the documentation together for our security review, and then we'll be able to either start from that PR or create a new one with the approved method. It will initially start out as an experimental feature in a preview and then it can be made stable feature in the next stable release.

I've changed how we're tracking work across milestones to avoid the constant movement. We've had several other high-priority features and bug fixes in progress, but this has made it to the top of the list for asks from the community.

@denelon denelon modified the milestones: v.Next-Client, 1.8 Client Jan 3, 2024
@denelon
Copy link
Contributor

denelon commented Feb 7, 2024

Hey everyone, I know it's been a long time coming, but we have had our initial security review. We will be submitting a specification document and will work on final review and then we can get into implementation.

  • We will need GPO (Group Policy Objects) for enterprise control of WinGet with respect to proxy support.
  • Specifying a default proxy for WinGet will require administrative permissions.
  • The CLI will not require administrative permissions to pass "--proxy " (will not override GPO).

I want to thank @eternalphane for the draft PR:

@tlsalex
Copy link

tlsalex commented Feb 20, 2024

waiting for the good news

@cuellartech
Copy link

Hey everyone, I know it's been a long time coming, but we have had our initial security review. We will be submitting a specification document and will work on final review and then we can get into implementation.

  • We will need GPO (Group Policy Objects) for enterprise control of WinGet with respect to proxy support.
  • Specifying a default proxy for WinGet will require administrative permissions.
  • The CLI will not require administrative permissions to pass "--proxy " (will not override GPO).

I want to thank @eternalphane for the draft PR:

You mention a GPO. Is there a plan to also include Intune, using a configuration policy, as a means for enterprise control?

We have many workstations that are not domain joined, only Entra joined, that have no GPOs and no intention of introducing any.

florelis added a commit that referenced this issue Mar 14, 2024
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

* Added Group Policy and Admin settings for enabling/disabling the use
of proxy CLI arguments and for setting a default proxy.
  + Pending: Internal review for new Group Policy
+ Extended `AdminSettings` to 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.
+ Added a `set` subcommand to `settings` that can set the admin settings
* Added CLI arguments to select a proxy on each different invocation of
winget, or to disable the use of a default one.
* Updated calls to wininet and cpprestsdk to use the provided proxy, and
added plumbing to get the arguments from the command line to the point
of use.
* Changed the flow around downloads to force winget to use proxies if
available.

Manually tested on a VM using mitmproxy
Pending: Adding automated tests tests.

Co-authored-by: yao-msft <50888816+yao-msft@users.noreply.github.com>
florelis added a commit that referenced this issue Mar 15, 2024
@mominshaikhdevs
Copy link

the Intune situation should be considered too as a part of supporting proxies. this issue can be closed then.

@denelon denelon added the Experimental This experimental feature can be enabled in settings label Apr 30, 2024
@denelon
Copy link
Contributor

denelon commented Apr 30, 2024

Hey everybody, the "Proxy" experimental feature is available in the latest WinGet 1.8 preview release.

I'd like to see a few folks test the feature out, but I don't want to add more noise here on the issue that triggers e-mails to everyone subscribed.

Please test out the feature and provide your results over at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experimental This experimental feature can be enabled in settings In-PR Issue related to a PR Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

Successfully merging a pull request may close this issue.