mirror of
https://github.com/m1ngsama/TNT.git
synced 2025-12-24 10:51:41 +00:00
TNT's Not Tunnel
Addresses the "Key exchange failed: Socket error: disconnected" errors that were causing service instability. Changes: - Add 10-second timeout for SSH network operations to prevent hung connections - Enable TCP keepalive with aggressive parameters (60s idle, 10s interval, 3 probes) - Disable SSH compression to reduce CPU overhead - Set log verbosity to NOLOG to eliminate excessive logging that was filling up systemd journal and potentially impacting performance - Remove error logging for failed key exchanges to reduce log spam (these are normal when clients disconnect during handshake) The timeout and keepalive settings ensure dead connections are detected and cleaned up quickly, while reduced logging minimizes I/O overhead during high connection churn scenarios. Tested: Server builds cleanly and starts successfully on macOS. TCP keepalive is Linux-specific and properly guarded with #ifdef. |
||
|---|---|---|
| .github/workflows | ||
| include | ||
| src | ||
| .gitignore | ||
| CHANGELOG.md | ||
| CICD.md | ||
| DEPLOYMENT.md | ||
| HACKING | ||
| install.sh | ||
| LICENSE | ||
| Makefile | ||
| QUICKREF | ||
| README | ||
| README.md | ||
| test_basic.sh | ||
| test_stress.sh | ||
| tnt.service | ||
TNT
Terminal chat server. Vim-style interface. SSH-based.
Install
curl -sSL https://raw.githubusercontent.com/m1ngsama/TNT/main/install.sh | sh
Or download from releases.
Run
tnt # port 2222
tnt -p 3333 # custom port
PORT=3333 tnt # env var
Connect: ssh -p 2222 localhost
Keys
INSERT (default)
ESC→ NORMALEnter→ sendBackspace→ delete
NORMAL
i→ INSERT:→ COMMANDj/k→ scrollg/G→ top/bottom?→ help
COMMAND
:list→ users:help→ commandsESC→ back
Build
make # normal
make debug # with symbols
make asan # sanitizer
make check # static analysis
Requires: libssh
Deploy
See DEPLOYMENT.md for systemd setup.
Files
messages.log chat history
host_key SSH key (auto-gen)
tnt.service systemd unit
Test
./test_basic.sh # functional
./test_stress.sh 50 # 50 clients
Docs
README- man page styleHACKING- dev guideDEPLOYMENT.md- productionCICD.md- automationQUICKREF- cheat sheet
License
MIT