如何为debian设置全局代理

方法一
添加代理设置,添加环境变量

export http_proxy="http://127.0.0.1:8123"
export https_proxy="http://127.0.0.1:8123"
source /etc/profile #重新载入环境变量

取消代理

unset http_proxy
unset https_proxy

方法二
或者将以下内容写入.bashrc中

export http_proxy="http://127.0.0.1:8123"
export https_proxy="http://127.0.0.1:8123"
source /root/.bashrc #重新载入环境变量

如果要取消,注视掉这两行export之后,再重载环境变量即可

#export http_proxy="http://127.0.0.1:8123"
#export https_proxy="http://127.0.0.1:8123"
source /root/.bashrc #重新载入环境变量

文章来自:泰恩数据
文章链接:https://tyne.cc/1254.html

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注