winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Proxy options support

Open KiruyaMomochi opened this issue 4 years ago • 52 comments

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 avatar May 19 '20 17:05 KiruyaMomochi

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

jantari avatar May 19 '20 18:05 jantari

1080端口,老局域网用户了

zuozishi avatar May 21 '20 22:05 zuozishi

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.

timiil avatar May 23 '20 04:05 timiil

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

faustool avatar May 27 '20 16:05 faustool

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!

t-mxcom avatar Jun 16 '20 14:06 t-mxcom

Any plan regarding this feature?

klesh avatar Jul 27 '20 07:07 klesh

Really need this!

sharpninja avatar Mar 12 '21 18:03 sharpninja

Need this too!

HydrogenDeuterium avatar Apr 19 '21 03:04 HydrogenDeuterium

Need it!

hxse avatar May 01 '21 11:05 hxse

Surprised this wasn't a 1.0 feature.

sourcedelica avatar May 27 '21 16:05 sourcedelica

Need it!

kybom avatar May 28 '21 02:05 kybom

Need it!

qiyuey avatar May 28 '21 16:05 qiyuey

Need it.

1.0 without proxy support ... lol

fMichaleczek avatar May 29 '21 09:05 fMichaleczek

+1

liuilin avatar Jul 02 '21 05:07 liuilin

Need it

logique233 avatar Jul 07 '21 06:07 logique233

Need this as well.

UM-RMeeker avatar Jul 13 '21 13:07 UM-RMeeker

Also need for winget upgrade

Mindzy avatar Jul 18 '21 14:07 Mindzy

Need it

zhaofeng-shu33 avatar Aug 19 '21 09:08 zhaofeng-shu33

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

d0zingcat avatar Oct 02 '21 05:10 d0zingcat

@d0zingcat because its not socks5.

michaelrinderle avatar Oct 06 '21 05:10 michaelrinderle

@d0zingcat because its not socks5.

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

d0zingcat avatar Oct 08 '21 02:10 d0zingcat

Really need it, especially for people having trouble connect to the default registry.

ngalioth avatar Oct 27 '21 18:10 ngalioth

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.

michaelrinderle avatar Oct 27 '21 20:10 michaelrinderle

Need it!

ykgw-liuxin avatar Oct 29 '21 05:10 ykgw-liuxin

Absly need it.

YuanfengZhang avatar Nov 02 '21 13:11 YuanfengZhang

15k stars and no proxy support? I thought this was a joke. This is bloody needed

gerroon avatar Nov 08 '21 06:11 gerroon

This feature is so important that many users want it! Can't wait for it.

I'm current using a proxy application (CFW) on my own device. I really want winget.exe can automatically detect system proxy settings, so I can only change the proxy state of CFW for managing almost every other applications on the device.

Dragon1573 avatar Dec 21 '21 13:12 Dragon1573

@Dragon1573 Actually winget can detect system proxy at current. You just need to disable the Delivery Optimization service by setting network.downloader to wininet.

P.S. The documentation says that Delivery Optimization will make use of the system proxy, however it's not working on my machine. So you're better off disabling it.

eternalphane avatar Dec 22 '21 12:12 eternalphane

@eternalphane That's nice! I'm currently using wininet as the network.downloader. Now I switch my network topology, from using a localhost proxy with CFW to using a LAN proxy with CFA (Clash for Android). I launch the CFA on my phone and provide WIFI connection and proxy service for the laptop. I'm using that proxy as a system proxy and everything works fine.

Thank you!


CFW provide Service Mode and TUN Mode for users, winget.exe will rarely encounter a network error with TUN Mode enabled. Maybe disable this mode is better ...

Dragon1573 avatar Dec 22 '21 13:12 Dragon1573

Need it!

gaozhe3321 avatar Aug 03 '22 14:08 gaozhe3321