docs: use neutral host examples

This commit is contained in:
m1ngsama 2026-05-24 13:15:10 +08:00
parent bfaafb4b35
commit 1391ddca07
5 changed files with 17 additions and 15 deletions

View file

@ -47,7 +47,7 @@ PORT=3333 tnt # via env var
### Connecting
```sh
ssh -p 2222 chat.m1ng.space
ssh -p 2222 chat.example.com
```
**Anonymous access by default**: Users can connect with ANY username/password (or empty password). No SSH keys required. Perfect for public chat servers.
@ -127,7 +127,7 @@ TNT_BIND_ADDR=192.168.1.100 tnt
TNT_STATE_DIR=/var/lib/tnt tnt
# Show the public SSH endpoint in startup logs
TNT_PUBLIC_HOST=chat.m1ng.space tnt
TNT_PUBLIC_HOST=chat.example.com tnt
# Choose interactive UI language (en or zh; defaults from locale)
TNT_LANG=zh tnt
@ -173,12 +173,12 @@ tnt -p 2222
TNT also exposes a small non-interactive SSH surface for scripts:
```sh
ssh -p 2222 chat.m1ng.space health
ssh -p 2222 chat.m1ng.space stats --json
ssh -p 2222 chat.m1ng.space users
ssh -p 2222 chat.m1ng.space "tail -n 20"
ssh -p 2222 operator@chat.m1ng.space post "service notice"
ssh -p 2222 chat.m1ng.space post "/me deploys v2.0"
ssh -p 2222 chat.example.com health
ssh -p 2222 chat.example.com stats --json
ssh -p 2222 chat.example.com users
ssh -p 2222 chat.example.com "tail -n 20"
ssh -p 2222 operator@chat.example.com post "service notice"
ssh -p 2222 chat.example.com post "/me deploys v2.0"
```
**`post` identity**: the message is attributed to the SSH login name (the `user@` part of the URL, falling back to `anonymous`). In the default anonymous-access configuration there is no identity check, so any client can post as any name. Set `TNT_ACCESS_TOKEN` if you need authenticated posting.
@ -297,7 +297,7 @@ TNT_MAX_CONN_PER_IP=30
TNT_MAX_CONN_RATE_PER_IP=60
TNT_RATE_LIMIT=1
TNT_SSH_LOG_LEVEL=0
TNT_PUBLIC_HOST=chat.m1ng.space
TNT_PUBLIC_HOST=chat.example.com
EOF
```

View file

@ -47,7 +47,7 @@
**用户体验:**
```bash
# 用户连接(零配置)
ssh -p 2222 chat.m1ng.space
ssh -p 2222 chat.example.com
# 输入任意内容或直接按回车
# 开始聊天!
```
@ -143,7 +143,7 @@ ssh -p 2222 chat.m1ng.space
tnt
# 用户端(任何人)
ssh -p 2222 chat.m1ng.space
ssh -p 2222 chat.example.com
# 输入任何内容作为密码或直接回车
# 选择显示名称(可留空)
# 开始聊天!

View file

@ -19,6 +19,8 @@
`ssh_server.c` / inline-`strcmp` instructions.
- `exec_catalog` now owns SSH exec command matching as well as help metadata,
reducing duplicate command knowledge in `src/exec.c`.
- Replaced hard-coded `chat.m1ng.space` examples with `chat.example.com` so
public documentation does not imply a specific production host.
- Renamed the internal language state from help-oriented names to
UI-language names (`ui_lang_t`, `client->ui_lang`, and
`i18n_*_ui_lang`) so future i18n work has a correctly named seam.

View file

@ -54,7 +54,7 @@ TNT_MAX_CONN_PER_IP=30
TNT_MAX_CONN_RATE_PER_IP=60
TNT_RATE_LIMIT=1
TNT_SSH_LOG_LEVEL=0
TNT_PUBLIC_HOST=chat.m1ng.space
TNT_PUBLIC_HOST=chat.example.com
EOF
sudo systemctl restart tnt

View file

@ -25,7 +25,7 @@ tnt # 监听 2222 端口
用户只需要一个SSH客户端即可无需任何配置
```bash
ssh -p 2222 chat.m1ng.space
ssh -p 2222 chat.example.com
```
**重要提示**
@ -125,7 +125,7 @@ That's it! Your server is now running.
Users only need an SSH client, no configuration required:
```bash
ssh -p 2222 chat.m1ng.space
ssh -p 2222 chat.example.com
```
**Important**:
@ -216,7 +216,7 @@ TNT_ACCESS_TOKEN="your_secret_password" tnt
tnt
# 用户连接(从任何机器)
ssh -p 2222 chat.m1ng.space
ssh -p 2222 chat.example.com
# 输入任意密码或直接回车
# 输入显示名称或留空
# 开始聊天!