Compare commits

...
2 Commits
Author SHA1 Message Date
VallierDevandClaude Opus 5.5 b636f1b278 Release v0.2.38
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 20:22:03 +08:00
VallierDevandClaude Opus 5.5 64d2ffbdd3 ICE: trust the system certificate store for TURN over TLS
A TLS-inspecting HTTP proxy re-signs the TURN certificate with a CA that the
host's administrator installed in the system store; OpenSSL accepts it while
the bundled Mozilla roots alone fail with UnknownIssuer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 20:21:37 +08:00
6 changed files with 25 additions and 2 deletions

No files matched your search

Generated
+2 -1
View File
@@ -2741,7 +2741,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]] [[package]]
name = "uu-remote-linux" name = "uu-remote-linux"
version = "0.2.37" version = "0.2.38"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"base64 0.22.1", "base64 0.22.1",
@@ -3016,6 +3016,7 @@ dependencies = [
"crc", "crc",
"log", "log",
"rand 0.8.8", "rand 0.8.8",
"rustls-native-certs",
"serde", "serde",
"serde_json", "serde_json",
"stun", "stun",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "uu-remote-linux" name = "uu-remote-linux"
version = "0.2.37" version = "0.2.38"
edition = "2021" edition = "2021"
default-run = "uuremote-server" default-run = "uuremote-server"
authors = ["uu-remote-linux contributors"] authors = ["uu-remote-linux contributors"]
+13
View File
@@ -0,0 +1,13 @@
TURN over TLS 改为同时信任系统证书库。/ TURN over TLS now also trusts the system certificate store.
### 修复 / Fixed
- **TURN over TLS 报 UnknownIssuer**:v0.2.37 的 TCP/TLS 中继只信任内置的 Mozilla 根证书;在会检查 TLS 的 HTTP 代理后面,中继证书由主机管理员装在系统证书库里的 CA 重新签发,OpenSSL 能通过、我们却报 `UnknownIssuer`。现在同时信任系统证书库(与 OpenSSL 一致)和内置根证书。仅影响 `UU_USE_PROXY=1` 时的 TCP/TLS 中继。
TCP/TLS relays (only with `UU_USE_PROXY=1`) now trust the system certificate store as well as the bundled Mozilla roots, so CAs added for TLS-inspecting proxies are honoured.
### 验证范围 / Validation
单元测试与 CI;报告环境实机验证进行中。
### 下载 / Download
`uu-remote-linux_0.2.38_<amd64|arm64>.deb`,或 `uu-remote-linux-v0.2.38-<x86_64|aarch64>-linux.tar.gz`(解压后运行 `./install.sh`),或 `docker pull ghcr.io/vallierdev/uu-remote-linux:v0.2.38`(x86_64)。
**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.**
+3
View File
@@ -45,6 +45,9 @@ package = "webrtc-mdns"
[dependencies.rand] [dependencies.rand]
version = "0.8" version = "0.8"
[dependencies.rustls-native-certs]
version = "0.8"
[dependencies.serde] [dependencies.serde]
version = "1" version = "1"
features = ["derive"] features = ["derive"]
+3
View File
@@ -11,3 +11,6 @@ the TURN servers but whose TCP goes through an HTTP proxy.
application with `set_relay_transport`), adds TLS for `turns:`, and exposes the stream to the application with `set_relay_transport`), adds TLS for `turns:`, and exposes the stream to the
unchanged `turn` client as datagrams: one STUN message or ChannelData frame (with its 4-byte TCP unchanged `turn` client as datagrams: one STUN message or ChannelData frame (with its 4-byte TCP
padding) per read. `agent_gather.rs` uses it for `ProtoType::Tcp` URLs. UDP gathering is unchanged. padding) per read. `agent_gather.rs` uses it for `ProtoType::Tcp` URLs. UDP gathering is unchanged.
TLS trusts the system certificate store (`rustls-native-certs`, as OpenSSL does) plus the bundled
Mozilla roots. A name mismatch is accepted only when the TURN URL is an IP literal.
+3
View File
@@ -86,7 +86,10 @@ async fn tls_connect(tcp: TcpStream, host: &str)
-> Result<tokio_rustls::client::TlsStream<TcpStream>, String> { -> Result<tokio_rustls::client::TlsStream<TcpStream>, String> {
use tokio_rustls::rustls::{self, client::WebPkiServerVerifier, pki_types::ServerName}; use tokio_rustls::rustls::{self, client::WebPkiServerVerifier, pki_types::ServerName};
let provider = Arc::new(rustls::crypto::ring::default_provider()); let provider = Arc::new(rustls::crypto::ring::default_provider());
// System store first (it holds any CA the host's administrator added, e.g. for a TLS-inspecting
// proxy, as OpenSSL would use), then the bundled Mozilla roots.
let mut roots = rustls::RootCertStore::empty(); let mut roots = rustls::RootCertStore::empty();
roots.add_parsable_certificates(rustls_native_certs::load_native_certs().certs);
roots.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned()); roots.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
let inner = WebPkiServerVerifier::builder_with_provider(Arc::new(roots), provider.clone()).build() let inner = WebPkiServerVerifier::builder_with_provider(Arc::new(roots), provider.clone()).build()
.map_err(|e| format!("TURN TLS setup: {e}"))?; .map_err(|e| format!("TURN TLS setup: {e}"))?;