RGTEL v2.00 - Linux build
=========================

The full manual for both versions is RGTEL.TXT; this file is a short
summary of what is different on Linux.

Files
  rgtel            the Linux x86-64 program
  RGTEL.INI        sample configuration - edit before the first run
  RGTEL.TXT        full manual (Windows and Linux)
  README-LINUX.TXT this file

Running
  ./rgtel              full-screen TUI (same layout/keys as Win32)
  ./rgtel --headless   plain log lines on stdout, no TUI
                       (automatic when stdout isn't a terminal, e.g.
                        systemd, nohup, or output redirected)

  Keys: ALT+X shutdown, R restart, Up/Down/PgUp/PgDn/Home/End scroll.
  Ctrl+C, SIGTERM and SIGHUP all do a safe shutdown.

Low ports
  Port 23 needs root, or grant the binary just that one capability:
    sudo setcap cap_net_bind_service=+ep ./rgtel
  (re-run after every update of the rgtel file)

Nodes
  Command= is run through /bin/sh -c in StartPath.
    *N = node number   *H = socket fd   *I = caller IP
  Environment: SOCKET=<fd>  NFNODE=<node>  REMOTEHOST=<ip>
  NodeStdio=1 puts the socket on stdin/stdout/stderr instead (inetd
  style) and *H / SOCKET become 0.
  Each node runs in its own process group; shutdown/restart sends the
  group SIGHUP (carrier drop), then SIGKILL after NodeKillMs.

Restart
  R, log roll and blacklist auto-restart re-exec rgtel in place: same
  terminal, same PID, same arguments.

File names
  CONNECT.ANS / ERROR.ANS / GOODBYE.ANS / RGTEL.INI are matched as given,
  then UPPER, then lower case.

Renegade (Linux RENEGADE or Win32 RG32.EXE) without NetFoss
  Renegade reads the caller's socket itself with -H<socket>:
    Linux:  Command = /home/bbs/renegade/RENEGADE -H*H -N*N -B115200 -Q
    Win32:  Command = C:\RG\RG32.EXE -H*H -N*N -B115200 -Q
    NodeTelnet = 1
  -B gives a connect speed (without it Renegade waits for a modem call),
  -Q exits after the caller logs off.  Renegade does no telnet negotiation
  of its own, so NodeTelnet=1 makes RGTEL send WILL ECHO, WILL SGA, DO SGA
  just before the handoff (char-at-a-time, server echo).  Leave it 0 for
  NetFoss or other drivers that negotiate themselves.

SSH (both builds)
  RGTEL can take SSH callers on a second port next to telnet:
    SSH        = 1       ; 0 = off (default)
    SshPort    = 22      ; Win32 default 22, Linux default 2222
    SshTimeout = 30      ; seconds a caller gets to finish the SSH login
    SshNodeRaw = 1       ; 1 = node does no telnet (Renegade -H): once it
                         ;     takes over, SSH data passes untouched
                         ; 0 = NetFoss / telnet-aware driver
                         ; (default: same as NodeTelnet)
  Needs OpenSSL 3's libcrypto:
    Win32:  libcrypto-3.dll next to RGTEL.EXE (32-bit, no other DLLs)
    Linux:  libcrypto.so.3 (package libssl3 / openssl - normally there)
  If it can't be loaded, RGTEL says so in the log and runs telnet only.

  Any user name and password are accepted (Renegade does the real login).
  SSH callers get the same temp-ban / blacklist / rate-limit / MaxSameIP
  checks on their real IP, then BotGate, CONNECT.ANS and a node exactly
  like telnet callers.  NetFoss and Renegade -H are given one end of a
  127.0.0.1 socket pair; RGTEL encrypts and pumps the other end, and
  answers the node's telnet negotiation for the caller (terminal type
  ANSI, window size from the SSH client).

  Host keys are made on the first run, next to the program:
    RGTEL_ED25519.KEY, RGTEL_RSA.KEY   (keep them - callers' clients
  remember them; new keys give "host key changed" warnings).  Their
  fingerprints are logged at start-up.

  Algorithms: curve25519 / ecdh-nistp256 / dh-group14 key exchange,
  ed25519 and RSA host keys, aes-ctr / aes-cbc, hmac-sha2(-etm) / hmac-sha1,
  strict KEX, rekeying.  Tested with OpenSSH; chosen to also suit PuTTY,
  SyncTERM and libssh2 clients such as NetRunner.
