文章

ubuntu_科学上网

全局出口

浏览器

  • firefox,全局代理,使用FoxyProxy插件
  • edge,直连,用于国内资源,校内资源
  • chrome,备用半自动

终端

proxychains方案

sudo apt install proxychains vim /etc/proxychains.conf

  • 设置sock5 127.0.0.1:1089
  • 测试:curl cip.cc ip
  • 使用proxychains git clone https://github.com/xxxxx

环境变量方案

1
2
3
4
5
6
export http_proxy="socks5://127.0.0.1:1080"
export https_proxy="socks5://127.0.0.1:1080"
git config --global http.proxy 'socks5://127.0.0.1:1080' 
git config --global https.proxy 'socks5://127.0.0.1:1080'
unset http_proxy
unset https_proxy
本文由作者按照 CC BY 4.0 进行授权