XMC: use packet-framed configuration stream by default#6487
Conversation
|
额 这和之前的模式区别是什么 |
之前的 raw 模式只在前面完成 MC 握手和加密协商,之后就直接传输上层字节流,不再按 MC 数据包格式封装。 |
|
后续可以再完整进入 Play 阶段:服务端下行的大流量使用合法的 Chunk Data 承载,客户端上行继续使用 Play custom_payload,心跳切换为 Play Keep Alive。由于 Registry 和 Chunk 格式与 MC 版本强相关,建议拆成后续独立 PR。 |
|
我觉得没必要,因为开启加密以后 中间人看不出来发的是不是真 mc 包。 |
AES/CFB8 开启后确实无法解析 Packet ID 和 Payload,这点认同。但 raw 模式会在 Encryption Response 后立即进入任意字节流,缺少正常 MC 会话中的 Login Success、Configuration、Play 等阶段。虽然状态本身不可见,这些阶段产生的方向、首包大小、间隔和后续流量分布仍然可以统计。 |
Refactor Varint readFrom and writeTo methods to use constants for segment and continue bits.
|
弄成默认的,别加 |
Summary
Make packet-framed XMC the default transport behavior. XMC now completes Login, remains in Configuration state, carries proxy bytes in
xmc:datacustom payload packets, and exchanges Minecraft Configuration Keep Alive packets.The user-facing
modesetting and the raw post-encryption path have been removed. This is wire-incompatible with the previous XMC behavior, so both endpoints must be updated together.This also fixes bounded packet parsing, partial CFB8 writes, n+EOF reads, offline UUIDv3 generation, random-source handling, and shared-secret validation.
This intentionally does not emit version-specific Play or Chunk Data packets.
Validation
go test -count=20 ./transport/internet/finalmask/xmcgo test ./transport/internet/finalmask/...go test ./infra/conf -run '^$'go vet ./transport/internet/finalmask/xmc ./transport/internet/finalmaskgo build ./main