Skip to content

QUIC and KCP Reconnection Support #15

@kitknox

Description

@kitknox

I am the author of the terminal app Rootshell and just finished implementing initial support for connecting to tsshd-enabled-servers. As the app supports not just macOS but also iOS, iPadOS and visionOS there is an app lifecycle issue that has been challenging. On the client side the current architecture of localhost sockets is problematic as they do not survive background suspension states on iOS. In order to achieve recovery from background to foreground I had to migrate all of these to pipes within the process namespace. Otherwise the internal state of KCP and QUIC end of getting closed down and then there is no way to recover.

The larger challenge was how to achieve parity with our existing mosh compatible client which is able to fully restore from app restarts as we save all of the session credentials securely in the local device keychain and bootstrap on new app launches from that data. In order to connect to tsshd there is no reasonable way to serialize all of the state of either KCP or QUIC connections, and the existing tsshd daemon does not accept connections after the first session is established.

I am finishing up testing and will send over an initial PR which adds support for full reconnection and session resumption over both KCP and QUIC. With this change in place users of Rootshell can resume sessions after app and device restarts. Did you have plans already for how to handle this condition? Are there any security implications I might be missing that you were attempting to prevent by only allowing the initial connection?

Our initial support is available in the build that just went live if you want to check it out at beta.rootshell.com for macOS direct downloads and links to the TestFlight build for the other supported platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions