Commit Graph

20 Commits

Author SHA1 Message Date
rustdesk 7c4456be9b proto: drop the reserved tag in PunchHole
`requester_id = 11` was added and removed in the same rebase batch, never
reached main, and never reached hbbs — whose vendored copy of this file still
stops at field 9. So nothing has ever written or read tag 11, and reserving it
guards a wire format that does not exist.

It was also inconsistent with what this branch already does: `IceCandidate`
retyped tag 2 from `string to_id` to `bytes socket_addr` in place, which is only
sound because none of this proto has shipped. Same premise, so tag 11 is free.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 13:21:01 +08:00
rustdesk 0a36139a58 fix(webrtc): reject malformed fragment framing, correct receive-path docs
`next()` read every non-FRAG_END header as "more fragments", so a peer whose
framing had diverged was only caught by the MAX_FRAME_LENGTH cap — and a
FRAG_MORE carrying no payload was never caught at all: it adds nothing to the
accumulator, so the cap never trips and the loop spins for as long as the peer
keeps writing, with no error and no teardown. Decide the header's meaning in one
match, so a future header kind cannot be handled in one place and missed in the
other. Neither case is reachable from send_bytes_inner, which emits FRAG_MORE
only for a full MAX_FRAGMENT_PAYLOAD chunk.

Release the accumulator on the error paths rather than truncating it: at the cap
that is ~1 GiB still referenced through the SESSIONS clone.

Doc corrections, all of them overclaims in the previous pass:

- the cancel-safety entry held only for the successful read path.
  read_data_channel does await after dequeuing on its ErrShortBuffer and DCEP
  branches, and next() awaits pc.close() on its error paths — where
  RTCPeerConnection::close latches is_closed before its first await, so a
  cancelled close silently turns every later close into a no-op and leaves the
  pc in SESSIONS.
- recv_state: cancellation drops the guard mid-message, so it is the
  single-reader assumption, not the mutex, that ultimately keeps two readers
  from splicing into one accumulator.
- is_relayed: stream.rs promised None before pair selection while webrtc.rs
  documented Some(true) under Relay policy; align both.
- get_local_endpoint: examples/webrtc.rs calls it too, not only the tests.
- PunchHole.reserved 11: named the wrong writer — PunchHole is written by the
  rendezvous server, not by peers. Reserve the name as well as the tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 13:21:01 +08:00
rustdesk 1998a198ec fix: route WebRTC ICE without requester id 2026-08-22 13:21:01 +08:00
rustdesk d4e727306f feat: add rendezvous WebRTC signaling fields 2026-08-22 13:21:01 +08:00
RustDesk 5438d20225 switch_code 2026-07-17 17:44:01 +08:00
21pages 91b13be6fd Add controlled context for controller audit attribution
Add ControlledContext to rendezvous messages so the server can pass a controller-user audit ref to the controlled client.

The controlled client returns the ref when posting audit logs, allowing the server to associate those logs with the controller user.

Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-06-26 14:16:56 +08:00
RustDesk c8cbb6be28 Update rendezvous.proto 2026-05-13 18:06:39 +08:00
fufesou a24767a0ad feat: option, privacy mode
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-04-21 21:14:36 +08:00
RustDesk 6fb03d076e http_proxy_request 2026-03-24 20:39:19 +08:00
21pages e163e2d829 add three state control permissions
Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-01-07 12:42:21 +08:00
21pages 510ebdca50 Revert "add ControlPermissions"
This reverts commit 178c97d59f.
2026-01-07 12:42:01 +08:00
21pages 178c97d59f add ControlPermissions
Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-01-05 22:13:56 +08:00
RustDesk 4637bf8fc1 Revert "Allow restricting remote control permissions for different users" 2026-01-05 22:06:13 +08:00
21pages 3a0034f104 controlling strategy
Signed-off-by: 21pages <sunboeasy@gmail.com>
2025-12-29 14:08:43 +08:00
RustDesk 117ea7c341 terminal 2025-06-29 14:08:03 +08:00
RustDesk df95f44499 more udp punch 2025-06-10 12:01:43 +08:00
RustDesk b69b097c6f kcp stream 2025-06-03 19:41:30 +08:00
RustDesk 0e279c1a8f Update rendezvous.proto 2025-05-23 21:55:40 +08:00
Adwin White f8fbf40f98 feat: add camera connection type 2025-02-19 12:11:52 +08:00
21pages 49c6b24a7a init
Signed-off-by: 21pages <sunboeasy@gmail.com>
2025-01-20 16:06:27 +08:00