1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-04 13:02:47 -05:00

Add exec/subsystem versions of SSH proxying.

This is a simple tweak to the existing in-process SSH jump host
support, where instead of opening a direct-tcpip channel to the
destination host, we open a session channel and run a process in it to
make the connection to the destination.

So, where the existing jump host support replaced a local proxy
command along the lines of "plink %proxyhost -nc %host %port", this
one replaces "plink %proxyhost run-some-command".

Also added a corresponding option to use a subsystem to make the
connection. (Someone could configure an SSH server to support specific
subsystem names for particular destinations, or a general schema of
subsystem names that include the destination address in some standard
format.)

To avoid overflowing the already-full Proxy config panel with an extra
subtype selector, I've put these in as additional top-level proxy
types, so that instead of just PROXY_SSH we now have three
PROXY_SSH_foo.
This commit is contained in:
Simon Tatham
2022-04-22 14:12:15 +01:00
parent 2a26ebd0d5
commit 6f7c52dcce
4 changed files with 50 additions and 9 deletions

View File

@ -499,7 +499,9 @@ Socket *new_connection(SockAddr *addr, const char *hostname,
char *proxy_canonical_name;
Socket *sret;
if (type == PROXY_SSH &&
if ((type == PROXY_SSH_TCPIP ||
type == PROXY_SSH_EXEC ||
type == PROXY_SSH_SUBSYSTEM) &&
(sret = sshproxy_new_connection(addr, hostname, port, privport,
oobinline, nodelay, keepalive,
plug, conf, itr)) != NULL)