Subject: Re: ssh connection going through socks5 proxy?

Re: ssh connection going through socks5 proxy?

From: Peter Stuge <peter_at_stuge.se>
Date: Fri, 23 Jul 2021 20:28:30 +0000

Edwin Yip wrote:
> Is there a way to connect to a remote ssh server through a socks5 proxy?

libssh2 doesn't directly support socks5, but you can use something
like socksify to wrap your program.

Changing this would at a minimum require adding callbacks to libssh2 for
the socket I/O in misc.c _libssh2_recv() and _libssh2_send() to allow
your application to implement the socks5 handling. This is certainly
doable but someone has to produce a patch.

If you're interested in giving that a go then take a look at how
other callbacks are implemented in libssh2 and propose something.

The actual socks protocol part must still be done by your program,
outside of libssh2.

//Peter
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2021-07-23