Commit Graph

2 Commits

Author SHA1 Message Date
xuwenwei b9cb597b99 Add '强制不走中继连接' menu item + reconnect(false) actually clears force_relay
Two changes:

1. src/ui_session_interface.rs reconnect(false): Upstream only ever set
   force_relay=true and ignored force_relay=false. This was wrong — the
   user has no way to clear the flag. Now reconnect(false) sets
   force_relay=false AND resets direct_failures=0, so the next
   connect() gets a fresh punch with the full timeout.

2. flutter/lib/common/widgets/peer_card.dart: Add a new menu item
   '强制不走中继连接' in all 5 _buildMenuItems implementations (recent,
   favorite, ab, discovered, address-book). Click calls
   rustDeskWinManager.newRemoteDesktop(id, forceRelay: false) which
   triggers a fresh punch. If punch fails, RustDesk's existing
   connect() falls back to relay — so the user always ends up with a
   working connection (just with a chance of P2P that was retried).

Use case: User's home Mac and office Win on different physical
networks, hbbr at 5 Mbps. By default every connection is relay
(orange banner, no file transfer). Clicking '强制不走中继' forces
a fresh P2P attempt — usually fails, but gives the user the
transparency to know 'yes, it tried P2P first'.
2026-06-09 20:06:37 +08:00
xuwenwei d3b6026bfd Initial commit: RustDesk 1.4.7 macOS desktop port
- Filled empty libs/hbb_common/ submodule (cloned from rustdesk/hbb_common)
- Patched Flutter 3.44 / Dart 3.12 compatibility:
  * flutter/lib/generated_bridge.dart: asTypedList with cast<>, DartPort=Int64
  * flutter/lib/common.dart: DialogTheme->DialogThemeData, TabBarTheme->TabBarThemeData
  * flutter/pubspec.yaml: extended_text 14.0.0->15.0.2, google_fonts override 5.0.0
  * flutter/macos/Runner/Configs/Release.xcconfig: EXCLUDED_ARCHS=x86_64
- Build verified: cargo check + cargo build --features flutter + cargo build --release --features flutter
- Verified flutter build macos --debug and --release both produce working .app
- Verified .dmg installer (27MB arm64) created via hdiutil
- Build deps: Xcode 26.5, CocoaPods 1.16.2, Flutter 3.44, VCPKG arm64-osx
2026-06-08 21:43:20 +08:00