From c1a587cfa487e04d16baa172d9b108691e7d2d39 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Sat, 5 Sep 2026 01:28:27 +0800 Subject: [PATCH] connection page: the Connect menu offers TCP tunneling, as the peer card does (#16075) The dropdown beside Connect listed file transfer, camera and terminal but not port forwarding, so reaching it meant having a card for the peer. `connect` already takes `isTcpTunneling`; only the menu entry and the parameter that carries it were missing. Shown on desktop only. The peer card gates the same entry on `isDesktop` because `connect` routes a tunnel through the desktop path alone; on web it would have opened a plain remote session instead. Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab Co-authored-by: Claude Opus 5 --- flutter/lib/desktop/pages/connection_page.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/flutter/lib/desktop/pages/connection_page.dart b/flutter/lib/desktop/pages/connection_page.dart index 7af8c9911..1d4928bbd 100644 --- a/flutter/lib/desktop/pages/connection_page.dart +++ b/flutter/lib/desktop/pages/connection_page.dart @@ -330,12 +330,14 @@ class _ConnectionPageState extends State void onConnect( {bool isFileTransfer = false, bool isViewCamera = false, - bool isTerminal = false}) { + bool isTerminal = false, + bool isTcpTunneling = false}) { var id = _idController.id; connect(context, id, isFileTransfer: isFileTransfer, isViewCamera: isViewCamera, - isTerminal: isTerminal); + isTerminal: isTerminal, + isTcpTunneling: isTcpTunneling); } /// UI for the remote ID TextField. @@ -568,6 +570,14 @@ class _ConnectionPageState extends State '${translate('Terminal')} (beta)', () => onConnect(isTerminal: true) ), + // `connect` routes this through the + // desktop path only; the peer card gates + // it the same way. + if (isDesktop) + ( + 'TCP tunneling', + () => onConnect(isTcpTunneling: true) + ), ] .map((e) => MenuEntryButton( childBuilder: (TextStyle? style) =>