Files
DevFlow/crates/df-relay/README.md
T
lxy d9e0ce73d1 优化: 跨端链路协议对齐
- miniapp 配置域旧端点强制重置
- df-tunnel 隧道协议与 relay 现网对齐
- relay e2e 例程入 examples
2026-10-04 16:27:31 +08:00

27 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# df-relay — 已迁移(deprecated)
> **本 crate 已于 2026-08-23 提取为独立产品 [`u-relay`](../../../u-relay)**(`E:/wk-lab/u-relay`,git filter-repo 保留完整提交历史,脱敏改名 df_\*→u_\*)。
- **新功能一律在 u-relay 仓库开发**,本 crate 不再接受功能演进(防双份漂移)
- 本目录暂保留:现役生产部署(容器 :9180)仍从 devflow 侧构建,待 devflow 客户端(df-tunnel / df-miniapp ws.ts)迁移 u-relay 后整体下线(设计 Q7)
## ⚠️ 协议兼容性(2026-10-04 更正)
早期陈述「u-relay 协议为 df-relay 超集,hello/device_id 原样兼容,迁移只需切 host」**已过时**。
u-relay 在协议正名(agent/commander 第三代)时**已拆除全部兼容层**:
| 维度 | df-relay(本 crate) | u-relay(现行) |
|---|---|---|
| 端点 | `/ws/device`、`/ws/miniapp` | **`/ws/agent`、`/ws/commander`**(旧端点不存在) |
| Hello.kind | `"device"`、`"miniapp"` | **`"agent"`、`"commander"`**(旧 kind 握手期直接拒绝) |
| 配对键字段 | `device_id` | **`channel_id`**(不再 alias) |
| 错误码 | `invalid_device_id` | `invalid_channel_id` |
| token env | `DF_RELAY_TOKEN` | `U_RELAY_TOKEN` |
**迁移不是"切 host"而是协议升级**。devflow 侧客户端已于 2026-10-04 完成升级:
- `crates/df-tunnel`(Rust,桌面端 Agent)✅
- `apps/df-miniapp`(uni-app,Commander:config.ts / ws.ts / types/relay.ts / settings 页 + storage 旧字段迁移)✅
协议规格见 `docs/02-架构设计/专项设计/u-relay-wire-protocol-2026-10-04.md`。
设计文档:`C:/Users/23780/docs/u-box-design.md` §3.3 + `u-relay-extract-plan.md`