TNT's Not Tunnel
  • C 58.5%
  • Shell 23.2%
  • TypeScript 6.3%
  • Python 5.2%
  • Roff 4.7%
  • Other 2.1%
Find a file
小明 718b5a76c3
Some checks failed
CI / PR gate (macos-latest) (push) Has been cancelled
CI / PR gate (ubuntu-24.04) (push) Has been cancelled
CI / main smoke (push) Has been cancelled
CI / musl build (alpine) (push) Has been cancelled
feat(i18n): start each session in the language its SSH client sends (#121)
OpenSSH sends LANG and LC_* by default, so a session now follows LC_ALL,
LC_MESSAGES or LANG when it names English or Chinese, and the server's
language otherwise. The suites unset those variables so a developer's locale
no longer changes what they see.
2026-10-16 00:07:28 +08:00
.github feat: add a WebSocket gateway module with user posts and presence (#102) 2026-09-22 21:24:02 +08:00
demos Deepen TUI lifecycle and runtime readiness 2026-05-26 11:15:55 +08:00
gateway feat(gateway): report TNT identity events to m1ngsama ID 2026-10-15 17:23:34 +08:00
include feat(i18n): start each session in the language its SSH client sends (#121) 2026-10-16 00:07:28 +08:00
packaging feat(module): tell the identity module about sign-ins TNT makes itself (#118) 2026-10-15 17:23:29 +08:00
scripts chore: apply the repository conventions (#84) 2026-09-08 19:55:59 +08:00
src feat(i18n): start each session in the language its SSH client sends (#121) 2026-10-16 00:07:28 +08:00
tests feat(i18n): start each session in the language its SSH client sends (#121) 2026-10-16 00:07:28 +08:00
.gitignore feat: let m1ngsama ID members sign in with :login and reserve their handles (#108) 2026-10-14 17:06:09 +08:00
flake.lock build: add a Nix flake for tnt, tntctl and the gateway module 2026-09-29 09:20:14 +08:00
flake.nix build: add a Nix flake for tnt, tntctl and the gateway module 2026-09-29 09:20:14 +08:00
install.sh harden and streamline runtime (#67) 2026-08-18 19:30:09 +08:00
LICENSE Initial commit 2025-07-01 09:00:00 +08:00
MAINTAINERS feat: let m1ngsama ID members sign in with :login and reserve their handles (#108) 2026-10-14 17:06:09 +08:00
Makefile feat: add a WebSocket gateway module with user posts and presence (#102) 2026-09-22 21:24:02 +08:00
README.md restore repository entry points (#69) 2026-09-07 12:10:26 +08:00
SECURITY.md restore repository entry points (#69) 2026-09-07 12:10:26 +08:00
tnt-chat.7 feat(i18n): start each session in the language its SSH client sends (#121) 2026-10-16 00:07:28 +08:00
tnt-exec.7 feat(module): tell the identity module about sign-ins TNT makes itself (#118) 2026-10-15 17:23:29 +08:00
tnt-message-log.5 feat(module): tell the identity module about sign-ins TNT makes itself (#118) 2026-10-15 17:23:29 +08:00
tnt-module-protocol.7 feat(module): tell the identity module about sign-ins TNT makes itself (#118) 2026-10-15 17:23:29 +08:00
tnt.8 feat(i18n): start each session in the language its SSH client sends (#121) 2026-10-16 00:07:28 +08:00
tnt.service harden and streamline runtime (#67) 2026-08-18 19:30:09 +08:00
tntctl.1 feat(module): tell the identity module about sign-ins TNT makes itself (#118) 2026-10-15 17:23:29 +08:00

TNT

SSH-native terminal chat. One shared room, a Vim-style modal interface, and anonymous access by default. The server is a single C daemon that speaks SSH directly, so any ssh client is a full client.

Reference documentation ships as manual pages and is installed with the binaries:

Page Covers
tnt(8) server, options, environment, state directory
tntctl(1) control client
tnt-chat(7) interactive terminal interface and keybindings
tnt-exec(7) non-interactive exec commands
tnt-message-log(5) message log format and recovery
tnt-module-protocol(7) tnt.module.v1 module protocol

Install

Release installer, pinned to a tag (verifies checksums.txt before installing):

curl -sSL https://raw.githubusercontent.com/m1ngsama/TNT/vX.Y.Z/install.sh | VERSION=vX.Y.Z sh

Replace vX.Y.Z with a tag from Releases. Omit VERSION to track the latest release.

From source (needs a C compiler and the libssh development package):

git clone https://github.com/m1ngsama/TNT.git
cd TNT
make
sudo make install

Homebrew, Arch, and Debian packaging live under packaging/.

Run

tnt                          # listens on 2222
tnt -p 3333 -d /var/lib/tnt

tnt stays in the foreground and does not fork; tnt.service is the systemd unit (sudo make install-systemd).

Connect

ssh -p 2222 chat.example.com

Any username and any password are accepted, including an empty one. The room is anonymous and unrestricted by design.

Operate

tntctl -p 2222 localhost health
tntctl -p 2222 localhost stats
tntctl -p 2222 localhost tail 20

tntctl accepts only the commands defined by tnt-exec(7) and launches ssh without a shell. Every exec command also works over a plain ssh -p 2222 host <command>.

Modules

Modules are external processes that exchange JSON Lines with the server over stdio. They stay disabled unless TNT_MODULE_PATHS names their directories, and the core must keep working with all of them off. See tnt-module-protocol(7), validate a module with scripts/module_check.sh, and find community modules in m1ngsama/tnt-modules.

Develop

make            # build tnt and tntctl
make test       # unit, script, and integration suites
make check      # cppcheck and clang-tidy
make asan       # AddressSanitizer build

scripts/release_check.sh runs the release preflight. MAINTAINERS maps every path to an area; scripts/get_maintainer.sh <path> resolves one.

License

MIT. See LICENSE.