Commit Graph
154 Commits
Author SHA1 Message Date
21pages dbef1531d3 Keep automatic peer keyboard mode selection on mobile 2026-11-25 17:29:16 +08:00
21pages 8a3106144b Inherit the default keyboard mode in peer configuration 2026-11-24 21:10:55 +08:00
fufesou 3ee3afd438 Serialize peer deletion with credential writes
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-26 15:22:00 +08:00
fufesou f15eb3d40d Merge branch 'main' into fix/trusted-device-v2 2026-10-25 18:07:47 +08:00
fufesou cef0aedf40 Keep trusted-device credentials in configuration sync snapshots
Refresh cached trust fields after successful credential writes and provide explicit persisted credential synchronization. Ordinary settings saves continue to preserve the destination credentials.

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-22 16:25:27 +08:00
rustdeskandClaude Opus 5.5 34846eef9f feat(websocket): add websocket-port for a proxy off the default port
check_ws turns a domain endpoint into ws(s)://<domain>/ws/id or
/ws/relay with no port, so a reverse proxy that cannot take 443 (or 80)
is unreachable, even when api-server already points at it, for example
https://example.com:8443.

websocket-port adds that port for the hosts this client is configured
with: custom-rendezvous-server and relay-server. A relay that hbbs hands
out on another host, or a peer's server, keeps the default port, since
another machine has its own proxy. IP endpoints are unchanged, and an
empty option gives the same URL as before.

https://github.com/rustdesk/rustdesk-server-pro/discussions/1029

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:05:24 +08:00
fufesou 41d50c4052 Remove unused trusted-device import stripping helper
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-21 23:07:40 +08:00
fufesou 77f924d7a3 fix: support atomic legacy trusted-device migration
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-20 23:24:04 +08:00
fufesou 040bf3f662 refactor: remove unused legacy trusted-device detector
The V2 management UI no longer displays legacy enrollment metadata. Remove the unused presence helper while preserving legacy records during ordinary saves.

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-20 16:11:45 +08:00
fufesou e2b17fd06c fix: recover config saves while preserving valid legacy trust
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-19 01:21:02 -07:00
fufesou 2289227c5f fix: preserve legacy trust data and validate V2 storage
Retain legacy trusted-device records for migration without using them for authentication. Preserve malformed V2 values for strict validation while allowing explicit revocation to replace them.

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-16 05:21:07 -07:00
fufesou dcc0381b7b fix: preserve trusted credentials when configuration reads fail
Stop ordinary Config2 and peer settings saves when the current file cannot be read. Keep first-save behavior for missing files and log failures without replacing V2 records with defaults.

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-14 02:21:27 -07:00
fufesou c11a5971a3 fix: minimize trusted-device configuration save changes
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-13 18:48:53 -07:00
fufesou 8791bf0d33 fix: simplify trusted-device configuration storage
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-13 18:18:38 -07:00
fufesou a2df328d0b fix: preserve trusted-device grants in Config2
Add fallible grant persistence with file locking and atomic replacement. Preserve the persisted grant state during ordinary settings writes so stale configuration snapshots cannot restore revoked devices.

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-12 21:59:19 -07:00
rustdeskandClaude Opus 5 e6fe9c3332 move the modules only rustdesk uses out to the base crate
hbb_common is shared with the server, but `fs`, `platform`, `keyboard`,
`message.proto` and most of `config::keys` are reached only from the client.
Keeping them here means every change to them costs a submodule round-trip.

They move to the new `base` crate in the rustdesk tree. What stays is
what the server actually names: `rendezvous.proto`, the socket/stream layer, the
`Config` core, and the 32 option keys this crate reads itself. Those 32 are
re-exported from `base::config::keys`, so callers still see one set.

`IdPk` moves from message.proto to rendezvous.proto. It is register-pk handshake
business, the server is its only other user, and the field numbers are unchanged
so the wire format is identical.

