proxy config

proxy config,第1张

proxy config

touch proxyon.txt:

export http_proxy=http://172.16.1.15:8080

export no_proxy="127.0.0.1,localhost,.localdomain.com"

export https_proxy=$http_proxy

ftp_proxy=$http_proxy

rsync_proxy=$http_proxy

all_proxy=$http_proxy

HTTP_PROXY=$http_proxy

HTTPS_PROXY=$http_proxy

FTP_PROXY=$http_proxy

RSYNC_PROXY=$http_proxy

ALL_PROXY=$http_proxy

NO_PROXY=$no_proxy

echo "Proxy enabled: ${http_proxy}"

touch proxyoff.txt:

unset http_proxy https_proxy ftp_proxy rsync_proxy all_proxy HTTP_PROXY HTTPS_PROXY FTP_PROXY RSYNC_PROXY ALL_PROXY

echo "Proxy disabled"

source proxyon

source proxyoff

To automatically set the system proxy after login:

sudo ln -s /usr/local/bin/proxy-on /etc/profile.d/proxy.sh

set git proxy:

git config --global http.proxy (172.16.1.12:8080)url:port

git config --global https.proxy url:port

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5678353.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存