为终端设置代理,Windows,Linux

开启代理

端口号依据代理软件的端口号指定,我这里是7890

Windows

set http_proxy=http://127.0.0.1:7890
set https_proxy=http://127.0.0.1:7890

Linux

export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"

测试网络连接

curl -vv http://www.google.com

关闭代理

Windows

set http_proxy=
set https_proxy=

Linux

export http_proxy=""
export https_proxy=""

猜你喜欢

转载自blog.csdn.net/qq_44839815/article/details/127375797
今日推荐