`config::patch()` resolves a home directory through the shell lookup that lived
in `platform::linux`, so `find_cmd_path`, `CMD_*` and `run_cmds_trim_newline`
stay behind in a new `sh` module. `base::platform::linux` re-exports
them, leaving every existing `platform::linux::CMD_SH` path working.

backtrace, filetime, osascript, smithay-client-toolkit and winapi go with the
code that used them, so the server no longer builds a Wayland client toolkit and
a Windows API crate it never calls.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
2026-09-08 08:53:58 +08:00
rustdeskandClaude Opus 5 846daf86f0 webrtc: send over SCTP without a congestion window, as KCP does
The data channel's SCTP association runs RFC 4960's AIMD: a fast retransmit
halves cwnd, a T3 drops it to one MTU, and on a path whose loss is random
rather than congestion that pins the rate to MSS/(RTT*sqrt(p)) - about
1.3 Mbps at 70ms RTT and 1% loss - however idle the link is. KCP has always
shipped its turbo profile (nc=1) with no congestion window, which is why the
same link streams over KCP and crawls over WebRTC.

The sctp fork now carries a process-wide switch that bypasses the two places
gating sends on cwnd. Turn it on unless `allow-webrtc-congestion-control` is
set: the same opt-in `allow-kcp-congestion-control` gives KCP, for the reason
at `get_kcp_cc_enabled`. It is re-read on every new peer connection, so a
changed option reaches the next session without a restart.

