I'm having an odd issue with rlogin.js.
Years ago I set up Synchronet (3.18) on Windows 7 as a game server, on my internal network. Since then I've only connected to it from a Mystic BBS and it's worked great.
Recently I've been working on Synchronet (last pull from git was just a couple days ago) running on Debian 11.9.
I'm able to make a rlogin connection fine via rlogin.js; however, I'm having an odd issue with CR/LF. Whenever I press the "Enter" key, extra characters are being sent making it impossible to use/play the remote door game.
LORD for example, behaves like below:
What would you like as an alias?
Name: Bob
Bob? [Y] : .
What would you like as an alias?
So when hitting enter, an extra "." is being sent.
My connection under Online Programs looks like this:
Name: LORD 4.06
Internal Code: NHLORD406
Start-up Directory:
Command Line: ?rlogin <internal IP> -c [v01d]@NODE_USER@ -t xtrn=lrd406 (everything else is default)
Anyone have any ideas what might be going on or what I should check?
Okay, so you're connecting from a Telnet client to a Synchronet v3.20 server and then gatewaying (via rlogin.js) to a Synchronet v.318 server? Just to clarify the configuration.
As for the "extra characters", most likely, it's a line-feed (ASCII 10) character. Telnet clients normally send CR/LF (0x0D, 0x0A) any time the ENTER key is pressed. You can use any network packet capture utility/program to confirm that. Those Telnet CRLF's normally should be translated by Synchronet to just a CR (carriage-return) sent to the rlogin gateway provided: The Telnet connection is not in "binary mode" (normally used for file transfers) and the TG_PASSTHRU telget gateway mode flags is not used.
What revision is the rlogin.js file you're using?
If you want confirm this translation of CRLF->CR is actually happening (on the server that's executing the rlogin.js), you can change this line in main.cpp: #if 0 /* Debug CR/LF problems */
to this:
#if 1 /* Debug CR/LF problems */
And then for any received CR/LF combination, you should see an info-level log message that says something to the effect of "CR/0A detected and ignored" in your server log output.
It's likely the Telnet client is not actually sending a '.' character, but rather that's just what LORD happens to echo-back to the user for unsupported/recognized input characters.
There have been big changes in the telnet/rlogin gateway recently (mainly for better support of Telnet servers that are the destination of the gateway), so it's possible there was a regression somewhere. So I'd like to help you get to the bottom of it.
Re: Strange rlogin.js behavior
By: Digital Man to Greyb34rd on Mon Sep 09 2024 07:06 pm
Okay, so you're connecting from a Telnet client to a Synchronet v3.20 server and then gatewaying (via rlogin.js) to a Synchronet v.318 server? Just to clarify the configuration.
Yes this is correct. And for further clarity, the behavior is the same with Telnet or SSH, and with SyncTerm, IcyTerm and Netrunner.
As for the "extra characters", most likely, it's a line-feed (ASCII 10) character. Telnet clients normally send CR/LF (0x0D, 0x0A) any time the ENTER key is pressed. You can use any network packet capture utility/program to confirm that. Those Telnet CRLF's normally should be translated by Synchronet to just a CR (carriage-return) sent to the rlogin gateway provided: The Telnet connection is not in "binary mode" (normally used for file transfers) and the TG_PASSTHRU telget gateway mode flags is not used.
What revision is the rlogin.js file you're using?
Apologies as my git skills are pretty low. But it's the same as the latest revision in the gitlab repo, with a SHA commit of: e5eca8bc43ad91d3a5ab0debee5515cf055efb1e if that helps at all.
If you want confirm this translation of CRLF->CR is actually happening (on the server that's executing the rlogin.js), you can change this line in main.cpp: #if 0 /* Debug CR/LF problems */
to this:
#if 1 /* Debug CR/LF problems */
And then for any received CR/LF combination, you should see an info-level log message that says something to the effect of "CR/0A detected and ignored" in your server log output.
I believe I've done this, and I ran cleanall.sh and recompiled (make install SYMLINK=1).
I then restarted sbbs but I'm not sure where I should be seeing
the info-level log message.
I looked under data/logs, as well as error.log, or should I be checking the node.log while I'm connected. (Sorry for being a pain.)