Home Windows Commandline下设置代理命令行代理proxy
Post
Cancel

Windows Commandline下设置代理命令行代理proxy

refer to: 

https://stackoverflow.com/questions/26992886/set-proxy-through-windows-command-line-including-login-parameters

总之就是 set HTTP_PROXY, HTTPS_PROXY这样的变量,就可以用了。

PS D:\workspace\register_user> set HTTPS_PROXY="https://127.0.0.1:8080"
PS D:\workspace\register_user> set HTTP_PROXY="http://127.0.0.1:8080"
PS D:\workspace\register_user> npx playwright install
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
Downloading Chromium 114.0.5735.35 (playwright build v1064) from https://playwright.azureedge.net/builds/chromium/1064/chromium-win64.zip
113.5 Mb [= ] 3% 281.2s

也可以这样:

https://shazi.info/npm-%E8%A8%AD%E5%AE%9A-proxy-%E7%9A%84%E6%96%B9%E5%BC%8F/

This post is licensed under CC BY 4.0 by the author.