Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.3.0
-
None
-
None
Description
I don't see why we are creating an IoConnector per client driven port forwarding, or an IoAcceptor per session for a reverse forwarding.
Since these are just piping data between two async servers we should be able to just create one each per SshServer and run all forwardings through the same instances. This removes the complicated logic about disposing of an IoConnector or an IoAcceptor when a port redirection terminates. Instead we can terminate these when the SshServer is disposing of its own IoAcceptor.
For TcpipForwardSupport we have to be careful about adding the new bind address if the wildcard port is ever used by a client. We should use a "bind lock" to ensure at most one new address is bound at a time on the IoAcceptor so we can sanely discover it from the set returned by getLocalAddresses.
Attachments
Issue Links
- relates to
-
SSHD-121 Add Factories to create IoAcceptors for TcpipForwardSupport & X11ForwardSupport
- Resolved