Sender-side only: nothing is negotiated, and a browser or an older build on
the other end interoperates.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns
2026-09-04 23:34:08 +08:00
rustdeskandClaude Opus 5 6f4eeaf516 config: name the KCP congestion-control option for what it does
`option2bool` reads an `enable-` option as on unless it is literally "N", while this one's
accessor required a literal "Y" - the name promised default-on and the code shipped
default-off. `allow-` is the prefix whose rule matches the behaviour that already ships, so
the rename settles the contradiction without moving a single user's transport.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UzcMTdYTEv2QbMHcTSUy3
2026-09-04 23:34:08 +08:00
rustdeskandClaude Opus 5 e813e58887 config: add OPTION_ENABLE_TCP_PUNCH
The client gains a switch for the TCP punch alongside the UDP, IPv6 and
WebRTC ones. Its "enable-" prefix gives it the usual default-on
semantics; unlike its siblings it is deliberately left out of the
self-hosted default-off list on the client side, since every hbbs has
always supported TCP punching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016HV43uh1ztv6Wm5qi3Y1ne
2026-09-04 23:34:08 +08:00
rustdeskandClaude Opus 5 2bd477b556 config: add OPTION_ENABLE_KCP_CC to config::keys
Options belong in this crate (AGENTS.md), and being here also lets a
branded installer pre-set it via KEYS_SETTINGS, which a bare const in
src/common.rs could not.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ExUfAkYbq8UC9pQCiLy8TQ
2026-09-04 23:33:56 +08:00
rustdeskandClaude Opus 5 603edc7581 config: OPTION_ENABLE_WEBRTC, defaulted like the punch options
Same pattern as enable-udp-punch / enable-ipv6-punch: empty value reads
as on against the public server and off against a private one (the
injection lives in rustdesk's get_local_option), so self-hosted
deployments opt in once their server / TURN is ready.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ExUfAkYbq8UC9pQCiLy8TQ
2026-09-04 23:33:56 +08:00
rustdeskandClaude Fable 5.1 750739f7f8 config: list five local settings that custom clients could not preset
Every key rustdesk reads through `LocalConfig` was checked against the
settings lists; these were in no list, so a custom client's
`default-settings` / `override-settings` could not set them:

- allow-sync-clipboard-between-sessions (rustdesk/rustdesk#15934): the
  constant lived in rustdesk's `src/clipboard.rs`; it is defined here
  now, with the other option keys.
- printer-incomming-job-action, allow-printer-auto-print,
  printer-selected-name: the incoming-print-job policy, read in
  `client/io_loop.rs`.
- enable-check-update: listed for completeness; `check_software_update`
  returns early for custom clients, so presetting it changes nothing
  there today.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
2026-09-04 16:00:32 +08:00
RustDesk 840c8ec1f7 Merge pull request #594 from rustdesk/port-forward-mux
Port forward mux
2026-09-04 15:37:34 +08:00
RustDeskandCopilot Autofix powered by AI 60c7fd80ea Update comment for connection punch-through options
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-04 15:37:18 +08:00
rustdeskandClaude Opus 5 1e617ddf4d config: enable-port-forward-mux local setting
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
2026-09-04 01:46:34 +08:00
rustdeskandClaude Opus 5 c2d8a6db2e add hide-general-settings builtin option
https://github.com/rustdesk/rustdesk-server-pro/issues/1001

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 10:35:05 +08:00
RustDesk b2b1ac453d Merge pull request #584 from fufesou/refact/remove-linux-headless
refact: remove linux headless
2026-08-14 21:18:07 +08:00
fufesou fe929d1139 refact: remove linux headless
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-08-13 22:14:08 +08:00
rustdeskandClaude Fable 5 d19ce39e51 add texture-render-health internal option key
Written by the texture-render watchdog / startup probe in the main repo;
a failed record forces texture rendering off until it is cleared (probe
pass or an explicit toggle of use-texture-render).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 09:53:50 +08:00
21pages 21fb4e30ae feat(config): add recording visibility and service save path options
- add hide-recording-button to local settings
  - add windows-service-video-save-directory to service settings

Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-07-23 21:43:19 +08:00
RustDesk 4bfd067765 typo 2026-07-14 14:51:51 +08:00
RustDesk ba990f5b52 Update config.rs 2026-07-14 14:44:44 +08:00
fufesou d27a338f27 feat(option): allow scope violation close/alarm
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-07-01 17:19:24 +08:00
fufesou 82ce6e7327 fix(crypt): avoid plain
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-31 13:20:48 +08:00
fufesou 14632284d7 fix(crypt): symmetric crypt compatibility
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-31 11:52:46 +08:00
RustDesk 4d8af61d5c Merge pull request #545 from fufesou/fix/symmetric-crypt-nonce
fix(security): add nonce to local symmetric encryption
2026-05-30 17:50:23 +08:00
fufesou 10b354456d fix(security): symmetric nonce, update unit tests
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-29 16:07:00 +08:00
fufesou f1b2da51b7 fix(pin): keep pin if unchanged
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-29 15:32:16 +08:00
fufesou e1bdb06565 fix(security): add nonce to local symmetric encryption
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-28 20:17:28 +08:00
RustDesk 2e9f641101 Merge pull request #544 from 21pages/allow-command-line-settings-when-settings-disabled
option allow-command-line-settings-when-settings-disabled
2026-05-28 17:22:28 +08:00
21pages 24f430b384 option allow-command-line-settings-when-settings-disabled
Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-05-28 11:44:41 +08:00
fufesou 728b73d540 refact(password): rename and comments 2026-05-23 15:13:16 +08:00
fufesou ce1f7b5f9a refact(password): clear password, do not clear salt
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-23 14:43:43 +08:00
fufesou 73ab2c37ae refact(password): do not auto migrate to version 01
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-22 21:32:33 +08:00
fufesou 2f032ad525 refact(password): early return error on invalid password
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-22 18:53:02 +08:00
fufesou 8e0c8ab939 refact(password): simplify
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-21 15:04:32 +08:00
fufesou 0c218232d1 refact(password): set cfg, do not early return if the password is invalid
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-20 17:27:27 +08:00
fufesou f94992f6ca refact(password): simplify preset password
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-20 16:57:16 +08:00
fufesou cfa877d28c trivial changes
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-20 11:08:43 +08:00
fufesou 3f30a92913 refact(password): encrypt
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-05-19 12:50:43 +08:00