Skip to content

Conversation

@markqvist
Copy link
Contributor

This PR implements ssh-style escape sessions for sending various control and session commands when inside a remote session. The escape sequence is identical to ssh. Pressing ~ immdiately after a newline, will bring the session into escape mode. Following up with ? will display the quick reference, and thus all available escape sequences:

Supported rnsh escape sequences:
  ~~  Send the escape character by typing it twice
  ~.  Terminate session and exit immediately
  ~L  Toggle line-interactive mode
  ~?  Display this quick reference

(Escape sequences are only recognized immediately after newline)

Of note here is that it is now possible to easily terminate an unresponsive session with ~..

Another very useful feature that this PR implements is a line-interactive mode, that can be toggled with ~L. In this mode, rnsh will buffer input until it can send a complete command (usually flushed by hitting enter, or a number of other "flush triggers"). The line-interactive mode tries to preserve console display, and features local echo when enabled. The logic behind this is still a bit rudimentary, but it works very well in most cases.

The line-interactive mode is very useful over extremely low-bandwidth links, where you don't want to ping-pong 4 packets back and forth every time a character is typed.

This PR, together with the adaptive compression PR, and the latest changes in RNS version 0.5.9, makes it practically feasible run fully interactive remote sessions on remote system with rnsh over even the most low-bandwidth links that Reticulum supports.

@markqvist
Copy link
Contributor Author

I updated pyproject.toml to also allow RNS versions larger than 0.5.9, since 0.6.0 is out soon as well.

@acehoss acehoss merged commit 754769b into acehoss:main Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants