π Using VLESS proxy with SSH
In this short note, we will explore the process of using a VLESS proxy with SSH. It can be useful for situations when destination host is blocked for some reason.
How to proxify SSH
Shortly, assuming a VLESS proxy is running at localhost:10808, thatβs what you need to put into ~/.ssh/config:
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_github.pub
ProxyCommand socat - PROXY:localhost:%h:%p,proxyport=10808
Some additional points to check:
- Ensure that
socatis installed. - Replace
Host,Hostname,Userwith the corresponding values, if needed. - If youβre using WSL, ensure that proxy is accessible from inside. Probably you would need to refer to it using host interface address instead of
localhost(seeip a). - To check your IP address and ensure that traffic goes through proxy, you can use
curl ifconfig.me/ip(which must respond with your direct IP address) andcurl -x "socks5://localhost:10808" ifconfig.me/ip(which must respond with proxified IP).