Files
nyaterm/docs-site/docs/guide/vnc.md
T
KangandClaude Opus 5 049a5a4329 docs: restructure the guide around the pages the features deserve
The page layout still reflected the Tauri-era docs, where RDP and VNC were a
table row and terminal.md absorbed whatever did not have a home.

Sidebar:
- Drop sidebar_position from all 46 pages. sidebars.ts enumerates every entry
  explicitly, so the values never affected ordering, and four of them collided
  (guide had two 2s, three 5s, two 6s, two 8s) while implying an order that did
  not match the real one.
- Reorder the guide by workflow: session types, per-protocol configuration,
  workspace, terminal, monitoring, files, commands, AI, network, auth,
  security, appearance, sync, shortcuts.

New pages:
- guide/rdp.md and guide/vnc.md. RDP and VNC are two of the six session types
  and had no page of their own. Both document the real config fields, the
  validation ranges, the certificate/security policies, and the error kinds,
  and both note the helper-process requirement.
- guide/remote-monitoring.md, extracted from terminal.md, covering all five
  panels.

Deduplication:
- terminal.md drops from 345 to 253 lines. Its AI, provider, translation, and
  risk-tier sections restated ai-assistant.md and translation.md; they are now
  the terminal-specific entry points plus a link. The risk tier table moves to
  ai-assistant.md, which owns the setting that gates it.
- session-types.md keeps the comparison table and links out for RDP/VNC detail
  instead of carrying a second copy of it.
- The migration format list appeared verbatim in four pages. ssh-connection.md
  is now the single source; installation.md, quick-start.md, and faq.md link to
  it.
- installation.md drops from 112 to 63 lines: its workspace tour, settings
  checklist, and "suggested first run" were quick-start.md again.

Verified with `pnpm --dir docs-site build` (both locales) and by resolving
every cross-page anchor against the generated heading ids, since
onBrokenAnchors is set to ignore.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 11:27:47 +08:00

3.5 KiB
Raw Blame History

VNC 远程桌面

VNC 会话连接提供 RFB 服务的虚拟机控制台、实验环境或轻量图形桌面。它和 RDP 共用远程桌面 pane,并共享已保存连接、最近使用、标签页和分屏。

VNC 的协议解码运行在独立的 helper 进程中。从源码运行时需要先构建 helper,否则连接会以 HelperMissing 失败,见 开发环境搭建。

连接配置

基本信息

字段 说明
主机 / 端口 RFB 服务地址,默认端口 5900
VNC 密码 classic VNC Authentication 使用的密码

安全模式

模式 行为
自动 按服务器声明的安全类型协商(默认)
无 不做认证
VNC 密码 classic VNC Authentication

classic VNC Authentication 只使用密码的前 8 字节。NyaTerm 会拒绝超过 8 字节的密码而不是静默截断,避免你以为设置了长密码。

显示

缩放 可选 适应(默认)、实际大小 或 拉伸。

剪贴板

剪贴板 默认开启,同步 Latin-1 文本。限制来自 RFB 协议本身:

  • 只支持 Latin-1 文本,非 Latin-1 字符会被拒绝
  • 单次不超过 1 MiB

这条限制是刻意保留的,避免把二进制或超大内容塞进 VNC 协议路径。

会话行为

  • 共享会话 — 允许其他查看器保持连接,而不是把它们踢掉
  • 仅查看 — 禁用键盘和指针输入

这两个开关在 helper 进程里强制执行,而不只是在界面上隐藏输入。

重连

重连 默认开启,对临时传输故障做有限次数重试,默认 5 次。连接超时为 15 秒,握手超时为 30 秒。

传输与编码支持

当前实现的边界:

  • 传输只支持 direct TCP,没有 TLS / VeNCrypt,也不支持代理或 SSH 隧道承载
  • 画面编码按 DesktopSizePseudo、ZRLE、Tight、Raw 的顺序声明;Tight JPEG 在 helper 里解码成统一的 RGBA framebuffer,Raw 保留为稳定 fallback
  • 不支持 CopyRect、cursor pseudo-encoding 和远程 resize

互通状态

场景 安全模式 编码 状态
Scripted RFB 3.8 fixture 无 ZRLE / Tight / Tight JPEG → RGBA 已通过自动测试
Scripted RFB 3.8 fixture VNC 密码 ZRLE / Tight / Tight JPEG → RGBA 已通过自动测试
TigerVNC 无 / VNC 密码 Raw / ZRLE / Tight / JPEG 真实服务器待测
TightVNC 无 / VNC 密码 Raw / Tight / JPEG 真实服务器待测
x11vnc / LibVNCServer 无 / VNC 密码 Raw / ZRLE / Tight / JPEG 真实服务器待测
QEMU / KVM VNC 无 / VNC 密码 Raw / ZRLE / Tight / JPEG 真实服务器待测

自动测试覆盖的是脚本化的 RFB 3.8 fixture。真实服务器的互通范围仍在验证中,遇到问题请附上服务器实现和版本反馈。

能力边界

和 RDP 一样,VNC 会话不提供终端命令历史、SFTP 文件浏览器、SSH 代理 / 跳板机或远程主机监控。

错误分类

类型 常见原因
Authentication 密码错误;选择 VNC 密码模式但未填写密码
Protocol 服务器 RFB 版本或安全类型不受支持
Encoding 收到无法解码的编码,例如未协商的 pseudo-encoding
Transport 端口不可达、连接被拒或链路中断
Clipboard 剪贴板内容超出 Latin-1 或 1 MiB 限制
HelperMissing helper 可执行文件不在应用旁边
HelperCrashed helper 进程在会话期间退出