rustdesk / rustdesk/rustdesk-server

Regular client works, web client doesn't - websocket connection to port 21118 is being reset

Open
#585 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
10.4k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

After putting my hbbs/hbbr IP and public key into the regular RustDesk client the connection works flawlessly, however after doing the same with a web client it immediately shows "Connection error: Failed to connect to rendezvous server, wss://192.168.1.3:21118"

Firefox developer tools show NS_ERROR_NET_RESET
Chrome/Edge developer tools show no useful information, not even request headers or error code
Wireshark shows that client (web browser) sends TLS 1.2 Client Hello (1867 bytes), the server (hbbs) first ACKnowledges these bytes, and then sends FIN+ACK (gracefully closing the connection) without sending any data back.

Opening https://192.168.1.3:21118/ in Firefox shows PR_END_OF_FILE_ERROR
Opening https://192.168.1.3:21118/ in Chrome shows ERR_CONNECTION_CLOSED

I have a simple Windows 10 installation of hbbs/hbbr v1.1.14 - extracted and installed as a service with nssm.
Doesn't matter whether hbbs is run as a service, or from cmd.
If run from cmd no errors are shown, and hbbs continues to run.
Doesn't matter whether I enter local or global IP into the web client. (all ports are forwarded properly)

This is how hbbs output looks when run from cmd:

`[2025-08-05 01:57:49.040003 +03:00] INFO [src\common.rs:121] Private key comes from id_ed25519

[2025-08-05 01:57:49.040042 +03:00] INFO [src\rendezvous_server.rs:1205] Key: REMOVED

[2025-08-05 01:57:49.042232 +03:00] INFO [src\peer.rs:84] DB_URL=C:\Users\i\AppData\Roaming\RustDesk\config\db_v2.sqlite3

[2025-08-05 01:57:49.048177 +03:00] INFO [src\rendezvous_server.rs:99] serial=0

[2025-08-05 01:57:49.048184 +03:00] INFO [src\common.rs:45] rendezvous-servers=[]

[2025-08-05 01:57:49.048186 +03:00] INFO [src\rendezvous_server.rs:101] Listening on tcp/udp :21116

[2025-08-05 01:57:49.048187 +03:00] INFO [src\rendezvous_server.rs:102] Listening on tcp :21115, extra port for NAT test

[2025-08-05 01:57:49.048188 +03:00] INFO [src\rendezvous_server.rs:103] Listening on websocket :21118

[2025-08-05 01:57:49.049533 +03:00] INFO [src\rendezvous_server.rs:138] mask: None

[2025-08-05 01:57:49.049535 +03:00] INFO [src\rendezvous_server.rs:139] local-ip: ""

[2025-08-05 01:57:49.049548 +03:00] INFO [src\common.rs:45] relay-servers=[]

[2025-08-05 01:57:49.049681 +03:00] INFO [src\rendezvous_server.rs:153] ALWAYS_USE_RELAY=N

[2025-08-05 01:57:49.049694 +03:00] INFO [src\rendezvous_server.rs:185] Start`

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.

Research direction

Start at the websocket listener in src/rendezvous_server.rs, then review the related connection handling in src/common.rs and src/peer.rs. Reproduce the web-client connection to port 21118 while inspecting the TLS and websocket handshake; done means the web client connects successfully without the server closing the connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.