github拿项目巨慢, 3k/s, 这得拿到猴年.

http模式的代理, 其实mac下面这个很鸡肋.

#github加代理给http模式用
alias giton='git config --global http.https://github.com.proxy socks5://127.0.0.1:1080'

#取消代理
alias gitoff='git config --global --unset http.https://github.com.proxy'

如果是pac模式, 那么记得在代理软件的设置中要加入下面规则

||github.com^

设置ssh模式的代理, 这个才是重点, 比如这种clone方式就是ssh模式: git clone git@github.com:play-with-docker/play-with-docker.github.io.git

code ~/.ssh/config   # 用别的工具也可以, mate, vi, cat, echo....

文件内编辑: 
Host github.com
    ProxyCommand          nc -x 127.0.0.1:1080 %h %p   #sockes代理的写法
    ServerAliveInterval   10

ProxyCommand nc -X connect -x localhost:1080 %h %p #http代理的写法