代理配置
PowerShell 代理
需要管理员权限,否则报错:Error writing proxy settings. (5) Access is denied.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| netsh winhttp show proxy
netsh winhttp set proxy 127.0.0.1:7890
netsh winhttp import proxy source=ie
$env:HTTP_PROXY="http://127.0.0.1:7890" $env:HTTPS_PROXY="https://127.0.0.1:7890"
netsh winhttp reset proxy
|
Git 代理
1 2 3 4 5 6 7
| git config --global http.proxy 127.0.0.1:7890 git config --global https.proxy 127.0.0.1:7890
git config --global --unset http.proxy git config --global --unset https.proxy
|
CMD 代理
1 2 3 4 5 6 7
| netsh winhttp set proxy 127.0.0.1:7890 netsh winhttp reset proxy
set http_proxy=127.0.0.1:7890 set https_proxy=127.0.0.1:7890 set http_proxy= set https_proxy=
|
Ubuntu 代理
1 2 3 4 5
| http_proxy="http://127.0.0.1:7890" https_proxy="http://127.0.0.1:7890" ftp_proxy="ftp://myproxy3.server.com:8080/" socks_proxy="socks://myproxy4.server.com:8080/" no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
|