普通代理
# 格式
export http_proxy=http://username:password@proxy_ip:prot
export https_proxy=https://username:password@proxy_ip:port
# 例
export http_proxy=http://127.0.0.1:8080
export https_proxy=http://127.0.0.1:8080
export no_proxy=“127.0.0.1,localhost,*inter.com”
socket代理
export http_proxy=socks5://username:password@127.0.0.1:1080
export https_proxy=socks5://username:password@127.0.0.1:1080
export all_proxy=socks5://username:password@127.0.0.1:1080
git使用代理
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
SNAP使用代理
snap set system proxy.http="http://<proxy_addr>:<proxy_port>"
snap set system proxy.https="http://<proxy_addr>:<proxy_port>"
APT使用代理
vim /etc/apt/apt.conf.d/proxy.conf
Acquire::http::Proxy "http://username:password@proxy-IP-address:proxyport";
Acquire::https::Proxy "http://username:password@proxy-IP-address:proxyport";