Repository navigation
feat: 持有房间文件即可把房间搬到其他中继 - #5
Merged
Merged
Conversation
Room files gain a 更换中继 panel that re-emits the same room (master or wrapped key untouched, no password needed) with a new relay list and exact CSP connect-src. The hosted maker converts existing files, and the CLI gains a retarget command. All three paths produce byte-identical output that passes verify-room-file. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PCUwNSXQdqfDSugmFo4qmM
This was referenced Oct 29, 2026
Owner
Author
|
已随 #8 并入 main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
持有房间文件的人可以把同一个房间搬到其他中继(例如自建
wss://):房间密钥、口令和 roomId 都不变,生成时不需要口令。中继地址不参与 roomId 派生和口令包装的 AAD,所以只需替换
relays并重算 CSPconnect-src(仍是精确源,不放宽)。三种方式(输出逐字节相同,均通过
verify-room-file.mjs)currentScript/<style>字节,通过共用的html-room/template.js重新生成整份 HTML。node scripts/build-html-room.mjs retarget --in old.html --out new.html --relay wss://…实现说明
html-room/template.js,构建脚本和文件共用。<script/<style改写为\x3C(只出现在字符串字面量里)。测试
build:check通过。browser-tests/retarget.mjs:在中继 A 上建带口令的房间,转到中继 B,两名成员用原口令聊天,全程没有连过 A;同时验证网页转换器和 CLI。release-integrity.json。Generated by Claude Code