macOS 使用 shadowsocks 为 Github(Gitlab) 设置代理(HTTP/SSH)
macOS 使用 shadowsocks 为 Github(Gitlab) 设置代理(HTTP/SSH)
brew install socat
Host github.com
User root
IdentityFile ~/.ssh/id_rsa_gitlab
ProxyCommand socat - PROXY:127.0.0.1:%h:%p,proxyport=1087
对于Windows用户,要使用socks5代理却没有 nc 的,可以将
ProxyCommand nc -v -x 127.0.0.1:1080 %h %p
换成
ProxyCommand connect -S 127.0.0.1:1080 %h %p
SSH方式加了代理配置后gitlab验证失败, 关掉这个配置是可以正常使用gitlab,因为配置代理未生效,安装 socat brew install socat