From 4cfdd563f784bfa04dcc704cb40ae511201032c0 Mon Sep 17 00:00:00 2001 From: VallierDev <24893073+VallierDev@users.noreply.github.com> Date: Thu, 29 Oct 2026 11:46:02 +0800 Subject: [PATCH] Release v0.2.40 TURN TCP: report an inspecting proxy that answers with HTTP inside the relay stream. Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 2 +- Cargo.toml | 2 +- docs/release-notes/v0.2.40.md | 23 +++++++++++++++++++++++ src/session_ice.rs | 2 ++ vendor/webrtc-ice/src/agent/turn_tcp.rs | 11 +++++++++++ 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 docs/release-notes/v0.2.40.md diff --git a/Cargo.lock b/Cargo.lock index 6655c76..ea0310f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2772,7 +2772,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uu-remote-linux" -version = "0.2.39" +version = "0.2.40" dependencies = [ "ab_glyph", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 603d536..e951a6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uu-remote-linux" -version = "0.2.39" +version = "0.2.40" edition = "2021" default-run = "uuremote-server" authors = ["uu-remote-linux contributors"] diff --git a/docs/release-notes/v0.2.40.md b/docs/release-notes/v0.2.40.md new file mode 100644 index 0000000..cb93766 --- /dev/null +++ b/docs/release-notes/v0.2.40.md @@ -0,0 +1,23 @@ +GNOME 多显示器与精确触控、niri 适配、控制端控制中心与中英文界面,以及登录设备注册修复。/ GNOME multi-monitor and precise touch, niri support, a viewer control center with Chinese/English UI, and a login device-registration fix. + +### 新增 / Added +- **GNOME(Wayland / Portal)多显示器切换(#128,感谢 @spixyy7)**:逐块显示器公布并各自保存 Portal 授权,首次在主机上授权一次,之后静默恢复;最后一个控制端断开后立即停止屏幕共享。 + GNOME Portal: per-monitor sources with per-monitor saved grants (asked once, restored silently); screen sharing stops when the last viewer leaves. +- **niri 支持(#71,感谢 @WALKERKILLER)**:`UU_WAYLAND_MULTISCREEN=1` 下的显示器枚举与切换、旋转输出的正向采集与指针映射、手机端中文输入。其他合成器行为不变。 + niri: output enumeration/switching, upright capture and pointer mapping for rotated outputs, and mobile text input; other compositors unchanged. +- **原生控制端(#129,感谢 @spixyy7)**:按被控端原始分辨率解码、中英文界面(`UU_LANG` 或设置)、控制中心(`Ctrl+Alt+M`)、网络状态面板(`Ctrl+Alt+G`,显示实测 RTT)、连接加载画面。控制端登录不会开启本机被控服务(默认关闭)。 + Native viewer: native-resolution decode, Chinese/English UI, control center, network panel with measured RTT, connection screen. Viewer login does not enable the local host service (off by default). + +### 修复 / Fixed +- **GNOME 触控偏移(#128)**:绝对移动与点击改走当前 Portal 流,不再映射到整个多屏桌面。/ Absolute pointer goes through the current Portal stream. +- **账号下出现永远离线的“幽灵”设备(#127,感谢 @spixyy7)**:主机与控制端同时登录时,设备注册在配置文件锁下串行进行并复用已注册的设备。/ Device registration is serialized under a config lock. +- **控制端**:控制中心卡顿与随后的花屏、Wayland 下关闭文件传输窗口崩溃(#129)。/ Viewer menu stalls and resulting corruption; crash closing the file-transfer window on Wayland. +- **TURN over TCP/TLS 经检查型代理**:代理返回 HTTP 时给出明确错误(代理在检查 TLS 内容,TURN 无法通过),不再报含糊的解析错误。/ A clear error when an inspecting proxy answers with HTTP inside the relay stream. + +### 验证范围 / Validation +单元测试与 CI。GNOME 多显示器/触控由贡献者在 Fedora 44 / GNOME 50.6 双屏实机验证;niri 与控制端改动由各自贡献者实机验证(控制端 RTT 补丁实测仅覆盖 Android 控制端场景)。 + +### 下载 / Download +`uu-remote-linux_0.2.40_.deb`,或 `uu-remote-linux-v0.2.40--linux.tar.gz`(解压后运行 `./install.sh`),或 `docker pull ghcr.io/vallierdev/uu-remote-linux:v0.2.40`(x86_64)。 + +**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.** diff --git a/src/session_ice.rs b/src/session_ice.rs index 95ae14e..7cbec00 100644 --- a/src/session_ice.rs +++ b/src/session_ice.rs @@ -117,6 +117,8 @@ mod tests { assert_eq!(frame_len([0x40, 0x00, 0x00, 0x05]), Some(12)); assert_eq!(frame_len([0x40, 0x00, 0x00, 0x08]), Some(12)); assert_eq!(frame_len([0x80, 0x00, 0x00, 0x00]), None); + assert!(webrtc::ice::agent::turn_tcp::is_http_reply(*b"HTTP")); + assert!(!webrtc::ice::agent::turn_tcp::is_http_reply([0x40, 0x00, 0x00, 0x05])); } #[tokio::test] diff --git a/vendor/webrtc-ice/src/agent/turn_tcp.rs b/vendor/webrtc-ice/src/agent/turn_tcp.rs index 38e5697..109d1d8 100644 --- a/vendor/webrtc-ice/src/agent/turn_tcp.rs +++ b/vendor/webrtc-ice/src/agent/turn_tcp.rs @@ -150,6 +150,12 @@ pub fn frame_len(header: [u8; 4]) -> Option { } } +/// An HTTP reply inside the relay stream means a proxy is inspecting the (TLS) content; +/// "HT" would otherwise parse as a ChannelData header. +pub fn is_http_reply(header: [u8; 4]) -> bool { + &header == b"HTTP" +} + #[async_trait] impl Conn for FramedConn { async fn connect(&self, _: SocketAddr) -> util::Result<()> { @@ -162,6 +168,11 @@ impl Conn for FramedConn { let mut reader = self.reader.lock().await; let mut header = [0u8; 4]; reader.read_exact(&mut header).await?; + if is_http_reply(header) { + return Err(util::Error::Other( + "TURN TCP: got an HTTP response instead of TURN; a proxy is inspecting the TLS content, TURN cannot pass through it".into(), + )); + } let total = frame_len(header).ok_or_else(|| util::Error::Other("TURN TCP: unknown frame type".into()))?; let mut frame = vec![0u8; total]; frame[..4].copy_from_slice(&header);