diff --git a/README.en.md b/README.en.md index 1fcb08d..c82ec0d 100644 --- a/README.en.md +++ b/README.en.md @@ -1,89 +1,73 @@ -# VIVANT · Anonymous terminal chat room +# VIVANT · Anonymous terminal chat [简体中文](README.md) | English [![CI](https://github.com/Freecode100Year/vivant/actions/workflows/ci.yml/badge.svg)](https://github.com/Freecode100Year/vivant/actions/workflows/ci.yml) -One SSH command and you're in the chat room. No sign-up, no password, no app. +Join an open chat room over SSH. No account, password, or app required. -``` +```sh ssh -p 2222 guest@term.freedom8964.com ``` +On your first connection, check that the SSH host fingerprint matches: + +```text +SHA256:wBGFVRp15FZKX625k5Bh2VjGXwOqCqtAydpP0+fPyQA +``` + +No terminal? Open [https://chat.nya.je/](https://chat.nya.je/) to join the same chat in your browser. + ``` VIVANT Alice · 在线 Online 3 · 运行 Up 4d 12h · 18:34 CST 房间 ROOMS ▸#general 3 #chinese 0 +2 #english 0 #technology 0 #anonymous 0 [18:32] 大家晚上好! [18:33] Hello from New York! -[18:33] 有人在学编程吗?@Alice [18:34] [私信 DM ← Ghost] hi ── #general · 3 人在线 here · 大厅 · Lobby · 什么都可以聊 ───────────────────────── > 说点什么… Type a message… /help 帮助 help -Enter 发送 send · ↑↓ 历史 history · PgUp/PgDn 滚动 scroll · Ctrl+C 退出 quit ● 已连接 CONNECTED ``` -Every prompt, the help and the key hints are shown in both Simplified Chinese and English. - -## How to connect - -**Web:** open [https://chat.nya.je/](https://chat.nya.je/) to join the chat in your browser. - -**Computer** (Windows, macOS and Linux all ship ssh): run the command above. On first connect SSH asks whether to trust the server; type `yes`. - -**iPhone / iPad**: +## Inside the chat -- **iSH Shell**: free on the App Store. Run `apk add openssh-client` once, then the command above. -- **Termius**: add a host with address `term.freedom8964.com`, port `2222`, username `guest`, password empty. +- Type to talk. Use `/rooms` to see channels and `/join english` to switch rooms. +- Send a private message with `/msg `, or change your nickname with `/nick `. +- Menus, prompts, and help are shown in both Simplified Chinese and English. Type `/help` for commands. +- Choose an eye-friendly green, black, or white terminal theme. If your terminal has display issues, use the `plain` username for text mode. +- Nobody is disconnected for staying quiet or for locking their phone. +- AI agents can connect through SSH in JSON mode; see [AI agents](docs/agents.en.md). -If your network only lets port 443 through, use `-p 443` instead of `-p 2222` (the operator has to enable it). Any username works and there is no password. If the screen is too narrow or shows garbage, use the username `plain` for line mode. More ways to connect (Tor, scripts, skipping the fingerprint prompt): [Connecting and using](docs/usage.en.md). To connect an AI agent: [AI agents](docs/agents.en.md). - -## Everyday commands - -Just type to talk. - -``` -/rooms list rooms -/join english join a room -/msg private message -/nick change your nickname -/who who is here -/help all every command -``` +On a computer (Windows, macOS and Linux include ssh), run the command above. For iPhone and iPad setup, Tor, and script usage, see [Connecting and using](docs/usage.en.md). If your network only allows TCP 443, you can use `-p 443` only when the operator has enabled the alternate port. ## Privacy -- No accounts; your SSH public key is never sent to the server; no IPs, nicknames or messages in the logs; messages live in memory only and expire. -- **The server can read the chat.** Don't post anything that identifies you. In the chat, `/privacy` shows what this server keeps and doesn't, and `/forget` erases your messages. -- To hide your IP from the server too: connect over Tor (if the operator enabled it). +- No account is needed, and the server does not receive ordinary users' SSH public keys. +- **The server can read chat messages. SSH is not end-to-end encryption.** Don't share information that identifies you. +- By default, room history stays in memory only, up to 500 messages per room for up to 24 hours; a server restart clears it. Operators can change these settings. Private messages are not stored. Use `/privacy` to see this server's settings and `/forget` to remove your messages from room history. +- The program does not log IP addresses, nicknames, or chat messages. Connecting over Tor hides your real IP from the server; connecting through an `.onion` address requires Tor to be enabled by the operator. -Details: [Security and anonymity](docs/security.en.md). +See [Security and anonymity](docs/security.en.md) for more about the limits and implementation. -## Run your own +## Host your own -On a Linux VPS: +Install on a Linux VPS with one command: -```bash +```sh curl -fsSL https://raw.githubusercontent.com/Freecode100Year/vivant/main/install.sh | sudo bash ``` -Manage it with `sudo vivant-ctl status | upgrade | uninstall`. If people can't connect, run `sudo vivant-ctl doctor`: it checks everything and tells you how to fix it. Remember to allow TCP 2222 in your cloud provider's firewall, and on Cloudflare set the DNS record to DNS only (grey cloud). Docker works too, see [Deployment and configuration](docs/deploy.en.md#docker-optional). - -**Server can't reach GitHub:** download the offline one-click installer from the release page and run `bash vivant--linux-offline.sh --to root@SERVER` on your computer, see [Offline install](docs/deploy.en.md#offline-install-server-cant-reach-github). For a temporary server on Windows / macOS (testing, LAN), the release page has those binaries too, see [Deployment and configuration](docs/deploy.en.md#windows--macos). - -**An Android phone as the server:** install `vivant-android-arm64.apk`, tap "Start", and people on the same Wi-Fi or the phone's hotspot can join; EasyTier or FRP lets people elsewhere in too, see [Android phone as a server](docs/android.en.md). - -**Upgrading from Private-Talk Terminal:** VIVANT used to be called Private-Talk Terminal (`ptterm`). Run the command above once on the old server and it migrates automatically, keeping the host key, configuration, bans and onion address. See [Deployment and configuration](docs/deploy.en.md#migrating-from-private-talk-terminal). +Manage it with `sudo vivant-ctl status | doctor | upgrade | uninstall`. If the server can't reach GitHub, use the offline installer from the releases page; Docker and temporary Windows / macOS servers are also available. See [Deployment and configuration](docs/deploy.en.md). -A 1-core, 1 GB VPS handles about 2000 people online at once. Installer options, admins and settings: [Deployment and configuration](docs/deploy.en.md). +**An Android phone as the server:** install the APK from the releases page and tap Start; people on the same Wi-Fi or hotspot can join. See [Android phone as a server](docs/android.en.md). ## Documentation -- [Android phone as a server](docs/android.en.md): installing the APK, hotspot / LAN connections, building it -- [Connecting and using](docs/usage.en.md): every platform, iPhone step by step, all commands, Tor -- [AI agents](docs/agents.en.md): `bot@` JSON mode, example program -- [Security and anonymity](docs/security.en.md): what the operator can see and what can't be promised -- [Deployment and configuration](docs/deploy.en.md): installer options, migration, admins, settings, Docker -- [Performance](docs/performance.en.md): load tests and design -- [Development](docs/development.en.md): build, test, release, code layout, roadmap +- [Connecting and using](docs/usage.en.md) +- [AI agents](docs/agents.en.md) +- [Security and anonymity](docs/security.en.md) +- [Deployment and configuration](docs/deploy.en.md) +- [Android phone as a server](docs/android.en.md) +- [Performance and capacity](docs/performance.en.md) +- [Development, build, and release](docs/development.en.md) -Written in Rust, one static binary, no database, MIT licensed. +VIVANT is written in Rust and released under the MIT license. diff --git a/README.md b/README.md index 00d7412..5ef2ad0 100644 --- a/README.md +++ b/README.md @@ -4,86 +4,70 @@ [![CI](https://github.com/Freecode100Year/vivant/actions/workflows/ci.yml/badge.svg)](https://github.com/Freecode100Year/vivant/actions/workflows/ci.yml) -一条 SSH 命令进入聊天室。不用注册、不用密码、不用装 App。 +用 SSH 进入一个开放的聊天室:不用注册、没有密码,也不需要安装 App。 -``` +```sh ssh -p 2222 guest@term.freedom8964.com ``` +第一次连接时,请核对 SSH 显示的主机指纹: + +```text +SHA256:wBGFVRp15FZKX625k5Bh2VjGXwOqCqtAydpP0+fPyQA +``` + +不想用终端?打开 [https://chat.nya.je/](https://chat.nya.je/) 在浏览器里进入同一个聊天室。 + ``` VIVANT Alice · 在线 Online 3 · 运行 Up 4d 12h · 18:34 CST 房间 ROOMS ▸#general 3 #chinese 0 +2 #english 0 #technology 0 #anonymous 0 [18:32] 大家晚上好! [18:33] Hello from New York! -[18:33] 有人在学编程吗?@Alice [18:34] [私信 DM ← Ghost] hi ── #general · 3 人在线 here · 大厅 · Lobby · 什么都可以聊 ───────────────────────── > 说点什么… Type a message… /help 帮助 help -Enter 发送 send · ↑↓ 历史 history · PgUp/PgDn 滚动 scroll · Ctrl+C 退出 quit ● 已连接 CONNECTED ``` -所有提示、帮助和按键说明都同时显示简体中文和英文。 +## 聊天室里有什么 -## 怎么连 +- 直接打字发言;用 `/rooms` 查看频道,`/join chinese` 切换频道。 +- 用 `/msg <昵称> <内容>` 私聊,或用 `/nick <名字>` 改昵称。 +- 所有菜单、提示和帮助都同时显示简体中文与英文;输入 `/help` 查看命令。 +- 终端界面支持护眼绿、黑、白主题;终端不兼容时,用户名换成 `plain` 可用纯文本模式。 +- 不发言挂机、手机锁屏都不会被踢下线。 +- AI 智能体可以通过 SSH 的 JSON 模式接入,见 [AI 智能体接入](docs/agents.md)。 -**网页入口**:打开 [https://chat.nya.je/](https://chat.nya.je/) 即可在浏览器中进入聊天室。 +电脑(Windows / macOS / Linux 自带 ssh)运行上面的命令即可。iPhone / iPad 的 iSH、Termius 等连接步骤,以及 Tor 和脚本用法,见[连接与使用](docs/usage.md)。如果你的网络只放行 TCP 443,只有在部署者开启备用端口后才能改用 `-p 443`。 -**电脑**(Windows / macOS / Linux 自带 ssh):运行上面那条命令。第一次连接会问是否信任服务器,输入 `yes`。 +## 隐私说明 -**iPhone / iPad**: +- 不需要账号;普通用户的 SSH 公钥不会发送给服务器。 +- **服务器能读取聊天内容。SSH 不是端到端加密。** 不要发送能识别你身份的信息。 +- 默认情况下,房间消息记录只在内存里保留(每个房间最多 500 条、最长 24 小时),服务器重启后清空;私聊不保存。部署者可以修改房间记录设置。输入 `/privacy` 查看当前服务器的数据设置,输入 `/forget` 删除自己发过的房间消息。 +- 程序日志不记录 IP、昵称或聊天内容。通过 Tor 连接可以隐藏真实 IP;使用 `.onion` 地址则需要部署者开启 Tor。 -- **iSH Shell**:App Store 免费下载,先运行 `apk add openssh-client`,再运行上面的命令。 -- **Termius**:新建主机,地址 `term.freedom8964.com`,端口 `2222`,用户名 `guest`,密码留空。 +更多边界与实现细节见[安全与匿名性](docs/security.md)。 -网络只放行 443 时,把 `-p 2222` 换成 `-p 443`(需部署者开启)。用户名随便填,没有密码。屏幕太窄或显示乱码时,把用户名换成 `plain`,进入纯文本模式。更多连接方式(Tor、脚本、免确认指纹)见[连接与使用](docs/usage.md);接入 AI 智能体见 [AI 智能体接入](docs/agents.md)。 +## 自建聊天室 -## 常用命令 - -直接打字就是发言。 - -``` -/rooms 有哪些房间 -/join chinese 进入房间 -/msg <昵称> <内容> 私聊 -/nick <名字> 改昵称 -/who 谁在这里 -/help all 全部命令 -``` +在 Linux VPS 上运行一条命令即可安装: -## 隐私 - -- 没有账号;你的 SSH 公钥不会发给服务器;日志里没有 IP、昵称和聊天内容;消息只在内存里,过期自动删除。 -- **服务器能看到聊天内容**,别发能认出你的信息。在聊天室里输入 `/privacy` 可以查看这台服务器存什么、不存什么,`/forget` 删除你发过的消息。 -- 想连 IP 也不让服务器看到:通过 Tor 连接(需要部署者开启)。 - -详细说明见[安全与匿名性](docs/security.md)。 - -## 部署自己的聊天室 - -在一台 Linux VPS 上运行: - -```bash +```sh curl -fsSL https://raw.githubusercontent.com/Freecode100Year/vivant/main/install.sh | sudo bash ``` -装好后用 `sudo vivant-ctl status | upgrade | uninstall` 管理;连不上时运行 `sudo vivant-ctl doctor`,它会逐项检查并告诉你怎么修。别忘了在云厂商的防火墙里放行 TCP 2222;域名在 Cloudflare 上要设为 DNS only(灰云)。也可以用 Docker 部署,见[部署与配置](docs/deploy.md#docker可选)。 - -**服务器连不上 GitHub:** 下载发布页里的离线一键安装包,在自己电脑上运行 `bash vivant-<版本>-linux-offline.sh --to root@服务器` 即可部署,见[离线安装](docs/deploy.md#离线安装服务器连不上-github)。想在 Windows / macOS 上临时跑一个(测试、局域网),发布页也有对应的程序,见[部署与配置](docs/deploy.md#windows--macos)。 - -**用安卓手机当服务器:** 装上 `vivant-android-arm64.apk`,点一下「启动」,同一 Wi-Fi 或手机热点下的人就能连进来;还能用 EasyTier 或 FRP 让外网的人进来,见[安卓手机当服务器](docs/android.md)。 - -**从 Private-Talk Terminal 升级:** VIVANT 以前叫 Private-Talk Terminal(`ptterm`)。在旧服务器上运行一次上面的命令即可自动迁移,主机密钥、配置、封禁、洋葱地址都会保留,详见[部署与配置](docs/deploy.md#从-private-talk-terminal-迁移)。 +装好后用 `sudo vivant-ctl status | doctor | upgrade | uninstall` 管理。服务器连不上 GitHub 时用发布页的离线安装包;也可以用 Docker,或在 Windows / macOS 上临时运行。见[部署与配置](docs/deploy.md)。 -单核 1GB 的 VPS 大约能承载 2000 人同时在线。安装参数、管理员、配置项见[部署与配置](docs/deploy.md)。 +**用安卓手机当服务器:** 装上发布页的 APK,点「启动」,同一 Wi-Fi 或热点下的人就能连进来,见[安卓手机当服务器](docs/android.md)。 ## 文档 -- [连接与使用](docs/usage.md):各平台连接方法、iPhone 详细步骤、全部命令、Tor -- [AI 智能体接入](docs/agents.md):`bot@` JSON 模式、示例程序 -- [安全与匿名性](docs/security.md):部署者能看到什么、不能保证什么 -- [安卓手机当服务器](docs/android.md):APK 安装、热点 / 局域网连接、自己构建 -- [部署与配置](docs/deploy.md):一键安装参数、迁移、管理员、配置项、Docker -- [性能](docs/performance.md):压测数据和设计 -- [开发](docs/development.md):构建、测试、发布、代码结构、路线图 +- [连接与使用](docs/usage.md) +- [AI 智能体接入](docs/agents.md) +- [安全与匿名性](docs/security.md) +- [部署与配置](docs/deploy.md) +- [安卓手机当服务器](docs/android.md) +- [性能与容量](docs/performance.md) +- [开发、构建与发布](docs/development.md) -Rust 编写,单个静态二进制,无数据库,MIT 许可。 +VIVANT 使用 Rust 编写,以 MIT 许可证发布。