Linux设置代理

临时设置

设置代理

 export http_proxy="http://ip:port"
 export https_proxy="https://ip:port"

取消代理

unset http_proxy
unset https_proxy

永久设置

将代理设置添加到环境文件

# cat   >>  /etc/profile   << EOF

export  http_proxy="http://username:password@proxyServer:port/"

export  https_proxy="http://username:password@proxyServer:port/"

export ftp_proxy="http://username:password@proxyServer:port/"

export no_proxy="127.0.0.1,192.168.124.0/16,*.example.com"

EOF

#  source     /etc/profile   

Sitemap · Rss

津ICP备2021004480号-3