net_telnet
does not actually implement the Telnet protocol completely correctly. It takes a shortcut of implementing it during negotiation, but after negotiation has completed, the Telnet protocol handling "disappears" and it's just straight-up TCP relaying at that point.
The main user-facing quirk of this is that window resizing during a session doesn't work with Telnet, but works with SSH (as the SSH library handles this out of band for us). RLogin also has the same problem I believe.
First and foremost, it would be good to have Telnet work properly at all points during a session, not just the beginning. However, this would likely result in needing another relay thread, with the current I/O architecture of the BBS, which is far from ideal. TELNETS session already involve 3 threads, one for TLS, one for the PTY, and one for the node, and this would now add a fourth thread (!!!) In theory, the PTY thread could probably do this work, but the PTY thread already does a bunch of stuff it probably shouldn't, and this would neither be semantic nor modular to embed Telnet-specific logic into the BBS core.
Other terminal support that has also been proposed, which could follow from this (but should only follow after the above work has been completed) is support for the following terminal types:
These would likely be in separate net_
modules, but the net_telnet
changes needed might drive some changes that could be helpful for those.
You must be