Hi,
I have an application under development that uses SSHD TCP/IP Port
Forwarding for the client and server sides of a communication interface.
I have need of two features that I do not believe are possible
currently in the SSHD client:
1. At times, I would like to forward the same port on different local
addresses. The current TcpipForwardSupport class tracks the forwards by
port number, ignoring the local address, making this impossible. As of
my contribution in SSHD-192, I can replace TcpipForwardSupport with my
own factory-injected class. I plan to do this, but I thought I would
offer to add this functionality to the standard TcpipForwardSupport if
that is something that would be received favorably.
2. At other times in my application, I do not really care what local
port is used for forwarding. The InetSocketAddress class documentation
states that one can specify 0 as the port number to request this
functionality when binding. I am not sure if this will work through
SSHD/MINA. And if it does work, the trouble would be finding out what
local port was bound, since I would need to connect to it. Is there any
way to do this currently? What about if a new method were added to the
ClientSession interface, something like:
int startLocalPortForwarding(String localHostname, SshdSocketAddress
remote);
that would return the port number bound. Looking at the code, I guess
it might require a Future of some sort since the binding is likely not
done immediately, but that conveys the general idea.
As with my previous questions, I am happy to contribute in any way I can
to the development of these features. I would only request an
indication that these features would be acceptable, as well as some
guidance as to the preferred approach for achieving the requested
functionality.
Thanks,
Kevin
- SSHD: TCP/IP Port Forwarding Feature Request Kevin Winchester
-