Skip to content

Instantly share code, notes, and snippets.

@ZanyXDev
Last active November 13, 2022 13:34
Show Gist options
  • Select an option

  • Save ZanyXDev/971797fcedbb717c48c9239ce3841b6f to your computer and use it in GitHub Desktop.

Select an option

Save ZanyXDev/971797fcedbb717c48c9239ce3841b6f to your computer and use it in GitHub Desktop.
Access github.com over ssh socks proxy

ssh over socks

Start socks proxy ssh -D 1080 -fN -C username@proxy_ip

add git global config

git config --global http.proxy 'socks5://127.0.0.1:1080'

works both http and https

add to ~/.ssh/config

    HostName github.com
    User zanyxdev
    ProxyCommand /usr/bin/nc -X 5 -x 127.0.0.1:1080 %h %p

or use

export GIT_SSH_COMMAND='ssh -o ProxyCommand="nc -X 5 -x 127.0.0.1:1080 %h %p"'

all done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment