fix(webapp): RDP web form ignores port in "host:port" (non-default RDP port fails)

Open Beginner friendly
#1,993 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start in web-client-rdp.component.ts at WebClientRdpComponent.fetchParameters and compare its hostname handling with the SSH, VNC, and ARD flows using extractHostnameAndPort. Trace the resulting parameters into web-client.service.ts and generateProtocolToken. Done means an RDP hostname such as 127.0.0.1:64389 preserves port 64389 while a hostname without a port still uses the default.

Written by the indexing model from the issue text.

Description

Summary
The standalone web-app RDP form cannot connect to an RDP server on a non-default port. Unlike SSH/VNC/ARD, the RDP flow never calls extractHostnameAndPort, so the port is dropped and the default 3389 is appended.

Steps to reproduce

  1. Open an RDP session in the standalone web client (Gateway 2026.3.0).
  2. Hostname: 127.0.0.1:64389 (RDP reachable on 64389).
  3. Connect.

Actual

  • Gateway rejects: "Destination in RDCleanPath PDU does not match destination in token" and "connect to RDP server: tcp://127.0.0.1:64389:3389 failed: failed to lookup destination address".
  • Entering just 127.0.0.1 (default 3389) works.

Expected
host:port should be honored, like SSH/VNC/ARD.

Root cause
web-client-rdp.component.ts > fetchParameters:
host: hostname, // should be extractHostnameAndPort(hostname, DefaultRdpPort).hostname + pass port
Other protocols:
const extractedData = this.utils.string.extractHostnameAndPort(hostname, DefaultSshPort);
web-client.service.ts > generateProtocolToken:
destination: tcp://${fmt(host)}:${cp.port ?? getDefaultPort(protocol)}
RDP never sets cp.port -> always falls back to 3389.

Fix
In WebClientRdpComponent.fetchParameters, parse with extractHostnameAndPort(hostname, DefaultRdpPort) and set port, mirroring SSH/VNC/ARD. Optionally add an explicit port field.

[!NOTE]
Human-tuned, LLM-assisted content.

Dominant language
Rust
Stars
161
Forks
28
Avg merge
3d 2h
Merged PRs (30d)
28

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Devolutions/devolutions-gateway

All issues in Devolutions/devolutions-gateway

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.