From c4df2e6da2b7d777c66921ff5877d2a4c87fd247 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 4 Sep 2026 23:42:25 +0800 Subject: [PATCH] connection: bind the port-forward multiplex flag into the login scope digest The hbb_common bump brings `PortForward.multiplex`, and the exhaustive destructuring in login_scope_digest exists to force this decision on every new field. A multiplexed tunnel takes its targets per channel rather than from this login, so a retry that flips the flag asks for a different scope than the one that was approved. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns --- src/server/connection.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/connection.rs b/src/server/connection.rs index 4767e05fc..28c4a25fa 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -2576,11 +2576,13 @@ impl Connection { let PortForward { host, port, + multiplex, special_fields: _, } = pf; push(b"port_forward"); push(host.as_bytes()); push(&port.to_le_bytes()); + push(&[*multiplex as u8]); } // Variants this build does not know execute as remote, so they latch as remote. None | Some(_) => push(b"remote"),