# Prerequisites: netcat-openbsd (BSD version of netcat)
$ ssh -fND 127.0.0.1:8081 user@<your-vps>
$ git config --global url."https://github".insteadOf git://github
$ git config --global http.proxy 'socks5://127.0.0.1:8081'
$ echo -e 'Host github.com\nProxyCommand nc -x 127.0.0.1:8081 %h %p' >> ~/.ssh/config
Alternative solutions:
- https://cms-sw.github.io/tutorial-proxy.html (more verbose tutorial)
- http://www.aireadfun.com/blog/2013/08/27/using-git-through-a-socks-proxy-or-ssh-tunnel/ (via socat and git-proxy wrapper)
- https://gist.github.com/goncha/4591538 (via netcat-openbsd and git-proxy wrapper)