Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-62

Reuse IoConnector and IoAcceptor for TCP/IP port redirections

    XMLWordPrintableJSON

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

          Activity

            People

              Unassigned Unassigned
              spearce@apache.org Shawn Pearce
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: