Description
What I propose is to add the possibility to connect to a remote SSH server through an SSH connection stream (instead of an HTTP or SOCKS proxy). See for instance
http://backdrift.org/transparent-proxy-with-ssh
for a use case.
This simulates a ProxyCommand where the command is run on a SSH host.
The patch also contains a test for the new functionality.
Example of use (with the netcat command nc -q 0 HOSTNAME PORT)
builder.setProxyType(opts, SftpFileSystemConfigBuilder.PROXY_STREAM);
builder.setProxyCommand(opts, SftpStreamProxy.NETCAT_COMMAND);
builder.setProxyHost(opts, "gate.way.host");
builder.setProxyPort(opts, 22);
builder.setProxyOptions(opts, proxyOptions);