Skip to content

支持房间内自定义成员发送、支持动图发送 - #131

Open
mihahu wants to merge 4 commits into
darrenprx:mainfrom
mihahu:codex/upstream-room-targeting-internet-animation
Open

mihahu wants to merge 4 commits into
darrenprx:mainfrom
mihahu:codex/upstream-room-targeting-internet-animation

Conversation

@mihahu

@mihahu mihahu commented Oct 27, 2026

Copy link
Copy Markdown

What and why / 改动内容与原因

Add recipient controls for room pings, emotes, text and alive messages:

为房间信号、表情、文字和存活提示增加接收对象控制:

  • Everyone / 所有人
  • Selected members / 指定成员
  • Only myself / 仅自己

Selected messages use pairwise encryption derived from fresh, signed room identities. Other room members cannot decrypt them. Votes, ballots and presence remain room-wide. Older clients continue to work in Everyone mode.

定向消息使用基于临时且已签名房间身份派生的双方独立密钥,房间内其他成员无法解密。投票、投票回应和成员状态仍发送给全房间。旧版客户端仍可在“所有人”模式下正常使用。

Add animated GIF and WebP synchronization over LAN and optional WebRTC data channels for internet-only peers. Internet animations are disabled by default and keep the existing 5 MiB and 1024 px limits. Static thumbnails remain the fallback while downloading, after a failure, or for older clients.

增加通过局域网同步 GIF 和动态 WebP 原图的功能。仅能通过互联网连接的成员可以选择使用 WebRTC 数据通道。互联网动图默认关闭,并保留现有的 5 MiB 和最长边 1024 像素限制。下载期间、连接失败或对方使用旧版客户端时,仍显示静态缩略图。

Users can configure STUN and TURN servers. TURN passwords use the operating system's secure storage and are not written to settings or signalling messages. The default STUN host is stun.l.google.com:19302; configured TURN hosts are also contacted when enabled. Direct WebRTC connections may reveal peer IP addresses.

用户可以配置 STUN 和 TURN 服务器。TURN 密码通过操作系统的安全存储保存,不会写入设置文件或房间协商消息。默认 STUN 主机为 stun.l.google.com:19302;启用后也会连接用户配置的 TURN 主机。WebRTC 直连可能让双方看到彼此的 IP 地址。

How I tested it / 测试方式

  • npm run typecheck
  • npm run test:helper
    • 692 helper tests passed / 692 项输入助手测试通过
    • 533 context helper tests passed / 533 项上下文助手测试通过
  • npm test
    • 2123 tests passed / 2123 项测试通过
    • 11 tests skipped / 11 项测试跳过
  • npm run build
  • npm run dev with an isolated test profile / 使用独立测试配置运行
  • Verified the English and Chinese room settings at widths of 980, 780 and 720 px
  • 检查中英文房间设置在 980、780 和 720 像素宽度下的布局
  • Verified TURN password save and clear without storing it in settings.json
  • 验证 TURN 密码保存和清除,确认密码不会写入 settings.json
  • Used real Chromium WebRTC to transfer and validate a 5 MiB animated GIF
  • 使用真实 Chromium WebRTC 传输并验证一个 5 MiB 动态 GIF
  • Verified that a selected recipient received the ping and animation while an unselected third member received neither
  • 验证指定成员能够收到信号和动图,未选择的第三位成员两者均无法收到
  • Verified animation playback, restart from the first frame and connection cleanup after disabling the feature
  • 验证动图播放、再次发送时从首帧开始,以及关闭功能后释放连接

Cross-network TURN connectivity and macOS/Linux runtime behavior still need field testing.

跨网络 TURN 连通性以及 macOS、Linux 上的实际运行情况仍需进一步测试。

Ran by hand on / 手动测试平台:

  • Windows 11
  • macOS (Apple Silicon)

Checklist / 检查清单

  • npm run typecheck, npm run test:helper and npm test pass
  • 类型检查、原生测试和完整测试通过
  • New logic has tests; bug fixes include regression coverage
  • 新增逻辑已有测试,错误修复包含回归测试
  • User-facing text is in both English and Chinese (src/shared/i18n.ts, both READMEs)
  • 用户可见文字均提供英文和简体中文版本
  • docs/design.md is updated
  • 已更新 docs/design.md
  • If I used an AI tool, it had AGENTS.md in context and I read the whole diff. Tool: Codex
  • 使用 Codex 时已提供 AGENTS.md,并检查了完整差异

基于上游v0.6.0保留个人改造,增加按成员加密发送和默认关闭的WebRTC动图连接。支持自定义STUN、TURN与系统加密保存凭据,保持5MiB上限及旧客户端静态回退。

验证:类型检查、2105项Vitest测试、1225项原生测试、生产构建和Windows开发模式通过。真实Chromium WebRTC完成5MiB GIF传输、三人接收隔离和首帧重播验证;跨网络TURN及macOS/Linux运行仍待实测。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant