====== RLogin Gateway ====== The Synchronet RLogin module (''[[dir:exec]]/rlogin.js'') is used to create an outbound proxy gateway connection between a Synchronet [[server:Terminal]] Server user and a remote server using the BSD Rlogin protocol ([[RFC>1282]]) over TCP (traditionally, TCP port 513). The BBS user can be connected to the host BBS using any supported terminal protocol (Telnet, RLogin, or SSH). RLogin is often used to connect BBS users to "door game servers" because of the protocol's ability to transparently pass the login-ID of the user as part of the initial connection establishment. If the door game server recognizes the user's credentials, it can automatically authenticate the user and in some cases immediately launch a specific door game of interest. ===== Protocol ===== Only the initial RLogin connection establishment is supported; the other RLogin protocol features ("cooked mode", out-of-band sequences, e.g. Window size) are not supported. ==== Binary Data ==== Unlike Telnet, there is no "binary mode" option that can be negotiated, so some characters (e.g keystrokes) sent from the remote user will always be interpreted on the host BBS and not sent to the remote server. This means that binary data transfers (e.g. file transfers) through an RLogin gateway may not always work as expected. ===== Telgate ===== The RLogin module is just a thin script that calls the Synchronet JavaScript ''bbs.rlogin_gate()'' method which in turn is just a thin wrapper function around the Synchronet C++ ''telnet_gate()'' function. Although this function was originally created for creating proxy gateways using the Telnet protocol, it was later enhanced to also support the RLogin protocol, but was not renamed. So the Synchronet internal Telnet Gateway (telgate) functionality is utilized to create RLogin gateway connections as well. ===== Menu ===== While the gateway is connected, the BBS user can use the ''Ctrl-]'' key sequence to display a host-BBS menu to perform specific functions, like: * Disconnect from the remote server * Toggle local echo off/on * List users on the host BBS * Send a private message to another user on the host BBS **Note**: If the ''TG_CTRLKEYS'' mode flag is specified on the ''rlogin.js'' command-line, then the host BBS's global control key commands (e.g. ^P, ^U, ^T, etc.) will also be captured and handled by the host BBS and not sent to the remote server. ===== Usage ===== The RLogin module is normally executed via a command-line configured in [[util:SCFG]], often as an "External Program". By convention, JavaScript modules are executed from the Synchronet Terminal Server by starting the command-line with a question mark (''?'') symbol. An asterisk (''*'') prefix will also work, but will fallback to execute the old ''[[dir:exec]]/rlogin.bin'' if the ''rlogin.js'' file is absent. ==== Command-line ==== The RLogin module accepts command-line arguments to control its behavior when invoked. The command-line syntax is: ?rlogin
[:port] [options] Where: * ''
'' is the IPv4 address or host name to connect to * ''[:port]'' is the optional TCP port number to connect to (default is ''513'') * ''[options]'' are one or more of the following options: ^ Option ^ Value ^ Description ^ | ''-c'' | client-name | Client-side username to include in the RLogin negotiation (default is current user's alias) | | ''-s'' | server-name | Server-side username to include in the RLogin negotiation (default is current user's real name) | | ''-t'' | terminal-type | Terminal type/speed (or "xtrn=doorcode" to auto-exec door on server) | | ''-T'' | connect-timeout-seconds | Connection timeout (default: 10 seconds) | | ''-m'' | telnet-gateway-mode| Set of one or more [[:module:telgate#mode|telgate mode flags]] (''TG_*'') separated by pipe (''|'') symbols (default is ''0'') | | ''-p'' | //none// | Send current user alias and password as server-name and client-name values, as expected by a Synchronet RLogin Server | | ''-q'' | //none// | Don't display banner or pause prompt (be quiet) | | ''-v'' | //none// | Display remote host name/address/port in messages | | ''-P'' | //none// | Don't pause for user key-press before connection attempt | | ''-C'' | //none// | Don't clear screen after successful session | Option values may immediately following the option flag or as be provided as the next argument on the command-line (separate by white-space). The legacy command-line syntax which did not use option flags to specify optional arguments is still supported, though deprecated. ===== Connection ===== The RLogin protocol allows the client to pass 3 strings to the server during connection establishment. These 3 strings defined by the protocol specification are, in order: - client-user-name - server-user-name - terminal-type By default, the Synchronet telnet gateway sends the following values for the RLogin connection strings: - User's alias - User's real name - Users' terminal type/speed (e.g. "ANSI/30000") If you wish to reverse the order of the first 2 strings sent, pass the ''TG_RLOGINSWAP'' mode flag on the ''rlogin.js'' command-line. ==== Auto-Login ==== For automated logins, [[server:Terminal#RLogin|Synchronet RLogin Server]] requires the //client-user-name// to be a valid user password, and the //server-user-name// to be a valid user ID (e.g. alias) which corresponds with the password. Other RLogin servers (e.g. door game servers) may have different requirements for automated logins (e.g. no password). ===== Configure ===== The default RLogin Gateway option values and display messages can be over-ridden by creating/editing key in the ''[rlogin]'' section of your ''[[dir:ctrl]]/[[config:modopts.ini]]'' file. If the ''[rlogin]'' section does not exist, the ''[telgate]'' section will be used (if it exists). ^ Key ^ Default ^ Description ^ | quiet | false | Don't display banner or pause prompt (quiet) | | pause | true | Pause for user key-press before connecting | | clear | true | Clear screen after disconnect | | timeout | 10 | Connect timeout (in seconds) | | verbosity | 0 | Display remote host address/port when non-zero | | help_msg | //see code// | Message to display for help ("" to disable) | | connecting_msg | //see code// | Message to display when connecting to remote host ("" to disable) | | failed_conntect_msg | //see code// | Message to display upon connection failure ("" to disable) | **Note**:\\ You'll likely want to use string literal syntax for message strings. ===== See Also ===== * [[:module:|Module Index]] * [[:module:Telgate|Telgate Module]] * [[:server:Terminal#rlogin|Terminal Server:Rlogin]]