0. 设置前,git clone 慢至 25kb/s 无法忍受

1. 搭建ss或其他科学上网通道,并开启本地监听

设置本地端口(此处用的是Trojan)

2. 按对应端口号设置

1
2
3
4
git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
git config --global https.https://github.com.proxy socks5://127.0.0.1:1086
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

3. 查看config

1
git config --global -e