一、永久生效
修改 /etc/profile 文件,添加下面内容:
vim /etc/profile #编辑profile文件
添加Proxy代理信息(其中username和password根据需要填写,若无去掉 username:password@)
http_proxy = http://username:password@proxy_ip:port/
https_proxy = http://username:password@proxy_ip:port/
ftp_proxy = http://username:password@proxy_ip:port/
export http_proxy
export https_proxy
export ftp_proxy
生效配置
source /etc/profile
二、临时生效(重连失效)
其中username和password根据需要填写,若无去掉 username:password@
export http_proxy=http://username:password@yourproxy:port/
export https_proxy=http://username:password@yourproxy:port/
export ftp_proxy=http://username:password@yourproxy:port/
最后查询下是否是代理的ip:
curl http://toyaml.com:9999/whoami
进入微信小程序即可免费下载文章附件
暂无评论