Skip to content

feat(rdp): connect to gateway-mode RDP routes via server connect_address (Phase C)#12

Merged
CallMeTechie merged 7 commits into
mainfrom
feat/rdp-gateway-connect
May 24, 2026
Merged

feat(rdp): connect to gateway-mode RDP routes via server connect_address (Phase C)#12
CallMeTechie merged 7 commits into
mainfrom
feat/rdp-gateway-connect

Conversation

@CallMeTechie
Copy link
Copy Markdown
Owner

Summary

Android-client half of RDP-over-gateway — completes the 3-repo feature (server v1.63.0 + Pro Windows client already shipped). Lets the Android client launch FreeRDP sessions to access_mode='gateway' routes (targets that are NOT WireGuard peers, reached through a Home Gateway via the public <server>:<listen_port> endpoint).

  • RdpRoute DTO gains connectAddress/connectPort (@SerializedName, nullable defaults — additive, backward-compatible with older servers).
  • RdpConnectionParams.fromRoute uses connectAddress ?: host / connectPort ?: port as the FreeRDP target.
  • VPN requirement is exempted for gateway routes via a pure, testable RdpManager.requiresVpn(accessMode) (case-insensitive; null/other → still requires VPN).
  • connect() locals (external-launch path, session monitor, error strings) now use the effective connect endpoint for consistency with the embedded path.

End-to-end (embedded/production path): server connect_address → DTO → fromRouteRdpBookmarkBuilder.hostname → FreeRDP connects to the public endpoint.

Test Plan

  • CI: ./gradlew build + unit tests pass (this is the compile gate — not built locally)
  • New unit tests: RdpConnectionParamsTest (gateway uses connectAddress; null fallback) + RdpManagerVpnGateTest (gateway exempt; internal/external/both/vpn/null require VPN; case-insensitive)
  • Manual: gateway RDP route, VPN OFF → Android connects to <server>:<listen_port>; credentials applied
  • Manual: internal route still requires VPN and connects to the peer IP as before

Known/non-blocking follow-ups: RdpHostCard still displays the LAN host for gateway routes (server doesn't set externalHostname for gateway) — cosmetic, pre-existing; consider showing connectAddress / a "via gateway" label. RdpManager.connect() full control flow remains unit-test-free (requiresVpn + fromRoute are covered).

@CallMeTechie CallMeTechie merged commit 808beaa into main May 24, 2026
3 checks passed
@CallMeTechie CallMeTechie deleted the feat/rdp-gateway-connect branch May 24, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant