Synchronet v3.18b-Win32 (install) has been released (Sept-2020).

Synchronet v3.19a, now under development, requires libarchive-dev to build successfully.

You can donate to the Synchronet project using PayPal.

Telnet Gateway

The Telnet Gateway (telgate.js) module allows users of your system's Terminal Server to connect to other TCP/Telnet services on the Internet through your BBS. Typically, these services would be other telnetable BBSes, door game servers, and MUDs, although really, you can theoretically create a gate to any single-port TCP service (e.g. POP3, but not FTP).

The module itself (exec/telgate.js) is just a thin wrapper around the JavaScript function: bbs.telnet_gate()


To use the module:

Execute telgate.js <address> [mode]

The brackets are not part of the syntax but only used to clarify which arguments are required (<>) and which are optional ([]).

When executed from a command-line with the Terminal Server (e.g. as a door), the ? or * prefix is required.

If no mode value is specified, the default mode is TG_PASSTHRU.


The <address> argument is the destination address in the format: <IP address or hostname>[:port]

If the TCP port number is not specified, the default is 23 (standard for telnet).

Examples <address> values:



The valid mode flags (defined in exec/load/sbbsdefs.js) are:

Flag Description
TG_ECHO Turn on telnet echo
TG_CRLF Expand sole CR to CRLF
TG_LINEMODE Send entire lines only
TG_NODESYNC Call Nodesync, get msgs, etc.
TG_CTRLKEYS Interpret control key (e.g. Ctrl-P, Ctrl-U, Ctrl-T, etc.) locally
TG_PASSTHRU Pass-through telnet commands/responses
TG_RLOGIN Use BSD RLogin protocol (not Telnet)
TG_NOCHKTIME Don't check time left online
TG_NOLF Do not send line-feeds
TG_RLOGINSWAP Swap the RLogin alias/real-names

Multiple mode flags may be specified by ORing them together with the pipe (|) character, like so:



Although telgate.js is the original and most flexible Synchronet Telnet gateway script, there are other bbs.telnet_gate() wrapper scripts available for your convenience:

Module Description
mudgate.js Sets the mode flags based on the needs of a typical MUD server
unixgate.js Sets the mode flags based on the needs of a typical Unix Telnet server
rlogin.js Actually a wrapper around the bbs.rlogin_gate JavaScript function


To set-up an external gateway to another BBS in SCFG->External Programs->Online Programs:

Command line: "?telgate"

To set-up an external gateway to a MUD:

Command line: "?mudgate"

To set-up an external gateway to a Trade Wars Game Server (TWGS):

Command line: "?rlogin"

While using the telnet gateway (and not currently in telnet “Binary” mode), users can press ctrl-] for a menu of telnet gate commands including: Disconnect, Toggle Echo, List Users, and Private Message.


The Baja TELNET_GATE function and the corresponding exec/*gate.bin files have been deprecated. Use the corresponding JavaScript alternatives instead.

See Also

In Other Languages
Translations of this page: