SSH 代理通常需要使用 SOCKS5 端口,无法通过普通 HTTP 代理端口转发。
因个人在 Clash Verge Rev 中启用了混合端口(Mixed Port),这里在 ProxyCommand 使用的仍为 127.0.0.1:7890
,它同时支持 HTTP 和 SOCKS5 协议。相关介绍参考代理端口 - 虚空终端 Docs
Host github.com User git Hostname ssh.github.com Port 443 IdentityFile "~/.ssh/id_rsa" TCPKeepAlive yes ProxyCommand "D:\envir_vars\scoop\apps\git\current\mingw64\bin\connect.exe" -S 127.0.0.1:7890 %h %p
Host github.com User git Hostname ssh.github.com Port 443 IdentityFile "~/.ssh/id_rsa" TCPKeepAlive yes ProxyCommand nc -X 5 -x 127.0.0.1:7890 %h %p
Set Git Proxy