21 lines
792 B
Markdown
21 lines
792 B
Markdown
# 2026-06-10 — RDP WebSocket 单循环中继(修复 Server timeout)
|
||
|
||
## 摘要
|
||
|
||
修复 Guacamole 客户端报 `Server timeout.`:双协程并发 `send/receive` 违反 Starlette WebSocket 约束,隧道 ping 无法回显;改为单循环中继,并按指令拆分转发。
|
||
|
||
## 动机
|
||
|
||
客户端 `receiveTimeout` 默认 15s,期间必须收到服务端数据(含 ping 回显)。并发 `ws_to_guacd` / `guacd_to_ws` 会导致 ping 丢失。
|
||
|
||
## 涉及文件
|
||
|
||
- `server/infrastructure/guacamole/ws_tunnel.py`
|
||
- `server/infrastructure/guacamole/protocol.py` — `iter_raw_instructions`
|
||
- `frontend/src/composables/rdp/useRdpSession.ts` — `receiveTimeout=90s`
|
||
- `tests/test_guacamole_protocol.py`
|
||
|
||
## 验证
|
||
|
||
生产:3389 连接不再 15s 超时;guacd 日志有 RDPDR 连接。
|