<div dir="auto"><div>Hi,<div dir="auto"><br></div><div dir="auto">That is correct. Mosh does not support SOCKS UDP proxy. Mosh only uses ssh for the initial authentication, then switches to its own direct communication with the learned IP. If you need to access a server behind a firewall a VPN will work with mosh.</div><div dir="auto"><br></div><div dir="auto">Sincerely,</div><div dir="auto">-Alex </div><br><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Dec 29, 2025, 10:50 PM <<a href="mailto:acxx@tuta.io">acxx@tuta.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div dir="auto">Hi,<br></div><div dir="auto"><br></div><div dir="auto">I want to connect a ssh server(which installed mosh) by a socks5/udp server.<br></div><div dir="auto"><br></div><div dir="auto"><b>I use ssh to connect server is ok:</b><br></div><div dir="auto">ssh -o 'ProxyCommand nc -x <a href="http://127.0.0.1:1080" target="_blank" rel="noreferrer">127.0.0.1:1080</a> %h %p' root@server-ip<br></div><div dir="auto"><br></div><div dir="auto"><b>But mosh can not connect as 4 cmd:</b></div><div dir="auto">mosh --ssh="ssh -o ProxyCommand='nc -x <a href="http://127.0.0.1:1080" target="_blank" rel="noreferrer">127.0.0.1:1080</a> %h %p'" root@server-ip<br></div><div dir="auto">mosh --ssh="ssh -o ProxyCommand='nc -x <a href="http://127.0.0.1:1080" target="_blank" rel="noreferrer">127.0.0.1:1080</a> %h %p'" --experimental-remote-ip=proxy root@server-ip<br></div><div dir="auto">mosh --ssh="ssh -o ProxyCommand='nc -x <a href="http://127.0.0.1:1080" target="_blank" rel="noreferrer">127.0.0.1:1080</a> %h %p'" -p 60001 root@server-ip<br></div><div dir="auto">mosh --ssh="ssh -o ProxyCommand='nc -x <a href="http://127.0.0.1:1080" target="_blank" rel="noreferrer">127.0.0.1:1080</a> %h %p'" -p 60001 --experimental-remote-ip=proxy root@server-ip<br><b><br></b><b>I also make sure socks5 proxy support udp: test by socat and other tools.</b></div><div dir="auto"><b>I'm very sure proxy server support socks5/udp.</b></div><div dir="auto"><br></div> </div>
</blockquote></div></div></div>