From 7bab2c3297378b448cdc7ce8d5d544042b8e5f1d Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 5 Sep 2026 22:55:44 +0800 Subject: [PATCH] bump webrtc fork: MTU-safe bundles, a reordering window, tail loss within the RTT rustdesk-org/webrtc cc6633bc, three commits on 825a0a48, all on the path that sends without a congestion window: Both bundlers counted a DATA chunk by its payload alone; with the header and padding counted, bundles of small chunks stay within the MTU, and the fragment payload rounds down to 1160 so a full chunk does too. A chunk is fast retransmitted at most five times, KCP's IKCP_FASTACK_LIMIT. A frame's chunks go out within microseconds of each other, so on a path that jitters the send-order rule resent every chunk that landed behind three of its siblings: 2.7x the payload on the wire at 10ms of jitter, and on a link without the room for that, a queue that fed on itself. A reordering window, RACK's, makes evidence count only from what was sent a quarter of an srtt after the chunk once the path is seen to reorder, widening on the duplicate TSNs the receiver reports. 5 Mbps, 1% loss, 20ms jitter: 600 of 600 frames at a 98ms mean where 290 arrived at 6.2s. A chunk lost at the tail of a burst has only T3-rtx, which ran from floors sized for a 200ms delayed ack and restarted only on the tail's predecessor's ack: 600ms and more. Every DATA chunk now carries the I bit, the floors are KCP's shape, and a fast retransmission restarts the timer. One 200-byte message per frame at 5% loss: 9 of 600 later than 200ms, from 42. Random loss without jitter is unchanged at every rate and frame size. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns --- Cargo.lock | 4 ++-- Cargo.toml | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8d99878a7..25966959a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9708,7 +9708,7 @@ dependencies = [ [[package]] name = "webrtc-sctp" version = "0.12.0" -source = "git+https://github.com/rustdesk-org/webrtc?rev=825a0a4862818f74406d8e1cc25be72259228235#825a0a4862818f74406d8e1cc25be72259228235" +source = "git+https://github.com/rustdesk-org/webrtc?rev=cc6633bc240936b4973a3a30b12dad02d9a57f3f#cc6633bc240936b4973a3a30b12dad02d9a57f3f" dependencies = [ "arc-swap", "async-trait", @@ -9748,7 +9748,7 @@ dependencies = [ [[package]] name = "webrtc-util" version = "0.11.0" -source = "git+https://github.com/rustdesk-org/webrtc?rev=825a0a4862818f74406d8e1cc25be72259228235#825a0a4862818f74406d8e1cc25be72259228235" +source = "git+https://github.com/rustdesk-org/webrtc?rev=cc6633bc240936b4973a3a30b12dad02d9a57f3f#cc6633bc240936b4973a3a30b12dad02d9a57f3f" dependencies = [ "async-trait", "bitflags 1.3.2", diff --git a/Cargo.toml b/Cargo.toml index 4fe1ab013..be691f305 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -222,9 +222,12 @@ libxdo-sys = { path = "libs/libxdo-sys-stub" } # and fast retransmit cannot cover a request/response exchange; INITIAL_MTU 1228 also fragments on # IPv6; and its AIMD pins a lossy long-haul link to MSS/(RTT*sqrt(p)), so a switch sends without # a congestion window, as KCP does - on by default, `allow-webrtc-congestion-control` opts back in. +# Sending that way, a reordering window keeps a chunk that is merely late from being resent on a +# path that jitters, every DATA chunk asks for its SACK at once so a lost tail is back within an +# RTT at KCP's RTO floors, and bundles of small chunks stay within the MTU. # Pinned by rev, not branch: a fork branch can be rewritten out from under the lockfile. -webrtc-util = { git = "https://github.com/rustdesk-org/webrtc", rev = "825a0a4862818f74406d8e1cc25be72259228235" } -webrtc-sctp = { git = "https://github.com/rustdesk-org/webrtc", rev = "825a0a4862818f74406d8e1cc25be72259228235" } +webrtc-util = { git = "https://github.com/rustdesk-org/webrtc", rev = "cc6633bc240936b4973a3a30b12dad02d9a57f3f" } +webrtc-sctp = { git = "https://github.com/rustdesk-org/webrtc", rev = "cc6633bc240936b4973a3a30b12dad02d9a57f3f" } [package.metadata.winres] LegalCopyright = "Copyright © 2026 Purslane Tech Pte. Ltd. All rights reserved."