终端代理设置

Windows
cmd,powershell,git-bash设置代理的方式是不一样的 (因为不同shell"设置环境变量"的语法不同)

powershell
$env:https_proxy = "127.0.0.1:port"
$env:http_proxy = "127.0.0.1:port"

git-bash
export http_proxy='127.0.0.1:port'
export https_proxy='127.0.0.1:port'

cmd
set http_proxy='127.0.0.1:port'
set https_proxy='127.0.0.1:port'

 linux

export http_proxy=http://username:password@proxyhost:port/ 
export ftp_proxy=http://username:password@proxyhost:port/
export telnet_proxy=http://username:password@proxyhost:port/

export http_proxy=http://10.75.128.30:7890/
 

 例如:linux

export http_proxy=http://10.75.128.30:7890/

 cmd

set http_proxy=127.0.0.1:7890
set
https_proxy=127.0.0.1:7890

 

posted @ 2023-06-06 08:01  shiningrise  阅读(54)  评论(0编辑  收藏  举报