linux中的常用的proxy 代理方式

  1. 设置ALL_PROXY环境变量
    export ALL_PROXY=socks5://127.0.0.1:1080
    支持socks5 http https
    取消
    export ALL_PROXY=""

2.使用proxychains

github开源地址:https://github.com/rofl0r/proxychains-ng

  1. vpxN方式全局代理

...

4 GO下载模块代理

# Enable the go modules feature
export GO111MODULE=on
# Set the GOPROXY environment variable
export GOPROXY=https://goproxy.io

5 Git下的代理

#全局的
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

#只对github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

#取消代理
git config --global --unset http.https://github.com.proxy
原文地址:https://www.cnblogs.com/lovesKey/p/11979781.html