Compare commits

...
Author SHA1 Message Date
rustdesk 244a2dc3e6 1.5.4 2026-12-05 12:14:15 +08:00
21pages 2a0056a863 Fix remote ID text being selected when peer suggestions refresh on Flutter 3.44 desktop (#17419)
* fix(flutter): preserve the remote ID caret when peer suggestions refresh

* fix(ci): apply the remote ID selection fix on Flutter 3.44 desktop builds
2026-12-05 11:46:48 +08:00
2378844805 fix(linux): do not start --server while the system is entering sleep (#17373)
* fix(linux): avoid --server respawns on sleep and steady Wayland ticks

Stop Desktop::refresh from re-scanning /proc every 500 ms once an active Wayland user session environment is complete, preserve known non-empty session fields across late-discovery retries on the same session ID, and hold cached session state across brief (<3 s) empty seat0 windows such as VT switches.

Pause start_os_service across org.freedesktop.login1.Manager PrepareForSleep(true/false) while holding a logind delay sleep inhibitor fd, draining or terminating any in-flight --check-hwcodec-config child before releasing the inhibitor so GPU probing does not race kernel suspend entry.

Fixes #17208

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(linux): drop the mock logind test and recheck sleep after refresh

- Remove sleep_monitor_tests. It ran a private dbus-daemon with a mock
  login1 service, and SleepMonitor::with_connection and its dest field
  existed only to point the monitor at it. new() now talks to
  org.freedesktop.login1 directly.
- Keep three helper tests: the steady Wayland environment, the pause
  across sleep, and the --check-hwcodec-config process filter.
- Desktop::refresh() can take seconds. Poll the sleep monitor again
  after it, so a PrepareForSleep that arrived meanwhile stops this
  iteration before it starts --server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(linux): restore a cached XAUTHORITY only for the same DISPLAY

Late Wayland discovery restored each missing field on its own, so a retry
that picked another DISPLAY without an XAUTHORITY got the previous
display's XAUTHORITY. Restore it only when the DISPLAY is unchanged, as
get_display_xauth_xwayland takes a candidate whole. Also rustfmt the new
module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(linux): only hold back the --server start while logind prepares for sleep

Replace the sleep monitor, the delay inhibitor, the hwcodec drain and the
Wayland/seat0 debouncing with one check at the point where the service loop
is about to start --server: if logind reports PreparingForSleep, skip the
start and let the loop retry after wake. The respawn trigger in #17208 is
unknown, but the hazard is only the GPU encoder probe a new --server runs
during suspend entry, and logind holds PreparingForSleep from the sleep
request until the system has resumed.

The diff against master is now 37 added lines in linux.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(linux): recheck PreparingForSleep right before starting --server

should_start_server reads the property before force_stop_server() (a
kill plus 300 ms) and, on the DRM greeter path, before the 1 s grace
that precedes the root fallback. A sleep requested in that gap still got
a --server. Check again in start_server; the skipped start is retried on
the next tick as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 11:31:40 +08:00
7d95497268 fix(linux): restrict root terminals to the active root desktop (#17395)
* fix(linux): restrict root terminals to the active root desktop

A Linux terminal inherits the server's effective user. Bind a
service-started root server to its selected logind session and grant
a root terminal only while its local graphical desktop is active.
Mark greeter fallbacks explicitly and restart the server when root
switches sessions.

Check the caller's own session for standalone root servers. Localize
the denial and rate-limit logind lookup errors in the host log.

Reported-by: @helixnebulatech@protonmail.com
Signed-off-by: fufesou <linlong1266@gmail.com>

* refactor(linux): move terminal session checks into the platform layer

Keep logind session selection, property validation and X11 display matching
together in the Linux platform module. The connection layer issues its
private terminal token only when the platform check succeeds.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(linux): refresh the X11 environment when root logs back in

An empty seat clears the previous session ID while the service retains
the UID. Refresh the display and authority path when the next root
desktop appears so its server inherits the current X11 environment.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(linux): verify root X11 sessions with an empty logind display

GDM on Xorg can leave Display empty on an active graphical login. For
that case, use the kernel credentials of the local X11 socket to check
that its root-owned peer belongs to the selected, active logind session.

Cover the reported GDM session and refusal for a different socket session.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(linux): bind UID 0 desktop aliases and report terminal lookup errors

Use the active desktop UID for privileged server selection and session changes. An explicitly marked greeter cannot issue a root terminal token.

Return the existing localized token error when session verification fails and throttle the Linux denial warning. Each client still receives its own response.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(linux): preserve desktop context for root terminal sessions

Launch UID 0 aliases with their named desktop environment and pass the selected logind session. Restart on session changes even when the UID and display stay the same.

Recognize the explicit local Unix X11 transport. When loginctl exits unsuccessfully, ask logind whether the session has ended so ordinary logout and a system failure get the appropriate client errors.

Signed-off-by: fufesou <linlong1266@gmail.com>

* refactor(linux): simplify terminal session lookup failures

Deny the terminal using the original loginctl failure. A second logind query only distinguished an expired session for the client error message. The X11 peer lookup still verifies the active desktop when Display is empty.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(linux): require logind State=active for a root terminal

Active=yes only says the session holds its seat. When a session logs
out, logind sets it stopping (State=closing) but leaves it as the seat's
active session until another session takes the seat or the session is
finalized (systemd session_stop / session_get_state). A root server
still running in that window would grant a root terminal. Require
State=active, which also implies the session is the seat's active one,
in the loginctl check and for the X11 peer session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 11:22:15 +08:00
b9328be682 fix: improve close reason delivery during session shutdown (#17279)
* fix(webrtc): deliver the close reason before disconnecting

* fix(kcp): wait for the peer to close after sending a close reason

* fix: release session resources before waiting for peer close

* fix: wait for the peer to close after a login error or privacy-mode notice

A LoginResponse error is often the last message before the connection
closes (login scope change, switch-sides rejection, ID whitelist, privacy
mode on, offline). The PrvOnByOther notice is likewise sent right before
on_close. Over WebRTC or KCP, dropping the stream right after these sends
can discard them, so they now take the same bounded delivery wait as
CloseReason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* fix: wait only after sends that close, and keep the admission place

24fff979e set sent_close_reason in send_login_error, which also runs for
login errors that keep the connection open (2FA, click-to-accept, wrong
password), on paths that already sleep(1.), and even when the send failed.
Set it from send_before_close instead, on a successful send only, at the
sends that close right after: login scope change, switch-sides rejection,
ID whitelist, privacy mode on, offline, port-forward connect failure and
the PrvOnByOther notice.

Dropping Connection before the wait also released its UnauthorizedID, so
a peer that had not authorized could keep its transport open for up to 1s
outside MAX_UNAUTHORIZED_CONNS. Keep the guard until the wait ends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* fix: wait after the remaining login errors that close the connection

The trusted-device failures (begin, check, enroll), the ID whitelist
rate-limit exit and the Windows terminal OS-login rate-limit block also
close right after sending a login error, so over WebRTC or KCP the error
could still be lost and the controller would reconnect into the limit.

The two rate-limit messages are sent inside check_failure, whose password
and 2FA callers keep the connection open, so the flag is set at the two
callers that close instead.

Rename sent_close_reason to sent_final_message, since it now covers login
errors and the privacy-mode notice as well as CloseReason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* fix: give up the admission place when evicted during the close wait

A connection waiting for the peer to close still holds its unauthorized
place, and admit_unauthorized refuses new arrivals until an evicted holder
is gone. Race the wait against eviction so the place frees at once.

Also correct the wait's comment for KCP, use Stream::is_webrtc, and give
the WebRTC test the setup timeout hbb_common's loopback tests use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* fix: wait for the controlled side to close after a manual disconnect over WebRTC

Data::Close sent CloseReason and dropped the stream at once. Over WebRTC
that can discard the queued reason, so the controlled side logs "Reset by
the peer", skips check_remove_session and keeps the session reusable
without a password for SESSION_TIMEOUT. Wait up to one second for the
controlled side to close, as the controlled side now does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* docs: correct why the KCP close wait runs the full second

The controller does send a close on KCP, but it stops its endpoint before
dropping the stream, so the close never leaves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* fix(tcp): wait for the controller to close after a manual disconnect

* log(client): log receipt of the first video frame and close reason

* fix(websocket): wait for the peer after a manual disconnect

* fix: allow ten seconds for TCP and WebSocket manual disconnects

* test(tcp): check close reason delivery during an active upload

* fix(client): release the file clipboard channel before the WebRTC close wait

Reconnect starts the next round without waiting for the old one, and the
next round takes this peer's file clipboard channel from
get_rx_cliprdr_client, which returns the existing one. With the close
wait added for WebRTC in e401af41a, the old round could still be waiting
when the new round set up its clipboard; its cleanup then removed the
shared channel, and file copy and paste stopped working in the
reconnected session. Remove the channel before the wait, so the next
round registers its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(client): save transfer jobs before the WebRTC close wait

Reconnect starts the next round without waiting for this one, and the next
round loads the saved transfer jobs as soon as it logs in. This round saved
them only after its close wait, which can last up to a second, so a fast
reconnect could load stale jobs and not resume an interrupted transfer.
Save them before the wait. The wait discards what arrives, so the jobs do
not change during it, and the save after the round finds nothing new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* log(client): escape the received close reason

The reason is text from the peer. Debug formatting keeps a reason with
line breaks on one log line; the dialog still shows it as sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(client): save transfer jobs once on the WebRTC close path

39dc8f884 saves the jobs before the close wait, but the save after
io_loop still ran once the wait ended. If a newer round saved in between,
that second save wrote this round's jobs back over it, so a transfer the
new round had finished could show up again as unfinished. The wait
discards what arrives, so the second save never had anything new: clear
is_connected after the first one, which makes the exit save a no-op on
this path. Other exit paths save as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkjq1rgjsKR9Xi6WprJ

---------

Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 11:03:46 +08:00
bovirus 57d312404e Update it.rs (#17416) 2026-12-05 00:11:10 +08:00
Yuri PezzottaandClaude Opus 5.5 5499dafec8 chore(wayland): remove unused imports (#17417)
Drop `tokio` from the hbb_common import in scrap's pipewire.rs and
`allow_err` from src/server/wayland.rs; neither is used in those files.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 00:10:52 +08:00
RustDeskandClaude Opus 5.5 0f65927e91 fix(mobile): move the key bar out of the canvas gesture region (#17379)
* fix(mobile): keep gestures on the key bar from clicking the remote

The key bar sits inside the remote canvas's gesture region, so any tap,
double tap or long press its buttons do not take went to the canvas
recognizers: a tap between keys clicked the remote, two quick taps on a
key double-clicked it, and a long press right-clicked it, with any
latched modifier added. Wrap the bar in an opaque GestureDetector that
claims those gestures; its recognizers join the arena before the
canvas's, so they win.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(mobile): move the key bar out of the canvas gesture region

The GestureDetector wrapper won the arena but the canvas recognizers still
saw every touch on the bar: onLongPressDown sends a left-button down to a
mobile peer before the arena decides, so a long press on the bar lost its
button-up, and the canvas double-tap recognizer kept delaying and dropping
quick key taps.

Drop the wrapper and stack the bar above the canvas instead of inside it,
so a touch on the bar never reaches the canvas recognizers. The remote
cursor and the virtual mouse move up with it and stay above the bar, as
they were inside the canvas stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(mobile): keep the mouse-mode virtual mouse inside the canvas gesture region

Holding a virtual left/right button while another finger drags relies on
the canvas recognizer seeing both pointers: it then takes the
isSpecialHoldDragActive branch of onTwoFingerScaleUpdate. With the virtual
mouse moved above the key bar and out of the region, the recognizer saw
only the dragging finger, routed it through onOneFingerPanUpdate, and any
movement of the holding finger set blockEvents and froze the drag while the
remote button stayed down. Put FloatingMouseWidgets back where master has
it; the cursor and the touch-mode virtual mouse stay above the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 20:11:07 +08:00
RustDeskandClaude Opus 5.5 ecf60f961e fix(windows): ship app icons with a frame for every shell size (#17412)
The Flutter runner's app_icon.ico had a single 48 px frame, so Explorer,
shortcuts and the taskbar scaled it up at larger icon views and display
scales. Regenerate it from res/icon.png, which the old frame was made
from, with 16, 20, 24, 32, 40, 48, 64, 96, 128 and 256 px frames.

res/icon.ico (the downloadable portable exe, the MSI and the Sciter
build) stopped at 128 px. Add a 256 px frame and keep its other frames
byte for byte.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 17:30:46 +08:00
RustDeskandClaude Opus 5.5 ae717917e2 fix(appimage): verify bundled apt packages and keep the CWD off search paths (#17404)
* fix(appimage): verify bundled apt packages and keep the CWD off XDG dirs

The AppImage recipes fetched the Ubuntu packages they bundle (libc6, GTK,
GStreamer, ...) over HTTP with allow_unauthenticated, and the aarch64 key
came from the keyserver over HTTP. Use the HTTPS archive, drop
allow_unauthenticated, and trust Ubuntu's 2012 and 2018 archive signing
keys, both of which sign focal, from a key file in the repository.

XDG_DATA_DIRS and XDG_CONFIG_DIRS end with the host value, which AppRun
expands to nothing when the host leaves it unset; the empty element makes
GLib search the current directory, so launching the AppImage from a
directory someone else can write let it supply gtk-3.0/settings.ini and
similar files. Put a "/" before the host value: unset it leaves the root,
set its first absolute path becomes the same "//path".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(appimage): keep the CWD off LD_LIBRARY_PATH when the host has none

AppRun sets LD_LIBRARY_PATH to "$APPDIR_LIBRARY_PATH:" followed by the
host's value, so a host without LD_LIBRARY_PATH (the usual case) gets an
empty last element, which the dynamic loader searches as the current
directory. RustDesk looked up libpulsecommon and libGLX there, and the
loginctl it runs looked up libsystemd-shared there on every call, so a
library planted in the directory the AppImage is started from would be
loaded. Patch AppRun to drop empty elements after building the value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 12:00:47 +08:00
Xzar 26f17dff05 fix(mobile): keep file manager bottom sheet above system navigation bar (#17393) 2026-12-04 11:36:13 +08:00
RustDeskandClaude Opus 5.5 b67c5279f9 fix(linux): wake the tray event loop at its WaitUntil deadline (#17403)
Bump rustdesk-org/tao to 74684bd8, a cherry-pick of tauri-apps/tao#1458.
On Linux, tao's run_return blocked in gtk::main_iteration_do(true) for
ControlFlow::WaitUntil with no GLib source for the deadline, so an idle
loop slept until some unrelated event arrived. The tray polls menu events
under a 100 ms WaitUntil, so a menu click could wait many seconds (#17124).
The patch only touches src/platform_impl/linux/event_loop.rs.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 11:22:19 +08:00
HelixNebula f50d282872 ci: install hash-pinned dependencies in the signing steps (#17390)
The two 'Sign rustdesk files' steps ran 'pip3 install requests argparse'
unpinned, in the same step that passes SIGN_SECRET_KEY to res/job.py.
argparse is part of the standard library; the PyPI package is an old,
unneeded backport. Install requests and its dependencies from a
hash-locked requirements file instead, as res/update already does for
the update-metadata signing step. The versions support Python 3.9+.
2026-12-04 11:00:23 +08:00
HelixNebula 711d026151 ci: do not persist checkout credentials (#17391)
actions/checkout stores the job's GITHUB_TOKEN in .git/config unless
persist-credentials is false. No job except update-webpki-roots (which
pushes a branch and is left unchanged) uses git with that token after
checkout, so set persist-credentials: false on the other checkouts. This
keeps the token out of the workspace that build scripts, vcpkg ports,
cargo build scripts and run-on-arch containers can read.
2026-12-04 10:57:30 +08:00
RustDeskandClaude Opus 5.5 40e3672a9d fix(macos): stop ScreenCaptureKit audio capture when the stream is dropped (#17378)
Bump cpal to rustdesk-org/cpal@3361bd6 (rustdesk-org/cpal#8). The
ScreenCaptureKit backend released its native stream on drop without
calling stopCapture; it now stops a playing stream asynchronously and
keeps the native objects alive until the stop completes.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:09:37 +08:00
RustDeskandClaude Opus 5.5 9cbafa5f0e fix: keep the Telegram bot token out of logs and off TLS fallback (#17375)
* fix: redact Telegram tokens and zeroize session passwords

* fix: keep the Telegram bot token out of logs and off TLS fallback

The Telegram bot API carries the bot token in the URL path. Telegram
requests went through post_request, which logs the failed reqwest error,
URL included, at warn level before retrying and then returns it, and the
2FA path logs it again. Whenever api.telegram.org was unreachable, each
2FA login wrote the token to the log file. On a TLS error post_request
also retried with invalid certificates accepted, so whoever presented a
certificate on the path received the token and the 2FA code.

Send Telegram requests once with verified rustls, without fallback, and
drop the URL from their errors. Other post_request callers are unchanged.

Revert the Zeroizing session password: the plaintext password is also
held by the Dart UI, the login dialog path and argv, so wiping the
preset copy changed nothing observable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:53:17 +08:00
fufesou 8522f17a7a Update rustls to 0.23.46 (#17371)
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-12-03 15:57:46 +08:00
fufesou f705ebeb8d Fix/privacy mode display crash recovery (#17333)
* fix(windows): recover privacy mode displays after a forced exit

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): retain pending privacy display recovery across restarts

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): preserve pending privacy recovery during cleanup and activation

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): clear obsolete privacy display recovery records

Recheck active Amyuni displays during the existing monitor timeout before retiring a missing target. Keep the record for ambiguous selections and unplug errors so a stale record does not block the next privacy session after the monitor is gone.

Read the saved Windows display name through its first terminator. Cover stale and temporary absences separately from a failed driver request.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): retire missing privacy displays with other monitors active

Check for the saved Amyuni display before treating multiple active displays as ambiguous. Two unrelated displays can then remain connected while an obsolete recovery record expires. Cover that case in the existing recovery selection test.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): recheck pending display recovery before activation

A Mode 2 request can skip monitor preparation when the owner or selected implementation changes. Check the saved recovery record under the activation lock before enumerating displays so the new session cannot replace the pending record.

Exercise activation without preparation in the isolated Windows recovery test.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): attempt privacy display recovery once at startup

Select a sole matching Amyuni display from the first scan and verify removal after the driver request. Consume the record after checking the registry even on unplug failure, so preparation, activation and idle shutdown can use their normal paths.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(windows): limit privacy display recovery to server startup

Read the saved Amyuni display only in the startup unplug branch. Keep the existing registry parser and unconditional record reset, including when display recovery fails. Cover the display-only record and legacy parsing without a callback or child process.

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-12-03 13:27:42 +08:00
RustDeskandClaude Opus 5.5 805b5a5a23 fix(flutter): leave no orphan "waiting for image" dialog on reconnect (#17357)
OverlayDialogManager.show() keeps one dialog per tag. Showing a second
dialog under a tag that is already open replaces the map entry but
leaves the first overlay inserted, so neither dismissByTag() nor
dismissAll() can remove it.

The waiting-for-image dialog can be shown twice before the first frame.
On a reconnect to a Windows host with several Windows sessions, the
client already has the session selected, so handle_peer_info() reports
the wait and the automatic send_selected_session_id() reports it again.
The first overlay then stays on top of the remote view after video
starts, and after Cancel it stays over the peer list, blocking taps.

Dismiss any waiting dialog of the session before showing a new one.

Fixes #17233


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 22:30:53 +08:00
aseeb shibin 21c7bb71ce fix(clipboard): avoid triggering lazy macOS file URL providers (#17328)
Signed-off-by: aseeb shibin <aseebshibin4@gmail.com>
2026-12-02 22:22:04 +08:00
RustDeskandClaude Opus 5.5 8dd5ab4378 fix(appimage): look up host libraries in /usr/lib on aarch64 (#17358)
* fix(appimage): look up host libraries in /usr/lib on aarch64

The AppImage puts host library and GStreamer plugin paths before its own
so that Wayland capture uses the host's GStreamer and PipeWire. Those
paths were /lib64 and the Debian multiarch dir only. Arch Linux ARM has
neither on aarch64 (its filesystem package adds lib64 only on x86_64),
so the AppImage ran on its bundled focal stack: GStreamer 1.16 with
libpipewire 0.2, which crashes against PipeWire 1.x when the capture
pipeline is created. x86_64 Arch is not affected because /lib64 points
to /usr/lib there.

Add /usr/lib after the multiarch dir in APPDIR_LIBRARY_PATH, and the
matching /usr/lib/gstreamer-1.0 and /usr/lib/gio/modules entries.

Fixes #17301

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

* fix(appimage): drop the no-op GIO_MODULE_DIR entry

GLib reads GIO_MODULE_DIR as a single directory, not a search path, so
a /usr/lib/gio/modules entry in it changes nothing. Keep the change to
the library and GStreamer plugin paths, and put the comment above the
library path it explains.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 22:11:54 +08:00
8c6f1e2a1a fix(linux): keep the window background transparent with Flutter >= 3.27 (#17347)
* fix(linux): keep the window background transparent with Flutter >= 3.27

Since Flutter 3.27, FlView fills itself with an opaque black background
unless fl_view_set_background_color() is called (flutter/engine#54575, the
fix for flutter/flutter#152154). Newer versions also draw without a
GtkGLArea, so find_gl_area() returns nothing and the window border and
rounded corners are drawn black (e.g. with Flutter 3.44, which
apply_flutter_3.44_source_patches.sh supports and distributions use).

Make the view transparent with fl_view_set_background_color(), the API
Flutter provides for this. Flutter >= 3.27 also sets up its GtkGLArea for
transparency itself, so this replaces the GtkGLArea workaround there. The
function is declared weak so that Flutter 3.24, which does not have it,
still builds and keeps using the workaround.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yichao Yu <yyc1992@gmail.com>

* chore(flutter): bump desktop_multi_window for transparent Linux sub-windows

Pulls in rustdesk-org/rustdesk_desktop_multi_window#41, the sub-window
counterpart of this fix: with Flutter >= 3.27 the sub-window FlView needs
fl_view_set_background_color() to stay transparent, otherwise
remote-session windows get black borders and corners. It is a weak symbol,
so the Flutter 3.24.5 builds are unchanged.

The Flutter 3.44 and 3.22 bridge lock diffs do not touch this entry and
still apply unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Signed-off-by: Yichao Yu <yyc1992@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2026-12-02 18:21:42 +08:00
rustdeskandClaude Opus 5.5 8daa0ed0ee Revert "chore(flutter): bump desktop_multi_window for transparent Linux sub-windows"
This reverts commit 4174b4cc6f, pushed to
master by mistake. The bump lands with #17347 instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b
2026-12-02 18:19:22 +08:00
rustdeskandClaude Opus 5.5 4174b4cc6f chore(flutter): bump desktop_multi_window for transparent Linux sub-windows
Pulls in rustdesk-org/rustdesk_desktop_multi_window#41: with Flutter >= 3.27
the sub-window FlView needs fl_view_set_background_color() to stay
transparent, otherwise remote-session windows get black borders and corners
(e.g. the Flutter 3.44 riscv64 build). It is a weak symbol, so the Flutter
3.24.5 builds are unchanged. The main window counterpart is #17347.

The Flutter 3.44 and 3.22 bridge lock diffs do not touch this entry and
still apply unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b
2026-12-02 18:02:08 +08:00
StealUrKill fbebada5bf Feature: Address book & accessible devices side panels resizable (#17153)
* Feature: Make the address book & accessible devices side panels resizable

The Address book panel and the Accessible devices panel can now
be resized by dragging a divider on their right edge. The width is clamped
(150–300px) and persisted per panel as a local option, so it survives restarts.

* Fix side panel overflow in narrow windows

A saved panel width can push the divider and the peer list off the
screen. The panel now uses the row width to limit its visible width.
When there is space, the peer list shows one full peer card.
2026-12-02 15:35:14 +08:00
621cace696 ci: add linux riscv64 build (#16374)
* ci: add linux riscv64 build

Cross-builds the Flutter deb for riscv64 on x86_64 against Ubuntu
24.04's riscv64 ports, with Flutter 3.44.9 (the release the arm64
builds and the 3.44 bridge use, with the shared 3.44 source patches
and lock diff) and rustdesk-org/flutter-engine's riscv64 engine.

Like the other Linux debs since #17089 it carries the drm backend and
libdrmtap, cross-built here and handed to build.py through
DRMTAP_PREBUILT_DIR. libvpx and libaom are built from the res/vcpkg
overlay ports' sources and linked statically, as vcpkg links them on
x86_64 and aarch64, so the deb does not depend on a distribution's
codec sonames. The job runs only when uploading (nightly, tags), as
build-rustdesk-linux builds aarch64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* build.py: require Ubuntu 24.04's glibc and libstdc++ in the riscv64 deb

The riscv64 deb is cross-built on Ubuntu 24.04: librustdesk.so needs
GLIBC_2.38 and the Flutter runner needs GLIBCXX_3.4.32. Every package in
its Depends also exists on Ubuntu 22.04, so apt installed it there and
the service then failed to start. Declare the build base's libc6 and
gcc 13's libstdc++6 so apt refuses the install instead.

Checked with apt-get install -s on a package with this Depends: Ubuntu
22.04 refuses it (libc6 2.35, libstdc++6 12); Ubuntu 24.04, Ubuntu
26.04 and Debian 13 install it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: Dani Sarfati <danifunkervogt@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2026-12-01 23:51:17 +08:00
Felipe Pérez Galiana a6b2dd9912 fix(i18n): correct typos and Spanish translations (#17344) 2026-12-01 23:19:43 +08:00
rustdeskandClaude Opus 5.5 e78e6ab0ee ci: generate the Flutter 3.44 bridge with 3.44.9
The builds that use bridge-artifact-flutter-3.44 (Windows and macOS
arm64) are on Flutter 3.44.9, while the bridge was still generated with
3.44.8. Generate it with the same release. Both releases pin the same
SDK packages, so flutter_3.44_pubspec.lock.diff still applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b
2026-11-30 18:40:52 +08:00
21pages 8337837469 feat: add custom client options to hide session toolbar actions and menus (#17318)
* feat(toolbar): hide OS password and skip saved password auto-login

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Send clipboard keystrokes

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding View camera

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Terminal (beta)

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding TCP tunneling

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Switch Sides

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Take screenshot

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding Voice call while keeping text chat

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding the Display Settings menu

Signed-off-by: 21pages <sunboeasy@gmail.com>

* feat(toolbar): allow hiding the Keyboard Settings menu

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
2026-11-30 18:35:13 +08:00
68bf4ebe58 fix(windows): forward Unicode Auto-Type input (#16481)
* fix(windows): forward Unicode Auto-Type input

Decode VK_PACKET text before physical-key mapping, preserve surrogate pairs, and route it to the focused session through the existing text-input message.

Track Windows focus for Input Source 2 and document its mixed-event ordering limitation.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(unix): forward KeePassXC Auto-Type text

Decode native macOS and Linux text events before physical-key processing, preserve UTF-16 surrogate pairs across key releases, and route text to the focused writable session.

Select the existing Input Source 1 path from the actual GTK display backend so XWayland works on Wayland desktops. Native Wayland remains on Input Source 2.

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: simple refactor

Signed-off-by: fufesou <linlong1266@gmail.com>

* test(windows): cover Unicode packet text decoding

Verify BMP characters and consecutive surrogate pairs produce the expected text through the Windows packet decoder.

Signed-off-by: fufesou <linlong1266@gmail.com>

* feat(windows): make Unicode input opt-in from general settings

Keep legacy input as the default and apply the saved Windows option at startup and when changed. Add the setting under General > Other and remove the branch's Linux and macOS Unicode input handling.

Signed-off-by: fufesou <linlong1266@gmail.com>

* refactor(windows): simplify Unicode packet forwarding

Preserve input-source gating and callback results while reducing the branch diff.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(keyboard): unicode input, translations

Signed-off-by: fufesou <linlong1266@gmail.com>

* Route Windows Unicode packets to the current session

Check permissions on the same session that receives packet text and physical keys. Preserve valid text after an unpaired high surrogate and run the decoder tests on all platforms.

Signed-off-by: fufesou <linlong1266@gmail.com>

* Pin rdev to the merged Unicode packet change

The lockfile bump to rustdesk-org/rdev#27 was made while resolving a
merge commit, which the rebase onto master dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 18:12:41 +08:00
fufesou 38e00b622f Fix/unix ipc auth (#17235)
* fix: verify Unix IPC endpoint and configuration sync peers

Check kernel peer credentials before dispatching main IPC messages. Verify the root service, the active user's main endpoint for management commands, and the process submitting service synchronization.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: stop stale Linux GUIs and confirm Unix codec reports

Close the installed GUI before a package upgrade replaces its executable. Keep the codec probe alive until the installed Unix host reads back its report on the same IPC connection.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: keep existing Linux package upgrade behavior

An Ubuntu upgrade from 1.5.0 to 1.5.3 on master already closed the main window. Drop the extra GUI termination from the Debian, RPM and Arch upgrade scripts to keep package lifecycle changes out of the IPC fix.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: wait for Unix IPC peer verification before takeover

Keep an installed non-root server alive for a status round trip on the same main IPC connection before requesting the previous listener to close. This gives the listener time to verify the executable of the process requesting takeover.

Signed-off-by: fufesou <linlong1266@gmail.com>

* test: cover Unix service sync sender identity

Signed-off-by: fufesou <linlong1266@gmail.com>

* refact: function rename

Signed-off-by: fufesou <linlong1266@gmail.com>

* Refact: Remove unrachable branch

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: wait for macOS main IPC verification before one-way sends

Keep the socket open until the listener replies to OnlineStatus. This lets the installed host resolve the sender PID before the GUI sends a password refresh or another one-way request.

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-11-30 17:42:35 +08:00
6cdf4412c9 fix(wayland): send portal wheel scrolls as discrete steps (#17295)
On a Wayland host that injects input through the RemoteDesktop portal,
wheel steps went to NotifyPointerAxis, which carries smooth-scroll
pixels, so a wheel click scrolled about one pixel: on mutter (46 and 51
tested), libei-based portals (KDE master, COSMIC) and the wlr
RemoteDesktop implementation. Released KDE portals (Plasma 6.8 and
older) pass the value to KWin fake input with y negated, so vertical
scrolling there also went backwards.

Send the steps with NotifyPointerAxisDiscrete. On GNOME a click now
arrives as a wheel step (value120 = 120). The KDE portals that still use
KWin fake input turn each step into one axis unit without a wheel step,
so multiply the steps by 10 when KWin is older than 6.8.80; in Qt, GTK3,
Firefox and Chromium that scrolls as far as a local wheel click. The
KWin version is read once from org.kde.KWin.supportInformation; if that
fails, the steps are not scaled.

Fixes #17264



Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs

Co-authored-by: x7edo1x-glitch <285020844+x7edo1x-glitch@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 17:08:07 +08:00
RustDeskandClaude Opus 5.5 b250103ff5 fix(wayland): no "select the screen" hint when the restore token skips the picker (#17319)
With a restore token saved, the portal answers without showing its
picker, yet every first-viewer login still told the peer "Please Select
the screen to be shared(Operate on the peer side)". CAP_DISPLAY_INFO is
cleared when the last viewer leaves, so is_inited() reports "not
inited" on each new connection.

When the server process has a token saved, the login now holds the
message back for 3 s and drops it if the display refresh (portal request
and capturer setup) finishes first. If the portal turns the token down
and shows its picker, the message goes out after 3 s. Without a token
the message is sent at once, as before.

Fixes #17317


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:31:34 +08:00
6380d8c7a3 fix(linux): reap xrandr child process in change_resolution_directly (#17213)
* fix(linux): wait for xrandr in change_resolution_directly to prevent zombie processes

* test(linux): add xrandr end-to-end and zombie-reaping tests

* fix(linux): run change_resolution via spawn_blocking and simplify xrandr test

* fix(linux): reap xrandr on a separate thread

Wait for xrandr on a dedicated thread in change_resolution_directly, and log a failed exit with throttled_log. Callers no longer wait for xrandr, so the async worker and restore_resolutions do not block.

Restore src/server/connection.rs to its state on master. The Windows and macOS paths do not change.

Replace the regression test with one that needs no X server.

* fix(linux): create xrandr reaper thread fallibly before spawning xrandr

* fix(linux): reap xrandr through the existing CHILD_PROCESS list

Push the xrandr child to CHILD_PROCESS, which check_zombie() already polls in the server process. This removes the waiter thread, the channel, and the second wait path that earlier commits added.

* test(linux): drop the xrandr reaping test

The test skips itself when xrandr is missing, and the CI Linux job does
not install it, so it gives no reliable coverage there. The real-session
results are the evidence for this fix.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

---------

Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-30 12:01:58 +08:00
459b4141ee Add keyboard mode to Display settings (#17236)
* feat: support a configurable default keyboard mode

* fix(web): preserve the selected keyboard mode for input source 2

* Point hbb_common back to upstream after PR #646

* ci: run web keyboard mode tests in Chrome

* test: remove browser-only keyboard mode tests and CI step

* Hide the keyboard mode setting on controllers with a single input source

* Keep the keyboard mode setting when only Input source 1 is available

* Update libs/hbb_common to latest main

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-29 22:41:37 +08:00
fufesou 64fb67d4f3 Fix/preserve ipc reg recovery (#17278)
* fix(ipc): preserve the host privacy recovery record during settings updates

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): keep Windows config mirrors from overwriting host recovery

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): keep display recovery in the Windows host profile

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): preserve Windows recovery across sync and offline edits

Keep the original options for a round trip to an older host and filter the separate profile during persistence. Read and write single-option edits over the same authenticated connection. Use locked profile updates when the host pipe is absent.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): keep Windows offline option edits and GUI acknowledgements consistent

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): limit recovery protection to configuration updates

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix(ipc): preserve host recovery for LocalSystem clients

Signed-off-by: fufesou <linlong1266@gmail.com>

* test(ipc): cover LocalSystem host profile selection

Signed-off-by: fufesou <linlong1266@gmail.com>

* test(ipc): simplify recovery configuration checks

Signed-off-by: fufesou <linlong1266@gmail.com>

* chore: update hbb_common for configuration setter layout

Signed-off-by: fufesou <linlong1266@gmail.com>

* refactor(ipc): share the list of preserved configuration keys

Signed-off-by: fufesou <linlong1266@gmail.com>

* update hbb_common

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-11-29 22:28:40 +08:00
RustDeskandMariano Abad 130b84119b Drmtap packet min (#17286)
* drm: capture multi-plane scanouts with the libdrmtap packet API

KWin 6.8 on Intel can scan a window out of its own plane, above the
desktop (overlay) or below a desktop with a hole (underlay). One dma-buf
descriptor cannot describe that frame: the window was missing, or during
an underlay the window alone was streamed as the whole screen (#17187).

libdrmtap 0.6 grabs every lit plane as an opaque packet plus its fds and
composes them on the unprivileged side. When the loaded libdrmtap has the
packet API, the service sends the packet in the existing dma-buf message
(new field, all fds of the message belong to it) and the consumer converts
it with drmtap_convert_packet. With an older libdrmtap nothing changes.

The fd transport now carries up to 16 fds per message instead of one.
The ABI gate accepts minor 6 next to 5.

* drm: gate the packet path on the libdrmtap ABI level

The loader accepts libdrmtap 0.5.0 up to 0.6.x. When the library exports
drmtap_abi, the level range it serves must include 2 (the 0.6.0 header);
without the symbol it is a 0.5 library, level 1. The packet path is on
only at level 2 or above with its three symbols resolved.

The consumer reads the rotation of a packet frame from its converting
context after drmtap_convert_packet: libdrmtap knows there whether the
frame was composed (rotate-0) or one plane converted as its buffer.

drmtap_convert_packet errors and output checks now match convert():
EAGAIN, EBUSY and EINTR skip the frame instead of demoting the display.

The frame arm sends through drm_send_frame and send_msg keeps its one fd
signature. Comments and two log lines updated for the packet path.

* drm: let build.py package any accepted libdrmtap minor, keep the last frame on E2BIG

build.py required the pinned libdrmtap minor to equal DRMTAP_ABI_MINOR, so raising the
runtime gate to 0.6 made it refuse the 0.5.12 pin. It now accepts the same range as the
runtime loader. grab_packet maps E2BIG (more than four lit planes, none covering the CRTC)
to WouldBlock so the last frame stays, like grab_desc on an underlay.

* build: pin libdrmtap v0.6.0

rustdesk-org/libdrmtap is synced with upstream, so the package can ship
0.6.0 and the packet path runs. Before this, a packaged build carried
0.5.12 and has_packet() was always false.

* drm: turn a composed frame by the primary plane rotation

A frame libdrmtap composed from several planes is the CRTC raster and
answers rotate-0, so it was turned by the wl_output transform. That
transform does not carry the panel orientation: on a panel whose primary
plane rotated in hardware the composed frame came out upside down (180)
or transposed against the session size (90/270), which rebuilt the
session on every frame while an overlay was lit. The CPU path does the
same once it composes.

Enumeration now records the primary plane rotation next to
plane_transposed, read from the same query. A frame answering rotate-0
is turned by that rotation when the plane rotated, else by the output
transform as before. One-layer frames still answer their plane rotation
and are left alone.

* drm: a failed packet convert drops to one descriptor first

A convert error on a packet set prefer_cpu, which kept that monitor on
the CPU path for the rest of the process run. It now sets no_packet: the
next session asks the service for one descriptor (grab_desc) through a
new DrmStart field, and only a failed descriptor convert sets
prefer_cpu. The field defaults to false, so a consumer that does not
send it keeps the packet path.

The ABI gate test checks again that a library below the floor (0.4.x)
is refused.

* build: pin libdrmtap v0.6.1

rustdesk-org/libdrmtap is synced with v0.6.1. It fixes the frame size
of a single plane that is scaled to the screen or smaller than it: that
plane came out at its buffer size and the session was rebuilt.

---------

Co-authored-by: Mariano Abad <weimaraner@gmail.com>
2026-11-29 22:16:20 +08:00
RustDeskandClaude Opus 5.5 a98982d702 ci: a vcpkg binary cache that works for CI runs; drop rust-cache from the Flutter builds (#17300)
* ci: give CI runs a vcpkg binary cache that works, saved from master only

vcpkg removed its x-gha backend, so every run builds the vcpkg ports from
source, 6 to 22 minutes per job. CI runs that publish nothing now restore the
vcpkg binary packages that the last master push saved for the same job,
through vcpkg's files backend and actions/cache, and a run saves only when it
built a package the cache lacked. Builds that publish (nightly, tags) set
VCPKG_BINARY_SOURCES to `clear` and never touch the cache.

rust-cache entries are 1.3 to 2.2 GB each and every PR saved its own, so
within the 10 GB limit they evicted master's and most runs missed. They are
now saved from master only; PRs still restore master's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* DO NOT MERGE: let this PR's runs save the vcpkg cache, to test restoring it

* ci: drop rust-cache from the Flutter builds; save ci.yml's from master only

In the last two PR CI runs all 20 rust-cache restores in flutter-build.yml
and bridge.yml found nothing, and so did every job of the 2026-11-28 nightly.
Saving the ~2 GB entries still took up to 3.3 minutes per job and kept the
repository's cache above its 10 GB limit, which evicted most of the new vcpkg
entries within an hour of their first save. ci.yml keeps its rust-cache, but
only master saves it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* Revert the temporary save-on-PR commit

With it, this PR's runs saved the vcpkg cache, and a rerun of the Android
x86_64 job restored all 20 packages from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: keep only the current vcpkg packages in a saved entry; drop the iOS wiring

The save step now deletes the restored zips that no package installed by
this run uses before it saves. Otherwise each compiler, vcpkg commit or
port change carried the whole old set into every later entry, so an entry
grew by a full 32 to 104 MB set per such change, not by a few MB.

The iOS job runs only in builds that publish, where the restore and save
steps are skipped, so its wiring never ran: remove it.

Say that rust-cache rarely hit rather than never: macOS x64 had a hit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: keep the bridge's rust-cache, saved from master only; log the vcpkg pruning

Every platform job waits for generate-bridge, which without rust-cache
compiles cargo-expand and flutter_rust_bridge_codegen from source on every
run (2 to 3 minutes). Its entry is about 1 GB, one per run rather than one
per platform job, so keep it and save it from master only, as ci.yml does.

The vcpkg save step now logs how many zips it kept and removed, and warns
when the status file is missing, so the first master run shows the pruning
working on each platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 22:14:40 +08:00
RustDeskandClaude Opus 5.5 aedb901f10 ci: build published binaries without restoring any cache (#17299)
* ci: build published binaries without restoring any cache

Nightly and tag builds restored rust-cache (which also holds ~/.cargo/bin,
where the bridge's flutter_rust_bridge_codegen lives), the run-vcpkg cache, the
run-on-arch container images pushed to GHCR, and the bridge's Flutter and pub
cache. Other workflow runs can write all of these, so an entry planted by one
of them would end up in a published binary, past the lockfile and hash checks.

With upload-artifact set, those steps are now skipped or told not to cache,
and the cache token is no longer exported to every build step. CI runs without
upload-artifact keep their caches.

The cost is small today: vcpkg's x-gha binary cache backend has been removed
upstream, so every run already builds the vcpkg ports from source, and the
last nightly found no rust-cache entry for any job. What is new is that the
run-on-arch images are rebuilt in every published build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* DO NOT MERGE: run this PR's CI the way a published build runs (no cache)

* Revert the temporary no-cache CI commit

Its CI run (46105502143) built every PR CI job the way a published build now
runs, without any cache, and passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 21:32:38 +08:00
RustDeskandClaude Opus 5.5 ef49275ddb ci: pin every external download in the Flutter build workflow (#17298)
* ci: pin every external download in the Flutter build workflow

flutter-build.yml fetched 16 files with curl, wget or Invoke-WebRequest and
checked none of them against a hash kept in this repository: sciter from a
`master` URL, the engine and the web deps from release tags that are
re-uploaded in place, nasm over plain http, the Rust and Flutter tarballs. The
printer driver zips were checked, but against a sha256sums file from the same
release, which whoever can replace the zips can replace too.

Each download is now checked against a SHA-256 written next to it, and the
sciter files come from a fixed commit. The git sources that followed a branch
or a tag (flutter-elinux, CMake for armv7, flathub/shared-modules,
appimage-builder) are pinned by commit, and the last action referenced by tag
(download-syft@v0) by SHA. playground.yml gets the same check for rcodesign.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: fail on a printer driver mismatch and pin the Syft download

With the printer driver hashes now kept in this file, a mismatch is never a
network failure: it is either an update upstream or a replaced file. The step
logged it and built without the driver, so the next in-place update of the
`driver` release would have shipped Windows packages without remote printing
and a green run. It now fails the step. A failed download still skips the
driver, as before. It uses `exit` because the surrounding catch swallows
`throw` and, with $ErrorActionPreference = 'stop', Write-Error too.

anchore/sbom-action/download-syft, even pinned by commit, runs install.sh from
syft's `main` branch in a job with `contents: write`. The step now downloads
the syft 1.42.3 release tarball, the version the action installed, checks it
against a SHA-256 written here, and unpacks it outside the checkout that
`syft dir:.` scans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:54:32 +08:00
RustDeskandClaude Opus 5.5 7fb571184e ci: enforce the Flutter lockfile in every build (#17294)
* ci: enforce the Flutter lockfile in every build

Every Flutter job now runs `flutter pub get --enforce-lockfile` before it
builds, so a package version or content hash that pubspec.lock does not
pin fails the job instead of being resolved live.

The Flutter 3.44 jobs (Windows arm64, macOS arm64, their bridge) and the
3.22.3 bridge job edit pubspec.yaml on the fly and had no lock for the
result, so the affected packages were resolved at build time. Each of the
two states now gets its lock entries from a diff against
flutter/pubspec.lock, applied where the pubspec.yaml edit is made. Every
other package keeps following the committed lock: a change there either
carries over or fails at `git apply` / `--enforce-lockfile`.

It has to be `flutter pub get`: `flutter packages pub get` only forwards
to `dart pub` and skips the plugin registrant files.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: apply the 3.44 lock diff before any source edit; say what the diffs track

A lock diff that no longer fits now stops apply_flutter_3.44_source_patches.sh
before it edits a source file. Before, common.dart and pubspec.yaml were already
patched and dialog.dart was not, so every later run refused the tree as
partially applied.

The comments said the diffs hold what the pubspec bumps change, but most of
their entries come from the pins of the Flutter SDK itself. Moving one of those
Flutter versions therefore needs the matching diff regenerated; say so next to
each version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

* ci: treat a restored 3.44 pubspec.lock as not patched

The "already applied" check looked at the Dart sources and pubspec.yaml
only, so rerunning the script after restoring just flutter/pubspec.lock
exited 0 with the bumped manifest and the old lock, and the following
`flutter pub get --enforce-lockfile` failed. The early return now also
requires the lock diff to reverse cleanly; otherwise the checkout is
reported as partially patched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-29 20:13:34 +08:00
YSSZ da0ae88900 docs: improve Arabic README translation and RTL formatting (#17307)
* Add Arabic RustDesk Server Pro badge

* Add Arabic RustDesk Server Pro badge

* Revise Arabic README with updates and disclaimers

Updated the Arabic README to include new sections, improve translations, and add a disclaimer regarding misuse.

* docs: fix direction marks around release options
2026-11-29 19:54:00 +08:00
RustDeskandClaude Opus 5.5 1210eb292c fix(android): list interfaces without RTM_GETLINK (#17303)
Android 11+ refuses the RTM_GETLINK dump to apps targeting API 30 or
later (SELinux nlmsg_readpriv). The getifaddrs() shim dumped links first
and failed the whole call, so webrtc-util saw no interfaces and WebRTC
offered no host candidates. Two peers behind one NAT then fell back to
the relay.

Dump addresses only, and name each with if_indextoname() and read its
flags with SIOCGIFFLAGS, as bionic's own getifaddrs() does for apps and
WebRTC's ifaddrs_android.cc does everywhere. This drops the link table.

Also report IFA_LOCAL rather than the peer for an IPv6 address that has
one, as for IPv4.

Supersedes #17293, which diagnosed the root cause.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 21:04:31 +08:00
RustDeskandClaude Opus 5.5 f30effa298 fix(terminal): bump portable-pty so 32-bit Windows calls ConPTY as stdcall (#17302)
The 32-bit Windows terminal helper crashed with SIGSEGV right after it
started (#17296). portable-pty loaded CreatePseudoConsole,
ResizePseudoConsole and ClosePseudoConsole through function pointers
typed extern "C", but these functions are stdcall, so on i686 every call
popped its arguments twice and skewed the stack pointer.

rustdesk-org/wezterm@a181db18 declares the pointers extern "system".
filedescriptor comes from the same repository and moves with it; its
code is unchanged.


Claude-Session: https://claude.ai/code/session_01JAxkkig1bcC5Xrr1uwX47b

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:09:12 +08:00
Yi Ling 104ef2a865 fix(fs): compare modified time in whole seconds in write confirmation (#17290)
Signed-off-by: lingyicute <xlyxinglinyi@gmail.com>
2026-11-27 23:50:30 +08:00
21pages 5c680b4d86 Make the idle API heartbeat interval configurable (#17256)
* Make the idle API heartbeat interval configurable

* Send an idle heartbeat when the API server changes
2026-11-27 23:34:34 +08:00
bovirus 45e34a6923 Update it.rs (#17265) 2026-11-26 23:14:19 +08:00
rustdeskandClaude Opus 5.5 a0c0963c48 Add PR evidence check and AI cross-review section
The PR template gets an "AI cross-review" section: contributors list the
models that reviewed the diff besides the one that wrote it, paste the
review output or a share link, and give their decision on each finding.
Findings can be wrong, so they are judged, not applied blindly.

A pull_request_target workflow reads the PR description and file list
(it never checks out PR code) and, for authors without write access,
labels the PR needs-evidence and leaves one polite comment listing what
is missing: test environment and results, reproduction for bug fixes,
AI cross-review, screenshots or video for UI changes, and the approval
link for features. Translation, docs and CI-only PRs skip the test and
review checks. PRs opened before this template are left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:46:30 +08:00
rustdeskandClaude Opus 5.5 a02f76c48d PR template: ask for cross-review by other AI models
Most PRs are now written with AI, so "reviewed every line myself" is not
realistic. Ask for review by models other than the one that wrote the
code, and for the models used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:20:24 +08:00
rustdeskandClaude Opus 5.5 b03e55e266 PR template: match the "may be closed" wording of discussion #17223
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:17:16 +08:00
rustdeskandClaude Opus 5.5 0039611d7b PR template: link the approval and testing policies in visible text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:16:46 +08:00
rustdeskandClaude Opus 5.5 003637af9f PR template: require video or screenshots for UI changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:15:05 +08:00
rustdeskandClaude Opus 5.5 e5afd9c75b Add pull request template
Point contributors at the feature-approval and real-device end-to-end
testing policies (discussions #17223 and #17225), and ask for the test
environment, steps, results and regression surface in every PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-24 23:12:22 +08:00
rustdeskandClaude Opus 5.5 51f94394ce refact: Remove unused selinux check
The helper card that called it was removed in #17197.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkkfvhEPKVg85ZHovfs
2026-11-23 17:38:04 +08:00
fufesou cc3300d1bb refact: Remove outdated selinux helper card (#17197)
Signed-off-by: fufesou <linlong1266@gmail.com>
2026-11-23 17:15:47 +08:00
RustDeskandClaude Opus 5.5 9724512429 feat(linux): ship DRM capture in every Linux package behind allow-drm-capture (#17089)
* feat(drm): add allow-drm-capture and stop probing _drm when it is off

DRM capture is about to be compiled into every Linux build, so it needs a
runtime switch. `drm_capture_enabled()` reads the new `allow-drm-capture`
option (default off) or `RUSTDESK_DRM_CAPTURE=Y`, which the root service will
set for a greeter `--server`. While it is off the consumer never probes `_drm`:
`availability()` and `availability_cached()` answer Unavailable and the
startup warm returns at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(drm): keep the stock greeter, uinput and cursor paths while allow-drm-capture is off

With drm compiled in, these paths changed even when DRM capture was never
used: a Wayland greeter read as Wayland, the uinput range was set on the
apply thread, `wayland_has_compositor` said no at a greeter, every Wayland
login ran loginctl for the settle, and the cursor cache had a ceiling.
Each now checks `drm_capture_enabled()` and, while it is off, runs the code
a build without drm runs. `check_init`'s stock `match` is only re-indented
under its new `if`; see `git diff -w`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(drm): start the _drm producer and greeter paths only with allow-drm-capture, restart --server on change

The root service used to start the `_drm` producer at boot, which dlopens
libdrmtap, opens the DRM device and grabs a frame, and to treat a Wayland
greeter as a DRM login screen. Both now wait for allow-drm-capture:

- the producer starts the first time the option is seen on, and
  `handle_drm_conn` refuses peers while it is off;
- when the option changes, the service restarts `--server` and re-reads the
  seat, because every `--server` decides its paths when it starts;
- a greeter `--server` runs as the greeter uid only with the option on, and
  is passed RUSTDESK_DRM_CAPTURE=Y, since its own config has not synced from
  root when `IS_X11` is computed;
- `get_active_userid_fresh`, the greetd detection and the login-Wayland HOME
  lookup follow the option, so with it off they match a build without drm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(flutter): add the DRM capture switch to the Wayland settings card and home warnings

Settings > General > Wayland gets a "Use DRM screen capture" checkbox on an
installed Linux client, with the explanation shown below it: it skips the
Wayland screen sharing prompt (the login screen too), may not work on every
device, and switching it disconnects current sessions. Flatpak and AppImage
are not installed builds, so they do not show it.

On the home page, an installed client with the option off now offers an
"Enable" button on the Wayland session and Wayland login screen warnings,
and shows neither warning once it is on. Builds that are not installed, and
clients where the option is fixed, keep the existing warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* feat(lang): add the DRM screen capture strings

"Use DRM screen capture", its settings explanation and the two home-page
warnings that offer it. it.rs is left for its translator, and sc.rs is
left empty rather than guessed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* build(linux): bundle libdrmtap into the stock packages and drop the unattended-wayland variant

DRM capture is now a runtime option, so the package name no longer has to be
the consent. build.py compiles `drm,drm-wake` into every Linux Flutter build
on the deb and pacman paths (`--no-drm` opts out), and the stock `rustdesk`
deb carries libdrmtap. The yum and zypper paths only build Sciter rpms and
are left alone.

- The variant rename, its Conflicts/Provides on `rustdesk`, the extra
  Depends and the measured libc6 floor are gone: libdrmtap is dlopen-ed and
  falls back to PipeWire when it cannot load, so it must not stop the
  package installing on older systems.
- The stock deb Conflicts/Replaces `rustdesk-unattended-wayland`, so
  installing it takes over from that package.
- `--package` decides from the staged binary whether it is a drm build,
  since it compiles nothing; a Sciter bundle stays as it was.
- The Flutter rpm specs and PKGBUILD install libdrmtap into
  /usr/lib/rustdesk, and the rpms exclude it from auto-generated
  Requires/Provides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci(linux): build every Linux package with drm and run the drm tests in the main job

build-rustdesk-linux now builds libdrmtap on the runner (x86_64 and
aarch64), compiles `drm,drm-wake` into the release library and packages the
library into the deb and both rpms; arch gets it through PKGBUILD. The
separate build-rustdesk-linux-drm job is gone, along with the
rustdesk-unattended-wayland deb it published.

- The drm-gated unit tests (`run_drm_tests`) move into the x86_64 build
  container unchanged.
- A step checks that the deb carries libdrmtap and a binary that dlopens
  it, and each rpm is checked for the library and, on x86_64, for a glibc
  requirement newer than the build container's.
- x86_64 uploads its deb on a PR too, as the drm job did, so a PR's build
  can be installed and tested.

AGENTS.md now points the drm test rule at the x86_64 build job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* refactor(drm): keep start_os_service's diff to the producer move, check the cursor ceiling cheaply first

DrmCaptureSwitch now sits after start_os_service, so the diff there reads as
the producer spawn leaving and the poll arriving. The cursor-cache ceiling
compares the cache length before it locks DRM_STATE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): load the custom client before is_x11() can read Config, offer DRM only where it is compiled in

`IS_X11` now asks `drm_capture_enabled()`, which reads Config, and it is
computed in `global_init()`. `core_main()` ran that before
`load_custom_client()`, so on a Linux custom client the config loaded from
the stock "RustDesk" path before the app name was set and was never
reloaded; the root then synced that copy over the client's own settings.
Load the custom client first. On Windows and macOS `global_init()` does
nothing, so only the Linux startup order changes.

The DRM checkbox and the home-page "Enable" cards also showed on installed
builds without the drm feature (NixOS, source builds, --no-drm), where the
option has no effect. They now also need `is-drm-capture-supported`, a new
`main_get_common` key that reports whether drm is compiled in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(flutter): keep the DRM switch behind disable-settings, ask loginctl once per build

disable-settings hides the Security tab but not General, so the Wayland card's
checkbox and the home Enable button both stayed reachable on a locked custom
client. With settings disabled the home page falls back to the stock Wayland
warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): offer DRM only where libdrmtap loads, keep the stock check_init apply verbatim

- is-drm-capture-supported also requires the bundled libdrmtap to load, so a
  host whose glibc is older than its build is not offered a switch that does
  nothing.
- Dispatch the Wayland probe before load_custom_client: the probe child must
  run before any other startup work.
- check_init keeps master's not(drm) apply untouched; the drm build carries its
  own copy for allow-drm-capture off.
- drm_capture_enabled's doc names the Wayland enumeration in base and scrap,
  which does not read the option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci(linux): catch any glibc 2.28+ requirement in the rpm drm check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): initialize libsodium before the custom client's signature check

core_main now loads the custom client ahead of global_init, which since
#16974 starts with init_sodium so nothing uses libsodium before it. Run it
first there too; a second sodium_init() is a no-op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): follow allow-drm-capture in the startup warm and in running streams

- warm_availability reads the option inside its retry loop. It starts
  before the initial config sync from root, so a --server whose account
  config does not hold the option yet (a greeter account that gets no
  RUSTDESK_DRM_CAPTURE, or an account not yet synced) skipped the warm
  for its whole life and paid the cold probe on its first connection.
- handle_drm_conn checks the option per frame, next to the peer re-auth,
  so turning it off ends a stream that is already running rather than
  only refusing new ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* test(drm): skip the option-off test where the option is on

drm_capture_enabled() reads the real config and RUSTDESK_DRM_CAPTURE, so
the test failed on a machine that has DRM capture turned on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): leave running streams to the --server restart

Drop the per-frame allow-drm-capture check added in 3d1469255. The root
sees the option flip before its service loop restarts the --server, so
the check ended the stream up to one loop pass early and the consumer
spent that time failing to rebuild a capturer before the restart
disconnected the session anyway. It also took CONFIG2's read lock on
every frame, which Config2::set_options holds for writing across its
disk write. The comment now says what turning the option off does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci: run the drm and unix-file-copy-paste tests in the CI workflow

Move them out of the Linux package build into ci.yml's x86_64 Linux job,
which already has vcpkg and the build dependencies. The drm feature only
dlopens libdrmtap, so the tests need neither the bionic container nor
the library. A failing test no longer stops the deb, rpm and Arch
packages or skips appimage and flatpak.

The step runs every test of each package with the feature on instead of
selecting modules by name, so run_drm_tests and its guard against a
filter that matches nothing are gone, and so is the AGENTS.md rule
about it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): hand an allow-drm-capture change made as root to the service

The service decides on DRM from its own copy of the config, which only a
non-root --server syncs. A root process that changed the option -- the CLI
(`sudo rustdesk --option`), or a root --server at a login screen applying a
strategy -- left the service on the old value, so the change never took effect
there, and the next store by the service overwrote it in the file.

Such a process now sends its config to the service over the existing SyncConfig
when the option changed. Non-root processes and changes to other options do
nothing more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* build(drm): recommend the GL libraries the old variant depended on

rustdesk-unattended-wayland depended on libdrm2, libegl1 and libgles2. The
package that replaces it now recommends them: libdrmtap opens EGL lazily, so they
stay optional, but apt still installs them by default and autoremove keeps them.

AGENTS.md keeps the rule that a test behind a feature no CI build enables needs a
cargo test line, now pointing at ci.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* build(drm): recommend the GL libraries in the rpm and Arch packages too

The rpm specs recommend libdrm, libEGL and libGLESv2 by soname, since Fedora and
openSUSE name the packages that provide them differently; dnf and zypper install
weak dependencies by default. PKGBUILD lists libdrm and libglvnd as optdepends,
which pacman only reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): hand the option to the service only from a current copy of the config

SyncConfig carries the whole config, and the service stores it and takes its
trusted-device grants as authoritative. A root UI held the copy it loaded at
startup, so turning the option on or off there could restore a revoked trusted
device or an older permanent password. Its view of the option could also differ
from the service's, so a change could be skipped.

The push now runs in the root --server's handler of an options update, the
process that holds the config, also when the update is rejected after the
options were applied. `sudo rustdesk --option` still pushes by itself, since it
has just loaded the config and can run before any --server is up. A UI never
pushes, including a GUI started with sudo that hosts the IPC itself: a change
made there does not reach the service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* ci: check the archlinux package carries libdrmtap

PKGBUILD skips libdrmtap when it finds none, so a tag or nightly build could
publish an Arch package without it while every step passed. Check its contents
as the deb and rpm steps do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(drm): send the service the trusted-device grants on disk

SyncConfig(Some(..)) makes the service write the sender's grants as
authoritative. `sudo rustdesk --option allow-drm-capture ...` loads its
config at start and pushes only after its IPC round trips with the
--server, so a grant written in that window (a 2FA trust just granted, a
device just removed) was reverted by the push.

Read the grants from disk, as the service's own SyncConfig(None) reply
does; the service then finds them equal to what it holds and writes
nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(lang): say unattended access in the Lithuanian wayland-drm-tip

"Automatinis prisijungimas" is this file's "Auto Login", so the tip read
as advice about automatic login. "Neprižiūrima prieiga" matches the
English source and the file's "prieiga" for access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

* fix(core_main): load the custom client early only with drm

Only a Linux drm build reads Config in global_init (the IS_X11 greeter
override reads allow-drm-capture), so only there must the custom client
load first. Every other build keeps master's order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P1grQ39ByRWPUtTBdTzEBF

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:24:48 +08:00
Thejesh 66fabdf305 docs: move video codec from hbb_common to scrap in README file structure (#17189)
Signed-off-by: thejesh23 <35212698+thejesh23@users.noreply.github.com>
2026-11-23 09:34:55 +08:00
Filip Klein 5a64e7a61f macOS: implement View Camera (remote camera viewing) (#17135)
* Update connection.rs

Added camera support for macOS

* scrap: enable nokhwa camera deps and cfg for macOS (frame path still TODO)

* scrap: allow PixelBuffer from raw bytes on macOS for camera frames

* macOS: request camera permission via nokhwa, add NSCameraUsageDescription

* macOS: add camera entitlement

* nokhwa: fix macOS bi-planar (NV12) camera frames via vendored patch

* nokhwa: point at filipklein5/nokhwa fix branch instead of vendoring

Replaces the vendored libs/nokhwa copy (~16.5k lines) with a git
dependency override pointing at the macOS NV12 fix on
filipklein5/nokhwa#macos-nv12-fix, submitted upstream as
rustdesk-org/nokhwa PR (see Cargo.toml comment). Keeps this PR's diff
focused on the macOS camera support itself.

* nokhwa: link to upstream PR #7

* address CodeRabbit review on #17135

- connection.rs: move the macOS camera-permission wait (can block up to
  30s) off the Tokio worker via spawn_blocking, so send_logon_response_
  and_keep_alive stays responsive to input/heartbeats while it's pending.
- camera.rs: build the non-Linux camera list in a local Vec and swap it
  into SYNC_CAMERA_DISPLAYS only after enumeration succeeds, instead of
  pushing into the shared cache mid-loop. A create_camera failure
  partway through no longer leaves the cache holding a stale prefix
  that disagrees with the Err this function returns (pre-existing on
  Windows; macOS now exercises the same path).
- Cargo.toml + res/osx_camera_info.plist: add NSCameraUsageDescription
  to the legacy Sciter macOS bundle via cargo-bundle's
  osx_info_plist_exts, so that build path (unlike the Flutter one)
  doesn't get killed at the camera permission prompt for lacking it.

* nokhwa: bump to 8920ff8 (420v + review fixes, rustdesk-org/nokhwa#7)

* keep non-macOS camera paths unchanged

- camera.rs: drop the SYNC_CAMERA_DISPLAYS local-vector rework of the
  non-Linux loop; it also changed Windows and fixes a pre-existing
  issue, so it belongs in a separate PR.
- connection.rs: use spawn_blocking for Cameras::all_info() on macOS
  only (the permission wait is macOS-specific); other platforms keep the
  original call.

* macOS: only advertise/use View Camera when AVCaptureDeviceDiscoverySession exists

nokhwa's AVFoundation query uses AVCaptureDeviceDiscoverySession, which
exists only on macOS 10.15+; on 10.14 hosts class! panics and the
release profile aborts the server. Probe the class at runtime:
- connection.rs: advertise support_view_camera on macOS only if present
  (the windows/linux line is back to its original form).
- camera.rs: all_info()/exists()/create_camera() return no cameras (or
  an error) when it is missing.
Also bumps nokhwa to 0a8bf56 (recv_timeout in the macOS frame_raw).

* nokhwa: bump to 5439c78 (releases the configuration lock, rustdesk-org/nokhwa#7)

* nokhwa: bump to d390711 (hold the configuration lock only while starting the stream, rustdesk-org/nokhwa#7)

* nokhwa: bump to a509e0e (configure() closure unlocks on every path, rustdesk-org/nokhwa#7)

* nokhwa: bump to 5bd00f5 (configure() takes &Self, can't swap the unlocked device, rustdesk-org/nokhwa#7)

* nokhwa: drop the [patch] now that rustdesk-org/nokhwa#7 is merged

rustdesk-org/nokhwa#7 merged into fix_from_raw_parts at 137a327.
Cargo.toml's existing git dependency now resolves there directly, so
the temporary [patch] to filipklein5/nokhwa is no longer needed.

* quartz.rs: drop PixelBuffer::from_frame, inline the screen constructor

The screen-capture call site now constructs PixelSource::Screen
directly, as it did before this feature (just with the new field
names). The extra from_frame helper only existed to wrap that one
call, which AGENTS.md asks to avoid: the screen path shouldn't change
shape just because camera.rs needs PixelBuffer::new.

* address maintainer review round 3

- camera.rs: gate exists() and create_camera() on macOS on
  nokhwa::nokhwa_check() too, not just is_camera_supported(). Without
  it, a denied/timed-out permission let exists() report a camera
  anyway, so the server started the camera0 video service and spammed
  unthrottled errors while touching AVFoundation without permission.
  all_info() always runs ensure_macos_camera_permission() first during
  login, so by the time these run the permission state is settled.
- connection.rs: log the Err from Cameras::all_info() (permission
  denied / timed out) before falling back to an empty Vec, instead of
  dropping it silently via unwrap_or_default().
- camera.rs: remove the FIXME above the PixelBuffer::new call; it's
  stale now that macOS implements it.
- quartz.rs: PixelBuffer::new computes stride from pixfmt.bytes_per_pixel()
  instead of hardcoding width * 4, so non-32bpp formats get a correct
  stride too.

* nokhwa: bump to f149b07 (rustdesk-org/nokhwa#8 merged, fixes macOS 10.14 launch crash)
2026-11-23 00:38:35 +08:00
162 changed files with 6096 additions and 1272 deletions

No files matched your search

@@ -0,0 +1,30 @@
name: Restore the vcpkg binary cache
description: >-
For CI runs that publish nothing. Restores the vcpkg binary packages a master push saved for
this job, and outputs the VCPKG_BINARY_SOURCES value that reads and extends them.
inputs:
name:
description: Tells this job's cache apart from the others, e.g. its Rust target.
required: true
outputs:
binary-sources:
description: The value to give VCPKG_BINARY_SOURCES.
value: ${{ steps.dir.outputs.binary-sources }}
runs:
using: composite
steps:
- id: dir
shell: bash
run: |
# vcpkg wants a native path; on Windows, cygpath turns RUNNER_TEMP into one with forward slashes.
dir="$(cygpath -m "$RUNNER_TEMP" 2>/dev/null || echo "$RUNNER_TEMP")/vcpkg-bincache"
mkdir -p "$dir"
echo "binary-sources=clear;files,$dir,readwrite" >> "$GITHUB_OUTPUT"
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ runner.temp }}/vcpkg-bincache
key: vcpkg-bin-${{ runner.os }}-${{ runner.arch }}-${{ inputs.name }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: vcpkg-bin-${{ runner.os }}-${{ runner.arch }}-${{ inputs.name }}-
# vcpkg-cache-save compares against this to tell whether the run built any package.
- shell: bash
run: touch "$(cygpath -m "$RUNNER_TEMP" 2>/dev/null || echo "$RUNNER_TEMP")/vcpkg-bincache/.restored"
@@ -0,0 +1,36 @@
name: Save the vcpkg binary cache
description: >-
Saves what vcpkg-cache-restore set up, but only when this run built a package that was not in
the cache, so an unchanged run does not store another copy.
inputs:
name:
description: The same name that was given to vcpkg-cache-restore.
required: true
runs:
using: composite
steps:
- id: built
shell: bash
run: |
dir="$(cygpath -m "$RUNNER_TEMP" 2>/dev/null || echo "$RUNNER_TEMP")/vcpkg-bincache"
if [ -n "$(find "$dir" -name '*.zip' -newer "$dir/.restored" -print -quit)" ]; then
echo "any=true" >> "$GITHUB_OUTPUT"
# Drop the zips no installed package uses (an older compiler, vcpkg commit or port
# version), or every later entry carries them along and the entry only grows.
status="$VCPKG_ROOT/installed/vcpkg/status"
if [ -s "$status" ]; then
keep="$(sed -n 's/^Abi: //p' "$status" | tr -d '\r')"
removed=0
while read -r z; do
grep -qxF "$(basename "$z" .zip)" <<<"$keep" || { rm -f "$z"; removed=$((removed + 1)); }
done < <(find "$dir" -name '*.zip')
echo "Kept $(find "$dir" -name '*.zip' | wc -l | tr -d ' ') package zip(s), removed $removed."
else
echo "::warning::$status not found: saving every zip, so the entry keeps the old packages."
fi
fi
- if: steps.built.outputs.any == 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ runner.temp }}/vcpkg-bincache
key: vcpkg-bin-${{ runner.os }}-${{ runner.arch }}-${{ inputs.name }}-${{ github.run_id }}-${{ github.run_attempt }}
@@ -14,9 +14,9 @@
# (https://github.com/rustdesk/rustdesk/issues/17143). DialogTextField keeps 3.24's desktop
# behavior; 3.24 has no selectAllOnFocus parameter, hence the patch.
#
# Used by BOTH arm64 builds (flutter-build.yml) and their shared bridge artifact (bridge.yml) so
# they share an identical 3.44 source state -- the generated *.freezed.dart must compile against
# the same Flutter/freezed version the arm64 builds resolve.
# Used by the arm64 builds and the Linux riscv64 build (flutter-build.yml) and their shared bridge
# artifact (bridge.yml) so they share an identical 3.44 source state -- the generated
# *.freezed.dart must compile against the same Flutter/freezed version those builds resolve.
#
# Remove this script (and commit the changes) once upstream bumps Flutter across the board.
#
@@ -24,11 +24,21 @@
# sources are CRLF on the windows-11-arm runner; the substitutions below are anchor-free and
# therefore CRLF-safe. The calls are GNU sed (`sed -i` without a suffix); the macOS arm64 job
# puts GNU sed first on PATH because BSD sed rejects them.
#
# flutter_3.44_pubspec.lock.diff is a diff against flutter/pubspec.lock holding the entries that
# resolve differently under Flutter 3.44 with the bumps below: mostly packages the Flutter SDK
# pins, plus the bumped ones. Every other package keeps following the committed lock, and a
# change there that the diff no longer fits fails here or at `flutter pub get --enforce-lockfile`
# instead of resolving live. Moving FLUTTER_WINDOWS_ARM_VERSION, FLUTTER_MACOS_ARM_VERSION,
# FLUTTER_RISCV64_VERSION or the 3.44 bridge to a release whose SDK pins differ needs a new diff.
# To regenerate it, with that Flutter on PATH: make the two pubspec.yaml bumps below by hand, run
# `flutter pub get` in flutter/, and save `git diff flutter/pubspec.lock` to that file.
set -euo pipefail
readonly NO_MATCHES=0
readonly SINGLE_MATCH=1
readonly THEME_MATCHES=2
readonly CONNECTION_PAGE=flutter/lib/desktop/pages/connection_page.dart
has_exact_count() {
local -r expected_count="$1"
@@ -84,6 +94,15 @@ validate_patch_inputs() {
echo "Flutter 3.44 source patch input is missing or unreadable: flutter/lib/common/widgets/dialog.dart" >&2
return 1
fi
if [[ ! -f "$CONNECTION_PAGE" || ! -r "$CONNECTION_PAGE" ]]; then
echo "Flutter 3.44 source patch input is missing or unreadable: $CONNECTION_PAGE" >&2
return 1
fi
}
# The lock diff reverses only once applied, so a restored pubspec.lock is not taken as patched.
has_lock_patch() {
sed 's/\r$//' .github/patches/flutter_3.44_pubspec.lock.diff | git apply --reverse --check 2>/dev/null
}
is_complete_patch_state() {
@@ -104,7 +123,8 @@ is_complete_patch_state() {
'scrollbarTheme: scrollbarThemeDark,' 'backgroundColor: Color(0xFF18191E),' \
flutter/lib/common.dart &&
has_exact_count "$SINGLE_MATCH" 'selectAllOnFocus: isDesktop ? false : null,' \
flutter/lib/common/widgets/dialog.dart
flutter/lib/common/widgets/dialog.dart &&
has_exact_count "$SINGLE_MATCH" 'selectAllOnFocus: isDesktop ? false : null,' "$CONNECTION_PAGE"
}
is_unpatched_state() {
@@ -120,17 +140,19 @@ is_unpatched_state() {
has_exact_count "$NO_MATCHES" 'google_fonts: ^8.1.0' flutter/pubspec.yaml &&
has_exact_count "$SINGLE_MATCH" 'inputFormatters: inputFormatters,' \
flutter/lib/common/widgets/dialog.dart &&
has_exact_count "$NO_MATCHES" 'selectAllOnFocus' flutter/lib/common/widgets/dialog.dart
has_exact_count "$NO_MATCHES" 'selectAllOnFocus' flutter/lib/common/widgets/dialog.dart &&
has_exact_count "$SINGLE_MATCH" 'controller: fieldTextEditingController,' "$CONNECTION_PAGE" &&
has_exact_count "$NO_MATCHES" 'selectAllOnFocus' "$CONNECTION_PAGE"
}
if ! validate_patch_inputs; then
exit 1
fi
if is_complete_patch_state; then
if is_complete_patch_state && has_lock_patch; then
echo "Flutter 3.44 source patches already applied."
git --no-pager diff -- flutter/lib/common.dart flutter/pubspec.yaml \
flutter/lib/common/widgets/dialog.dart
flutter/lib/common/widgets/dialog.dart "$CONNECTION_PAGE"
exit 0
fi
@@ -139,6 +161,10 @@ if ! is_unpatched_state; then
exit 1
fi
# The 3.44 lock entries (see the header), first so a diff that no longer fits stops the script
# before any source is touched. Both sides go in as LF, whatever the checkout made them.
sed -i 's/\r$//' flutter/pubspec.lock
sed 's/\r$//' .github/patches/flutter_3.44_pubspec.lock.diff | git apply
# ThemeData API renames (Flutter 3.27+):
sed -i 's/dialogTheme: DialogTheme(/dialogTheme: DialogThemeData(/g' flutter/lib/common.dart
sed -i 's/tabBarTheme: const TabBarTheme(/tabBarTheme: const TabBarThemeData(/g' flutter/lib/common.dart
@@ -152,6 +178,10 @@ sed -i 's/google_fonts: \^6.2.1/google_fonts: ^8.1.0/' flutter/pubspec.yaml
# DialogTextField keeps the caret when a desktop field regains focus (see the header):
sed -i 's/inputFormatters: inputFormatters,/inputFormatters: inputFormatters,\
selectAllOnFocus: isDesktop ? false : null,/' flutter/lib/common/widgets/dialog.dart
# Refreshing suggestions rewrites the remote ID and invalidates its selection.
# Flutter 3.44 then applies the focus selection policy even while the field stays focused.
sed -i 's/controller: fieldTextEditingController,/controller: fieldTextEditingController,\
selectAllOnFocus: isDesktop ? false : null,/' "$CONNECTION_PAGE"
# Fail loudly if any expected substitution did not produce the complete state.
if ! is_complete_patch_state; then
@@ -160,4 +190,4 @@ if ! is_complete_patch_state; then
fi
git --no-pager diff -- flutter/lib/common.dart flutter/pubspec.yaml \
flutter/lib/common/widgets/dialog.dart
flutter/lib/common/widgets/dialog.dart "$CONNECTION_PAGE"
@@ -12,7 +12,7 @@
#
# Idempotent. To undo the source changes locally:
# git checkout -- flutter/lib/common.dart flutter/lib/common/widgets/dialog.dart \
# flutter/pubspec.yaml flutter/pubspec.lock
# flutter/lib/desktop/pages/connection_page.dart flutter/pubspec.yaml flutter/pubspec.lock
set -euo pipefail
flutter --version | grep -q "Flutter 3\.44\." || {
@@ -25,7 +25,7 @@ flutter --version | grep -q "Flutter 3\.44\." || {
bash .github/patches/apply_flutter_3.44_source_patches.sh
# Populate the pub cache with the 3.44 dependency resolution.
(cd flutter && flutter pub get)
(cd flutter && flutter pub get --enforce-lockfile)
# qr_code_scanner 1.0.1 (unmaintained) reads platformViewRegistry from
# dart:ui, which Flutter 3.44 removed; point it at dart:ui_web instead. The
@@ -0,0 +1,319 @@
diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock
index 4130a49b5..981c8386c 100644
--- a/flutter/pubspec.lock
+++ b/flutter/pubspec.lock
@@ -5,15 +5,10 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
- sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
+ sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
url: "https://pub.dev"
source: hosted
- version: "72.0.0"
- _macros:
- dependency: transitive
- description: dart
- source: sdk
- version: "0.3.2"
+ version: "67.0.0"
after_layout:
dependency: transitive
description:
@@ -26,10 +21,10 @@ packages:
dependency: transitive
description:
name: analyzer
- sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
+ sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
url: "https://pub.dev"
source: hosted
- version: "6.7.0"
+ version: "6.4.1"
animations:
dependency: transitive
description:
@@ -146,18 +141,18 @@ packages:
dependency: "direct dev"
description:
name: build_runner
- sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d"
+ sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7"
url: "https://pub.dev"
source: hosted
- version: "2.4.13"
+ version: "2.4.11"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
- sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0
+ sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe
url: "https://pub.dev"
source: hosted
- version: "7.3.2"
+ version: "7.3.1"
built_collection:
dependency: transitive
description:
@@ -242,10 +237,10 @@ packages:
dependency: transitive
description:
name: code_builder
- sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e"
+ sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37
url: "https://pub.dev"
source: hosted
- version: "4.10.1"
+ version: "4.10.0"
collection:
dependency: transitive
description:
@@ -298,10 +293,10 @@ packages:
dependency: transitive
description:
name: dart_style
- sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
+ sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
url: "https://pub.dev"
source: hosted
- version: "2.3.7"
+ version: "2.3.6"
dash_chat_2:
dependency: "direct main"
description:
@@ -397,10 +392,10 @@ packages:
dependency: "direct main"
description:
name: extended_text
- sha256: "38c1cac571d6eaf406f4b80040c1f88561e7617ad90795aac6a1be0a8d0bb676"
+ sha256: "7f382de3af12992e34bd72ddd36becf90c4720900af126cb9859f0189af71ffe"
url: "https://pub.dev"
source: hosted
- version: "14.0.0"
+ version: "13.0.0"
extended_text_library:
dependency: transitive
description:
@@ -659,10 +654,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
- sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
+ sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1
url: "https://pub.dev"
source: hosted
- version: "2.5.7"
+ version: "2.5.2"
freezed_annotation:
dependency: "direct main"
description:
@@ -771,10 +766,10 @@ packages:
dependency: transitive
description:
name: image_picker_android
- sha256: "82652a75e3dd667a91187769a6a2cc81bd8c111bbead698d8e938d2b63e5e89a"
+ sha256: "8c5abf0dcc24fe6e8e0b4a5c0b51a5cf30cefdf6407a3213dae61edc75a70f56"
url: "https://pub.dev"
source: hosted
- version: "0.8.12+21"
+ version: "0.8.12+12"
image_picker_for_web:
dependency: transitive
description:
@@ -859,18 +854,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
+ sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev"
source: hosted
- version: "10.0.5"
+ version: "10.0.4"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
+ sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev"
source: hosted
- version: "3.0.5"
+ version: "3.0.3"
leak_tracker_testing:
dependency: transitive
description:
@@ -895,14 +890,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
- macros:
- dependency: transitive
- description:
- name: macros
- sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
@@ -915,26 +902,26 @@ packages:
dependency: transitive
description:
name: material_color_utilities
- sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+ sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
- version: "0.11.1"
+ version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
- sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
+ sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
- version: "1.15.0"
+ version: "1.12.0"
mime:
dependency: transitive
description:
name: mime
- sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
+ sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a"
url: "https://pub.dev"
source: hosted
- version: "2.0.0"
+ version: "1.0.6"
nested:
dependency: transitive
description:
@@ -1011,10 +998,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
- sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
+ sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7"
url: "https://pub.dev"
source: hosted
- version: "2.2.15"
+ version: "2.2.10"
path_provider_foundation:
dependency: transitive
description:
@@ -1264,10 +1251,10 @@ packages:
dependency: transitive
description:
name: sqflite_common
- sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709"
+ sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4"
url: "https://pub.dev"
source: hosted
- version: "2.5.4+6"
+ version: "2.5.4"
stack_trace:
dependency: transitive
description:
@@ -1304,10 +1291,10 @@ packages:
dependency: transitive
description:
name: synchronized
- sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225"
+ sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558"
url: "https://pub.dev"
source: hosted
- version: "3.3.0+3"
+ version: "3.1.0+1"
term_glyph:
dependency: transitive
description:
@@ -1320,10 +1307,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
+ sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
- version: "0.7.2"
+ version: "0.7.0"
texture_rgba_renderer:
dependency: "direct main"
description:
@@ -1361,10 +1348,10 @@ packages:
dependency: transitive
description:
name: typed_data
- sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
+ sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
- version: "1.4.0"
+ version: "1.3.2"
uni_links:
dependency: "direct main"
description:
@@ -1418,10 +1405,10 @@ packages:
dependency: transitive
description:
name: url_launcher_android
- sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
+ sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79
url: "https://pub.dev"
source: hosted
- version: "6.3.14"
+ version: "6.3.9"
url_launcher_ios:
dependency: "direct main"
description:
@@ -1522,10 +1509,10 @@ packages:
dependency: transitive
description:
name: video_player_android
- sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898"
+ sha256: e343701aa890b74a863fa460f5c0e628127ed06a975d7d9af6b697133fb25bdf
url: "https://pub.dev"
source: hosted
- version: "2.7.16"
+ version: "2.7.1"
video_player_avfoundation:
dependency: transitive
description:
@@ -1562,10 +1549,10 @@ packages:
dependency: transitive
description:
name: vm_service
- sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
+ sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev"
source: hosted
- version: "14.2.5"
+ version: "14.2.1"
wakelock_plus:
dependency: "direct main"
description:
@@ -1610,10 +1597,10 @@ packages:
dependency: "direct main"
description:
name: win32
- sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
+ sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a"
url: "https://pub.dev"
source: hosted
- version: "5.10.1"
+ version: "5.5.4"
win32_registry:
dependency: transitive
description:
@@ -1697,5 +1684,5 @@ packages:
source: hosted
version: "0.2.4"
sdks:
- dart: ">=3.5.0 <4.0.0"
- flutter: ">=3.24.0"
+ dart: ">=3.4.0 <4.0.0"
+ flutter: ">=3.22.0"
@@ -0,0 +1,296 @@
diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock
index 4130a49b5..264f6bde5 100644
--- a/flutter/pubspec.lock
+++ b/flutter/pubspec.lock
@@ -5,15 +5,10 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
- sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834
+ sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
url: "https://pub.dev"
source: hosted
- version: "72.0.0"
- _macros:
- dependency: transitive
- description: dart
- source: sdk
- version: "0.3.2"
+ version: "67.0.0"
after_layout:
dependency: transitive
description:
@@ -26,10 +21,10 @@ packages:
dependency: transitive
description:
name: analyzer
- sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139
+ sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
url: "https://pub.dev"
source: hosted
- version: "6.7.0"
+ version: "6.4.1"
animations:
dependency: transitive
description:
@@ -202,10 +197,10 @@ packages:
dependency: transitive
description:
name: characters
- sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.4.1"
charcode:
dependency: transitive
description:
@@ -234,10 +229,10 @@ packages:
dependency: transitive
description:
name: clock
- sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
- version: "1.1.1"
+ version: "1.1.2"
code_builder:
dependency: transitive
description:
@@ -250,10 +245,10 @@ packages:
dependency: transitive
description:
name: collection
- sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
+ sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
- version: "1.18.0"
+ version: "1.19.1"
contextmenu:
dependency: "direct main"
description:
@@ -298,10 +293,10 @@ packages:
dependency: transitive
description:
name: dart_style
- sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab"
+ sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
url: "https://pub.dev"
source: hosted
- version: "2.3.7"
+ version: "2.3.6"
dash_chat_2:
dependency: "direct main"
description:
@@ -397,10 +392,10 @@ packages:
dependency: "direct main"
description:
name: extended_text
- sha256: "38c1cac571d6eaf406f4b80040c1f88561e7617ad90795aac6a1be0a8d0bb676"
+ sha256: d8f4a6e2676505b54dc0d5f5e8de9020667b402e9c1b3a8b030a83e568c99654
url: "https://pub.dev"
source: hosted
- version: "14.0.0"
+ version: "15.0.2"
extended_text_library:
dependency: transitive
description:
@@ -413,10 +408,10 @@ packages:
dependency: transitive
description:
name: fake_async
- sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.3.3"
ffi:
dependency: "direct main"
description:
@@ -659,10 +654,10 @@ packages:
dependency: "direct dev"
description:
name: freezed
- sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e"
+ sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1
url: "https://pub.dev"
source: hosted
- version: "2.5.7"
+ version: "2.5.2"
freezed_annotation:
dependency: "direct main"
description:
@@ -699,10 +694,10 @@ packages:
dependency: "direct main"
description:
name: google_fonts
- sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82
+ sha256: e3cb3ee6b47fd2472c23de6da5744796a4da195137759ddb3fbcc9467b7b3c7d
url: "https://pub.dev"
source: hosted
- version: "6.2.1"
+ version: "8.2.1"
graphs:
dependency: transitive
description:
@@ -859,26 +854,26 @@ packages:
dependency: transitive
description:
name: leak_tracker
- sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
+ sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
- version: "10.0.5"
+ version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
- sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
+ sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
- version: "3.0.5"
+ version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
- sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
lints:
dependency: transitive
description:
@@ -895,38 +890,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
- macros:
- dependency: transitive
- description:
- name: macros
- sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
- url: "https://pub.dev"
- source: hosted
- version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
name: matcher
- sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
+ sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
url: "https://pub.dev"
source: hosted
- version: "0.12.16+1"
+ version: "0.12.19"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
+ sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
url: "https://pub.dev"
source: hosted
- version: "0.11.1"
+ version: "0.13.0"
meta:
dependency: transitive
description:
name: meta
- sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
+ sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
url: "https://pub.dev"
source: hosted
- version: "1.15.0"
+ version: "1.18.0"
mime:
dependency: transitive
description:
@@ -987,10 +974,10 @@ packages:
dependency: "direct main"
description:
name: path
- sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
+ sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
- version: "1.9.0"
+ version: "1.9.1"
path_parsing:
dependency: transitive
description:
@@ -1235,7 +1222,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
- version: "0.0.99"
+ version: "0.0.0"
source_gen:
dependency: transitive
description:
@@ -1272,18 +1259,18 @@ packages:
dependency: transitive
description:
name: stack_trace
- sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
+ sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
- version: "1.11.1"
+ version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
- sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
+ sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
stream_transform:
dependency: transitive
description:
@@ -1320,10 +1307,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
+ sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
url: "https://pub.dev"
source: hosted
- version: "0.7.2"
+ version: "0.7.11"
texture_rgba_renderer:
dependency: "direct main"
description:
@@ -1506,10 +1493,10 @@ packages:
dependency: "direct main"
description:
name: vector_math
- sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
- version: "2.1.4"
+ version: "2.2.0"
video_player:
dependency: transitive
description:
@@ -1697,5 +1684,5 @@ packages:
source: hosted
version: "0.2.4"
sdks:
- dart: ">=3.5.0 <4.0.0"
- flutter: ">=3.24.0"
+ dart: ">=3.10.0 <4.0.0"
+ flutter: ">=3.38.0"
+99
View File
@@ -0,0 +1,99 @@
<!--
Read these before opening a PR. They apply whether the code is AI-generated or written by hand:
- Feature PRs need maintainer approval first: https://github.com/rustdesk/rustdesk/discussions/17223
- End-to-end testing on real devices is mandatory: https://github.com/rustdesk/rustdesk/discussions/17225
PRs that skip these requirements, leave the sections below empty, or have an
unjustifiably large regression surface may be closed without review.
Translation-only, docs-only, and CI-only PRs may skip the test, AI cross-review, and regression sections.
-->
## Type
- [ ] Bug fix
- [ ] Feature / enhancement
- [ ] Translation / documentation / CI
## Linked issue or approval
<!--
Bug fix: link the issue (Fixes #...).
Feature: link the discussion where a maintainer approved it. Feature PRs without
prior approval may be closed without review. Approval of the idea does not
guarantee that the implementation will be accepted.
-->
Fixes #
Feature approval ([required for features](https://github.com/rustdesk/rustdesk/discussions/17223)):
## What and why
<!-- The problem, the root cause (for bug fixes), and how this change addresses it. Keep it short. -->
## End-to-end test on real devices
<!--
Compiling, unit tests, CI, code reading, and AI analysis are not substitutes for this.
If you could not reproduce the issue or lack the environment, say so below.
Do not claim a fix based on reasoning alone.
-->
**Environment** (each device: OS and version, controlling or controlled side; direct or relay; public or self-hosted server):
-
**Reproduced on master** (bug fixes: how you triggered the original issue):
**Steps and actual results with this PR:**
1.
**Not tested / could not reproduce:**
## Screenshots / video
<!--
Required if this PR adds, changes, or affects any UI, including side effects on
existing UI. Upload a video or screenshots from the real devices above that prove
the change; for changes to existing UI, show before and after.
Write "No UI impact" if there is none.
-->
## AI cross-review
<!--
Have this diff reviewed by AI models other than the one that wrote it.
Reviewers can be wrong or hallucinate, so do not apply findings blindly: judge
each one yourself. Fix the real issues; a finding you leave unfixed is fine if
you can explain why.
As proof, paste each model's review output (or a share link to the conversation)
and, for each finding, what you decided and why. Put long output in a <details> block.
-->
**Models used:**
**Review output, and your decision on each finding:**
## Regression surface
<!--
List the existing files and runtime paths whose behavior changes, why each change
is unavoidable, and which existing functionality around them you re-tested.
Cover backward compatibility (older clients/servers) and other platforms.
New code that only runs when the new feature is used does not need to be listed.
-->
## Known limits
<!-- Optional: corner cases deliberately left unhandled. -->
## Checklist
- [ ] Features: a maintainer approved this in a discussion before I started, as required by [#17223](https://github.com/rustdesk/rustdesk/discussions/17223). Unapproved feature PRs may be closed without review.
- [ ] I tested this end to end on real devices on every platform it touches, as required by [#17225](https://github.com/rustdesk/rustdesk/discussions/17225), and the results above come from those runs.
- [ ] Bug fixes: I reproduced the original issue on master and confirmed this PR fixes it.
- [ ] UI added, changed, or affected: I uploaded a video or screenshots above that prove the change.
- [ ] I re-tested the existing functionality listed under "Regression surface".
- [ ] The diff contains only what this change needs: no unrelated refactoring, formatting, renames, or drive-by fixes.
- [ ] I had this diff cross-reviewed by different AI models, not only the one that wrote it, and included their review output above. I judged each finding myself instead of applying it blindly: I fixed the real issues and can explain why I left the others.
+13
View File
@@ -0,0 +1,13 @@
# Locked, hash-checked dependencies of res/job.py for the release-signing steps.
# Install with: pip3 install --only-binary=:all: --require-hashes -r .github/requirements/sign-files.txt
# argparse is part of the standard library and must not be installed from PyPI.
requests==2.32.5 \
--hash=sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6
urllib3==2.6.3 \
--hash=sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4
idna==3.20 \
--hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c
certifi==2026.10.23 \
--hash=sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1
charset-normalizer==3.5.2 \
--hash=sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685
+24 -5
View File
@@ -4,6 +4,11 @@ name: Build flutter-rust-bridge
on:
workflow_call:
inputs:
# false for builds that publish: see the note above `jobs:` in flutter-build.yml.
use-cache:
type: boolean
default: true
env:
CARGO_EXPAND_VERSION: "1.0.95"
@@ -18,6 +23,8 @@ jobs:
matrix:
job:
# Default bridge for every platform still on Flutter 3.24.5 (generated with 3.22.3).
# Changing its flutter-version needs .github/patches/flutter_3.22_bridge_pubspec.lock.diff
# regenerated (see "Install flutter rust bridge deps").
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-22.04,
@@ -25,18 +32,21 @@ jobs:
flutter-version: "3.22.3",
artifact-name: "bridge-artifact",
}
# Dedicated bridge for the Windows and macOS arm64 builds (Flutter 3.44); runs in parallel.
# Dedicated bridge for the Flutter 3.44 builds (Windows/macOS arm64, Linux riscv64); runs in parallel.
# Its lock comes from .github/patches/flutter_3.44_pubspec.lock.diff (see the header of
# apply_flutter_3.44_source_patches.sh before changing flutter-version).
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-22.04,
extra-build-args: "",
flutter-version: "3.44.8",
flutter-version: "3.44.9",
artifact-name: "bridge-artifact-flutter-3.44",
}
steps:
- name: Checkout source code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
submodules: recursive
- name: Install prerequisites
@@ -66,11 +76,15 @@ jobs:
components: "rustfmt"
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
if: ${{ inputs.use-cache }}
with:
prefix-key: bridge-${{ matrix.job.os }}
# As in ci.yml: PRs restore master's entry instead of each saving its own.
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Cache Bridge
id: cache-bridge
if: ${{ inputs.use-cache }}
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3
with:
path: /tmp/flutter_rust_bridge
@@ -81,7 +95,7 @@ jobs:
with:
channel: "stable"
flutter-version: ${{ matrix.job.flutter-version }}
cache: true
cache: ${{ inputs.use-cache }}
- name: Install flutter rust bridge deps
shell: bash
@@ -91,12 +105,17 @@ jobs:
if [[ "${{ matrix.job.flutter-version }}" == "3.22.3" ]]; then
# Default Flutter 3.22.3: extended_text 14 needs a newer Dart, so downgrade for resolution.
sed -i -e 's/extended_text: 14.0.0/extended_text: 13.0.0/g' flutter/pubspec.yaml
# The entries Flutter 3.22.3 with that downgrade resolves differently (mostly packages its
# SDK pins), as a diff against flutter/pubspec.lock so every other package keeps following
# it. To regenerate, with Flutter 3.22.3 on PATH: run the sed above and `flutter pub get`
# in flutter/, then save `git diff flutter/pubspec.lock` to it.
git apply .github/patches/flutter_3.22_bridge_pubspec.lock.diff
else
# Flutter 3.44 bridge for Windows/macOS arm64: match those builds' source/pubspec state so
# Flutter 3.44 bridge (Windows/macOS arm64, Linux riscv64): match those builds' source/pubspec state so
# the generated *.freezed.dart compiles against the same Flutter/freezed they resolve.
bash .github/patches/apply_flutter_3.44_source_patches.sh
fi
pushd flutter && flutter pub get && popd
pushd flutter && flutter pub get --enforce-lockfile && popd
- name: Run flutter rust bridge
run: |
+13
View File
@@ -109,6 +109,7 @@ jobs:
- name: Checkout source code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
submodules: recursive
- name: Install prerequisites
@@ -173,6 +174,9 @@ jobs:
rustc -V
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
# PRs restore master's entry; letting each PR save its own ~2 GB evicts the other caches.
save-if: ${{ github.ref == 'refs/heads/master' }}
- name: Build
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1
@@ -248,3 +252,12 @@ jobs:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --locked --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
# drm and unix-file-copy-paste are off by default, so the run above compiles none of their tests.
- name: Run drm and unix-file-copy-paste tests
if: matrix.job.target == 'x86_64-unknown-linux-gnu'
shell: bash
run: |
cargo test --locked --target=${{ matrix.job.target }} --lib --features drm,drm-wake
cargo test --locked --target=${{ matrix.job.target }} -p scrap --features drm
cargo test --locked --target=${{ matrix.job.target }} -p clipboard --features unix-file-copy-paste
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -17,7 +17,7 @@ env:
TAG_NAME: "nightly"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_COMMIT_ID: "9e593bb18ea69cc5095e012465dcd675a822ed0d"
VERSION: "1.5.3"
VERSION: "1.5.4"
NDK_VERSION: "r26d"
#signing keys env variable checks
ANDROID_SIGNING_KEY: "${{ secrets.ANDROID_SIGNING_KEY }}"
@@ -88,6 +88,7 @@ jobs:
- name: Checkout source code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
persist-credentials: false
ref: ${{ matrix.job.ref }}
submodules: recursive
@@ -120,6 +121,7 @@ jobs:
run: |
pushd /tmp
wget https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
echo "7031ee75ca2a55c558071701078517c05d959e012dd87833ac6b4a23c5ff52b9 apple-codesign-0.22.0-macos-universal.tar.gz" | shasum -a 256 -c -
tar -zxvf apple-codesign-0.22.0-macos-universal.tar.gz
mv apple-codesign-0.22.0-macos-universal/rcodesign /usr/local/bin
popd
@@ -249,6 +251,7 @@ jobs:
- name: Checkout source code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
persist-credentials: false
ref: ${{ matrix.job.ref }}
submodules: recursive
+156
View File
@@ -0,0 +1,156 @@
name: PR evidence check
# pull_request_target is needed to label and comment on PRs from forks.
# This workflow must never check out or run code from the PR: it only reads
# the PR description and file list through the API.
on:
pull_request_target:
types: [opened, edited, synchronize, reopened, ready_for_review]
permissions:
issues: write
pull-requests: write
concurrency:
group: pr-evidence-check-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check:
if: >-
github.event.pull_request.draft == false &&
github.event.pull_request.user.type != 'Bot' &&
!contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.pull_request.author_association)
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const MARKER = '<!-- pr-evidence-check -->';
const LABEL = 'needs-evidence';
const APPROVAL_POLICY = 'https://github.com/rustdesk/rustdesk/discussions/17223';
const TESTING_POLICY = 'https://github.com/rustdesk/rustdesk/discussions/17225';
const TEMPLATE = 'https://github.com/rustdesk/rustdesk/blob/master/.github/pull_request_template.md';
const pr = context.payload.pull_request;
const { owner, repo } = context.repo;
const issue_number = pr.number;
// PRs opened before the template existed are left alone.
if (new Date(pr.created_at) < new Date('2026-11-24T15:46:22Z')) return;
// author_association can say CONTRIBUTOR for org members with private membership.
try {
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({
owner, repo, username: pr.user.login,
});
if (['admin', 'write'].includes(data.permission)) return;
} catch (e) {
core.info(`permission lookup failed: ${e.status}`);
}
const files = (await github.paginate(github.rest.pulls.listFiles, {
owner, repo, pull_number: issue_number, per_page: 100,
})).map(f => f.filename);
const body = (pr.body || '').replace(/<!--[\s\S]*?-->/g, '');
const LABELS = {
env: /\*\*Environment\*\*(\s*\([^)]*\))?\s*:?/i,
repro: /\*\*Reproduced on master\*\*(\s*\([^)]*\))?\s*:?/i,
steps: /\*\*Steps and actual results with this PR:?\*\*:?/i,
untested: /\*\*Not tested \/ could not reproduce:?\*\*:?/i,
models: /\*\*Models used:?\*\*:?/i,
review: /\*\*Review output[^*\n]*:?\*\*:?/i,
};
// Only the template's own headings end a section, so pasted review output may contain "##".
const HEADINGS = /\n##\s*(Type|Linked issue|What and why|End-to-end test|Screenshots|AI cross-review|Regression surface|Known limits|Checklist)\b/i;
const until = (text, res) => {
const ends = res.map(re => text.search(re)).filter(i => i >= 0);
return text.slice(0, ends.length ? Math.min(...ends) : text.length);
};
function section(key) {
const m = LABELS[key].exec(body);
if (!m) return '';
return until(body.slice(m.index + m[0].length), [...Object.values(LABELS), HEADINGS]);
}
function heading(re) {
const m = re.exec(body);
return m ? until(body.slice(m.index + m[0].length), [HEADINGS]) : '';
}
const filled = text => text.replace(/^\s*(-|\d+\.)\s*$/gm, '').trim().length > 0;
const ticked = re => new RegExp(String.raw`^\s*-\s*\[[xX]\]\s*` + re.source, 'm').test(body);
const missing = [];
const docsOnly = files.length > 0 &&
files.every(f => /^(src\/lang\/|docs\/|\.github\/(?!patches\/))|\.md$/.test(f));
if (!docsOnly) {
if (!/^## End-to-end test on real devices/m.test(body)) {
missing.push(`The test sections of the [PR template](${TEMPLATE}) seem to be missing. Please add them back and fill them in.`);
} else {
if (!filled(section('env'))) {
missing.push('**Environment**: the real devices you tested on (OS and version, controlling or controlled side, and so on).');
}
if (ticked(/Bug fix\s*$/) && !filled(section('repro')) && !/reproduc/i.test(section('untested'))) {
missing.push('**Reproduced on master**: how you triggered the original issue on master, or under **Not tested / could not reproduce** why you could not.');
}
if (!filled(section('steps'))) {
missing.push('**Steps and actual results with this PR**: what you did on those devices and what happened.');
}
const review = section('review');
const proof = /https?:\/\/|<details/i.test(review) || review.replace(/\s+/g, ' ').trim().length >= 100;
if (!filled(section('models')) || !proof) {
missing.push('**AI cross-review**: the AI models, other than the one that wrote the code, that reviewed this diff, with their review output (pasted or a share link) and your decision on each finding. Findings can be wrong, so you do not have to fix all of them, but say why you left one.');
}
}
}
const touchesUi = files.some(f => /^(flutter\/lib\/|src\/ui\/)/.test(f));
const hasMedia = /github\.com\/user-attachments\/(assets|files)\/|user-images\.githubusercontent\.com\/|<img\s|<video\s|https?:\/\/\S+\.(png|jpe?g|gif|webp|mp4|mov|webm)\b/i.test(body) ||
/https?:\/\//.test(heading(/^##\s*Screenshots[^\n]*/m));
if (touchesUi && !hasMedia && !/no ui impact/i.test(body)) {
missing.push('**Screenshots / video**: this PR changes UI code, so please upload a video or screenshots that show the change (before and after for existing UI), or write "No UI impact" if there is none.');
}
if (ticked(/Feature \/ enhancement/)) {
const POLICIES = ['17223', '17225'];
const approval = heading(/^Feature approval/m).replace(/\[required for features\]\([^)]*\)/, '');
const refs = [
...approval.matchAll(/(?:#|rustdesk\/rustdesk\/discussions\/)(\d+)/g),
...body.matchAll(/rustdesk\/rustdesk\/discussions\/(\d+)/g),
].map(m => m[1]).filter(n => !POLICIES.includes(n));
if (refs.length === 0) {
missing.push(`**Feature approval**: a link to the discussion where a maintainer approved this feature ([why](${APPROVAL_POLICY})).`);
}
}
const comments = await github.paginate(github.rest.issues.listComments, {
owner, repo, issue_number, per_page: 100,
});
const previous = comments.find(c => c.user.type === 'Bot' && c.body.includes(MARKER));
const ignore = (...codes) => e => { if (!codes.includes(e.status)) throw e; };
if (missing.length === 0) {
await github.rest.issues.removeLabel({ owner, repo, issue_number, name: LABEL }).catch(ignore(404));
const done = `${MARKER}\nThanks for updating the description. The automated check has nothing more to ask for.`;
if (previous && previous.body !== done) {
await github.rest.issues.updateComment({ owner, repo, comment_id: previous.id, body: done });
}
return;
}
const text = [
MARKER,
'Thanks for the contribution! This is an automated reminder. Before a maintainer reviews this PR, please add the following to the PR description:',
'',
...missing.map(m => `- ${m}`),
'',
`We ask for these because of [feature approval](${APPROVAL_POLICY}) and [end-to-end testing on real devices](${TESTING_POLICY}). This check runs again when you edit the description.`,
].join('\n');
await github.rest.issues.createLabel({
owner, repo, name: LABEL, color: 'fbca04',
description: 'PR description is missing test evidence or approval',
}).catch(ignore(422));
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: [LABEL] });
if (!previous) {
await github.rest.issues.createComment({ owner, repo, issue_number, body: text });
} else if (previous.body !== text) {
await github.rest.issues.updateComment({ owner, repo, comment_id: previous.id, body: text });
}
+1
View File
@@ -60,3 +60,4 @@ flutter/web/
/third_party/libdrmtap/
# Local git worktrees
.worktrees/
flutter/*.sh
+2 -2
View File
@@ -193,8 +193,8 @@ A refactor added to cover a corner case rarely converges. Each new counter, time
* If the test diff is more than twice the fix, cut it back to the tests that pin the reported behavior. A state that needs long setup to reach is usually too rare to fix.
* When the number of tests needed to describe the behavior keeps growing, the implementation is too complex: simplify it instead of adding tests.
* Dart tests go in `flutter/test/*_test.dart`, nowhere else: CI runs `flutter test` over that directory and nothing outside it. It runs on the VM, so a `@TestOn('browser')` suite runs in no CI job.
* Rust unit tests go in a `#[cfg(test)]` module beside the code. CI runs `cargo test --workspace` with the default features on x86_64 Linux, `cargo test --lib` on the root package with the release feature set on macOS and Windows plus `-p clipboard` there, and on Linux the `drm` test modules by name plus the `clipboard` package with `unix-file-copy-paste`. On macOS and Windows, a platform-gated test in another workspace crate runs only if that platform's job names the crate with `-p`. Gate a test module on a feature or `target_os` only when the code under test is gated; a pure helper that only a gated path calls gets `#[cfg(any(feature = "...", test))]`, so its tests run everywhere.
* A test behind a feature that no CI build enables needs a `cargo test` line in `.github/workflows/flutter-build.yml` that names it. In the Linux drm job, wrap it in `run_drm_tests` so a filter that matches nothing fails instead of passing.
* Rust unit tests go in a `#[cfg(test)]` module beside the code. CI runs `cargo test --workspace` with the default features on x86_64 Linux, `cargo test --lib` on the root package with the release feature set on macOS and Windows plus `-p clipboard` there, and on x86_64 Linux also the root package with `drm,drm-wake`, `scrap` with `drm` and `clipboard` with `unix-file-copy-paste`. On macOS and Windows, a platform-gated test in another workspace crate runs only if that platform's job names the crate with `-p`. Gate a test module on a feature or `target_os` only when the code under test is gated; a pure helper that only a gated path calls gets `#[cfg(any(feature = "...", test))]`, so its tests run everywhere.
* A test behind a feature that no CI build enables needs a `cargo test` line that names it in a CI workflow, such as the Linux one in `.github/workflows/ci.yml`.
* Web core tests are `flutter/web/js/src/*.test.ts`, run by jest in that repository's own CI.
## Reviewing a PR
Generated
+16 -15
View File
@@ -1717,7 +1717,7 @@ dependencies = [
[[package]]
name = "cpal"
version = "0.15.3"
source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#96d4da121b7d949677ac5b6887413a9185fd7f39"
source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#3361bd6aa877e110f6df6cd98dc7c7f6427cb79b"
dependencies = [
"alsa",
"cidre",
@@ -2749,7 +2749,7 @@ dependencies = [
[[package]]
name = "filedescriptor"
version = "0.8.2"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#80174f8009f41565f0fa8c66dab90d4f9211ae16"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#a181db18cbd59fc797ad5f34a06569de3dfab927"
dependencies = [
"libc",
"thiserror 1.0.61",
@@ -5046,7 +5046,7 @@ dependencies = [
[[package]]
name = "nokhwa"
version = "0.10.7"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
dependencies = [
"flume",
"image 0.25.1",
@@ -5061,7 +5061,7 @@ dependencies = [
[[package]]
name = "nokhwa-bindings-linux"
version = "0.1.1"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
dependencies = [
"nokhwa-core",
"v4l",
@@ -5070,7 +5070,7 @@ dependencies = [
[[package]]
name = "nokhwa-bindings-macos"
version = "0.2.2"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
dependencies = [
"block",
"cocoa-foundation",
@@ -5086,7 +5086,7 @@ dependencies = [
[[package]]
name = "nokhwa-bindings-windows"
version = "0.4.2"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
dependencies = [
"dlopen",
"lazy_static",
@@ -5098,7 +5098,7 @@ dependencies = [
[[package]]
name = "nokhwa-core"
version = "0.1.5"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#c2f74662b6ce117f7f94301693fdfadc0b1ec91a"
source = "git+https://github.com/rustdesk-org/nokhwa.git?branch=fix_from_raw_parts#f149b074d081004920495f04444503a2379ca795"
dependencies = [
"bytes",
"image 0.25.1",
@@ -6197,7 +6197,7 @@ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
[[package]]
name = "portable-pty"
version = "0.8.1"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#80174f8009f41565f0fa8c66dab90d4f9211ae16"
source = "git+https://github.com/rustdesk-org/wezterm?branch=rustdesk/pty_based_0.8.1#a181db18cbd59fc797ad5f34a06569de3dfab927"
dependencies = [
"anyhow",
"bitflags 1.3.2",
@@ -6748,7 +6748,7 @@ dependencies = [
[[package]]
name = "rdev"
version = "0.5.0-2"
source = "git+https://github.com/rustdesk-org/rdev#0904f23ce496e255461a98848b85c11fa5a62eab"
source = "git+https://github.com/rustdesk-org/rdev#bfb285414f04be94a98063e645c334a9966758ea"
dependencies = [
"cocoa 0.24.1",
"core-foundation 0.9.4",
@@ -7061,7 +7061,7 @@ dependencies = [
[[package]]
name = "rustdesk"
version = "1.5.3"
version = "1.5.4"
dependencies = [
"android-wakelock",
"android_logger",
@@ -7178,7 +7178,7 @@ dependencies = [
[[package]]
name = "rustdesk-portable-packer"
version = "1.5.3"
version = "1.5.4"
dependencies = [
"brotli",
"dirs 5.0.1",
@@ -7255,9 +7255,9 @@ dependencies = [
[[package]]
name = "rustls"
version = "0.23.28"
version = "0.23.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643"
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
dependencies = [
"log",
"once_cell",
@@ -7413,6 +7413,7 @@ dependencies = [
"ndk-context",
"nokhwa",
"num_cpus",
"objc",
"pkg-config",
"quest",
"repng",
@@ -8208,7 +8209,7 @@ dependencies = [
[[package]]
name = "tao"
version = "0.25.0"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#288c219cb0527e509590c2b2d8e7072aa9feb2d3"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#74684bd8b7f565a0edf9412f7403f6433f0d5efb"
dependencies = [
"bitflags 1.3.2",
"cc",
@@ -8248,7 +8249,7 @@ dependencies = [
[[package]]
name = "tao-macros"
version = "0.1.2"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#288c219cb0527e509590c2b2d8e7072aa9feb2d3"
source = "git+https://github.com/rustdesk-org/tao?branch=dev#74684bd8b7f565a0edf9412f7403f6433f0d5efb"
dependencies = [
"proc-macro2 1.0.93",
"quote 1.0.36",
+4 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "rustdesk"
version = "1.5.3"
version = "1.5.4"
authors = ["rustdesk <info@rustdesk.com>"]
edition = "2021"
build= "build.rs"
@@ -283,6 +283,9 @@ name = "RustDesk"
identifier = "com.carriez.rustdesk"
icon = ["res/32x32.png", "res/128x128.png", "res/128x128@2x.png"]
osx_minimum_system_version = "10.14"
# View Camera needs NSCameraUsageDescription or macOS kills the process at the
# camera permission prompt; the Flutter bundle gets it via its own Info.plist.
osx_info_plist_exts = ["res/osx_camera_info.plist"]
#https://github.com/johnthagen/min-sized-rust
[profile.release]
+2 -2
View File
@@ -158,9 +158,9 @@ Please ensure that you run these commands from the root of the RustDesk reposito
## File Structure
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: video codec, config, tcp/udp wrapper, and some other utility functions shared with the server
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: config, tcp/udp wrapper, and some other utility functions shared with the server
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: protobuf, fs functions for file transfer, keyboard and platform code used only by this app
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture and video codecs
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: file copy and paste implementation for Windows, Linux, macOS.
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: obsolete Sciter UI (deprecated)
+18 -17
View File
@@ -18,24 +18,22 @@ AppDir:
id: rustdesk
name: rustdesk
icon: rustdesk
version: 1.5.3
version: 1.5.4
exec: usr/share/rustdesk/rustdesk
exec_args: $@
apt:
arch:
- arm64
allow_unauthenticated: true
sources:
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
# Ubuntu's 2012 and 2018 archive signing keys (both sign focal), exported from ubuntu-keyring:
# gpg --show-keys ubuntu-archive-keyring.asc. apt trusts them for every source below.
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe multiverse
key_url: file:ubuntu-archive-keyring.asc
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe multiverse
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
- sourceline: deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted
- sourceline: deb [arch=arm64] https://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted
universe multiverse
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
include:
- libc6:arm64
- libgtk-3-0
@@ -79,13 +77,16 @@ AppDir:
# AppRun sets these to "$APPDIR/...:$XDG_DATA_DIRS", and setting them at all suppresses the XDG
# defaults, so a host that leaves them unset loses /usr/share and /etc/xdg. gdk-pixbuf 2.43+
# (Arch, Fedora) then finds no glycin loaders and every PNG decode fails, aborting on the first
# remote cursor. The host value goes last: unset it expands to an empty element, which GLib
# resolves against the CWD, and that must not outrank the defaults below.
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:$XDG_CONFIG_DIRS
APPDIR_LIBRARY_PATH: /lib64:/usr/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu/security:$APPDIR/lib/systemd:$APPDIR/usr/lib/aarch64-linux-gnu:$APPDIR/usr/lib/aarch64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/printbackends:$APPDIR/usr/lib/aarch64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/aarch64-linux-gnu/libcanberra-0.30:$APPDIR/usr/lib/aarch64-linux-gnu/pulseaudio:$APPDIR/usr/lib/aarch64-linux-gnu/sasl2:$APPDIR/usr/lib/aarch64-linux-gnu/vdpau:$APPDIR/usr/share/rustdesk/lib:$APPDIR/lib/aarch64
GST_PLUGIN_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
# remote cursor. The host value goes last, after a "/": unset, AppRun expands it to nothing, and
# an empty element would make GLib search the CWD; "/" leaves the root instead, and a set
# value's first absolute path becomes the same "//path".
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:/$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:/$XDG_CONFIG_DIRS
# Host paths come before $APPDIR so Wayland capture uses the host's GStreamer and PipeWire.
# Arch Linux ARM has neither /lib64 nor a multiarch dir on aarch64, only /usr/lib.
APPDIR_LIBRARY_PATH: /lib64:/usr/lib/aarch64-linux-gnu:/usr/lib:$APPDIR/lib/aarch64-linux-gnu:$APPDIR/lib/aarch64-linux-gnu/security:$APPDIR/lib/systemd:$APPDIR/usr/lib/aarch64-linux-gnu:$APPDIR/usr/lib/aarch64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules:$APPDIR/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/printbackends:$APPDIR/usr/lib/aarch64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/aarch64-linux-gnu/libcanberra-0.30:$APPDIR/usr/lib/aarch64-linux-gnu/pulseaudio:$APPDIR/usr/lib/aarch64-linux-gnu/sasl2:$APPDIR/usr/lib/aarch64-linux-gnu/vdpau:$APPDIR/usr/share/rustdesk/lib:$APPDIR/lib/aarch64
GST_PLUGIN_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:/usr/lib/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH: /lib64/gstreamer-1.0:/usr/lib/aarch64-linux-gnu/gstreamer-1.0:/usr/lib/gstreamer-1.0:$APPDIR/usr/lib/aarch64-linux-gnu/gstreamer-1.0
test:
fedora-30:
image: appimagecrafters/tests-env:fedora-30
+17 -14
View File
@@ -18,23 +18,25 @@ AppDir:
id: rustdesk
name: rustdesk
icon: rustdesk
version: 1.5.3
version: 1.5.4
exec: usr/share/rustdesk/rustdesk
exec_args: $@
apt:
arch:
- amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates universe
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted
# Ubuntu's 2012 and 2018 archive signing keys (both sign focal), exported from ubuntu-keyring:
# gpg --show-keys ubuntu-archive-keyring.asc. apt trusts them for every source below.
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal main restricted
key_url: file:ubuntu-archive-keyring.asc
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-updates main restricted
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal universe
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-updates universe
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal multiverse
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-updates multiverse
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-backports main restricted
universe multiverse
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted
- sourceline: deb https://archive.ubuntu.com/ubuntu/ focal-security main restricted
universe multiverse
include:
# https://github.com/rustdesk/rustdesk/issues/9103
@@ -82,10 +84,11 @@ AppDir:
# AppRun sets these to "$APPDIR/...:$XDG_DATA_DIRS", and setting them at all suppresses the XDG
# defaults, so a host that leaves them unset loses /usr/share and /etc/xdg. gdk-pixbuf 2.43+
# (Arch, Fedora) then finds no glycin loaders and every PNG decode fails, aborting on the first
# remote cursor. The host value goes last: unset it expands to an empty element, which GLib
# resolves against the CWD, and that must not outrank the defaults below.
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:$XDG_CONFIG_DIRS
# remote cursor. The host value goes last, after a "/": unset, AppRun expands it to nothing, and
# an empty element would make GLib search the CWD; "/" leaves the root instead, and a set
# value's first absolute path becomes the same "//path".
XDG_DATA_DIRS: $APPDIR/usr/local/share:$APPDIR/usr/share:/usr/local/share:/usr/share:/$XDG_DATA_DIRS
XDG_CONFIG_DIRS: $APPDIR/etc/xdg:/etc/xdg:/$XDG_CONFIG_DIRS
APPDIR_LIBRARY_PATH: /lib64:/usr/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu:$APPDIR/lib/x86_64-linux-gnu/security:$APPDIR/lib/systemd:$APPDIR/usr/lib/x86_64-linux-gnu:$APPDIR/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules:$APPDIR/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/printbackends:$APPDIR/usr/lib/x86_64-linux-gnu/krb5/plugins/preauth:$APPDIR/usr/lib/x86_64-linux-gnu/libcanberra-0.30:$APPDIR/usr/lib/x86_64-linux-gnu/pulseaudio:$APPDIR/usr/lib/x86_64-linux-gnu/sasl2:$APPDIR/usr/lib/x86_64-linux-gnu/vdpau:$APPDIR/usr/share/rustdesk/lib:$APPDIR/lib/x86_64
GST_PLUGIN_PATH: /lib64/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0
GST_PLUGIN_SYSTEM_PATH: /lib64/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0:$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer-1.0
@@ -0,0 +1,41 @@
diff --git a/src/apprun/runtime_interpreter.c b/src/apprun/runtime_interpreter.c
index fe06502..33ddd8e 100644
--- a/src/apprun/runtime_interpreter.c
+++ b/src/apprun/runtime_interpreter.c
@@ -143,6 +143,20 @@ long compare_version_strings(const char *a, const char *b) {
return 0;
}
+/* An empty element, as appending an unset LD_LIBRARY_PATH leaves, makes the dynamic loader search
+ * the current directory. */
+static void apprun_drop_empty_path_elements(char *path) {
+ char *out = path;
+ for (const char *in = path; *in != '\0'; in++) {
+ if (*in == ':' && (out == path || out[-1] == ':'))
+ continue;
+ *out++ = *in;
+ }
+ if (out > path && out[-1] == ':')
+ out--;
+ *out = '\0';
+}
+
void configure_embed_libc() {
#ifdef DEBUG
fprintf(stderr, "APPRUN_DEBUG: using appdir libc\n");
@@ -150,6 +164,7 @@ void configure_embed_libc() {
char *ld_library_path = apprun_shell_expand_variables("$"APPDIR_LIBRARY_PATH_ENV":"
"$"APPDIR_LIBC_LIBRARY_PATH_ENV":"
"$"APPRUN_ENV_ORIG_PREFIX"LD_LIBRARY_PATH", NULL);
+ apprun_drop_empty_path_elements(ld_library_path);
apprun_env_set("LD_LIBRARY_PATH", ld_library_path, "", ld_library_path);
free(ld_library_path);
@@ -161,6 +176,7 @@ void configure_system_libc() {
#endif
char *ld_library_path = apprun_shell_expand_variables("$"APPDIR_LIBRARY_PATH_ENV":"
"$"APPRUN_ENV_ORIG_PREFIX"LD_LIBRARY_PATH", NULL);
+ apprun_drop_empty_path_elements(ld_library_path);
apprun_env_set("LD_LIBRARY_PATH", ld_library_path, "", ld_library_path);
free(ld_library_path);
+6 -2
View File
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
# AppRun v2.0.0, which appimage-builder downloads, splits every argument into a 1 KiB stack
# buffer, so any argument of 1024 bytes or more aborts the AppImage before RustDesk starts.
# Build it with apprun-split-arguments.patch into the path appimage-builder checks before
# downloading. ubuntu:16.04 is what upstream released from, so the host glibc floor is unchanged.
# It also appends the host's LD_LIBRARY_PATH after a ":", so an unset one leaves an empty element
# that makes the loader search the current directory for libraries.
# Build it with apprun-split-arguments.patch and apprun-no-empty-library-path.patch into the path
# appimage-builder checks before downloading. ubuntu:16.04 is what upstream released from, so the
# host glibc floor is unchanged.
set -euo pipefail
arch=$1
@@ -25,6 +28,7 @@ echo "$sha256 $tmp/apprun.tar.gz" | sha256sum -c -
mkdir "$src"
tar -xzf "$tmp/apprun.tar.gz" -C "$src" --strip-components=1
patch -d "$src" -p1 < "$here/apprun-split-arguments.patch"
patch -d "$src" -p1 < "$here/apprun-no-empty-library-path.patch"
docker run --rm -v "$src:/src" -w /src -e DEBIAN_FRONTEND=noninteractive "$image" bash -c "
set -e
+53
View File
@@ -0,0 +1,53 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBE+tgXgBEADfiL1KNFHT4H4Dw0OR9LemR8ebsFl+b9E44IpGhgWYDufj0gaM
/UJ1Ti3bHfRT39VVZ6cv1P4mQy0bnAKFbYz/wo+GhzjBWtn6dThYv7n+KL8bptSC
Xgg1a6en8dCCIA/pwtS2Ut/g4Eu6Z467dvYNlMgCqvg+prKIrXf5ibio48j3AFvd
1dDJl2cHfyuON35/83vXKXz0FPohQ7N7kPfI+qrlGBYGWFzC/QEGje360Q2Yo+rf
MoyDEXmPsoZVqf7EE8gjfnXiRqmz/Bg5YQb5bgnGbLGiHWtjS+ACIdLUq/h+jlSp
57jw8oQktMh2xVMX4utDM0UENeZnPllVJSlR0b+ZmZz7paeSar8Yxn4wsNlL7GZb
pW5A/WmcmWfuMYoPhBo5Fq1V2/siKNU3UKuf1KH+X0p1oZ4oOcZ2bS0Zh3YEG8IQ
ce9Bferq4QMKsekcG9IKS6WBIU7BwaElI2ILD0gSwu8KzvNSEeIJhYSsBIEzrWxI
BXoN2AC9PCqqXkWlI5Xr/86RWllB3CsoPwEfO8CLJW2LlXTen/Fkq4wT+apdhHei
WiSsq/J5OEff0rKHBQ3fK7fyVuVNrJFb2CopaBLyCxTupvxs162jjUNopt0c7OqN
BoPoUoVFAxUSpeEwAw6xrM5vROyLMSeh/YnTuRy8WviRapZCYo6naTCY5wARAQAB
tEJVYnVudHUgQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmluZyBLZXkgKDIwMTIpIDxm
dHBtYXN0ZXJAdWJ1bnR1LmNvbT6JAjgEEwECACIFAk+tgXgCGwMGCwkIBwMCBhUI
AgkKCwQWAgMBAh4BAheAAAoJEDtP5qzAsh8yXX4QAJHUdK6eYMyJcrFP3yKXtUYQ
MpaHRM/floqZtOFhlmcLVMgBNOr0eLvBU0JcZyZpHMvZciTDBMWX8ItCYVjRejf0
K0lPvHHRGaE7t6JHVUCeznNbDMnOPYVwlVJdZLOa6PmE5WXVXpk8uTA8vm6RO2rS
23vE7U0pQlV+1GVXMWH4ZLjaQs/Tm7wdvRxeqTbtfOEeHGLjmsoh0erHfzMV4wA/
9Zq86WzuJS1HxXR6OYDC3/aQX7CxYT1MQxEw/PObnHtkl3PRMWdTW7fSQtulEXzp
r2/JCev6Mfc8Uy0aD3jng9byVk9GpdNFEjGgaUqjqyZosvwAZ4/dmRjmMEibXeNU
GC8HeWC3WOVV8L/DiA+miJlwPvwPiA1ZuKBI5A8VF0rNHW7QVsG8kQ+PDHgRdsmh
pzSRgykN1PgK6UxScKX8LqNKCtKpuEPApka7FQ1u4BoZKjjpBhY1R4TpfFkMIe7q
W8XfqoaP99pED3xXch2zFRNHitNJr+yQJH4z/o+2UvnTA2niUTHlFSCBoU1MvSq1
N2J3qU6oR2cOYJ4ZxqWyCoeQR1x8aPnLlcn4le6HU7TocYbHaImcIt7qnG4Ni0OW
P4giEhjOpgxtrWgl36mdufvriwya+EHXzn36EvQ9O+bm3fyarsnhPe01rlsRxqBi
K1JOw/g4GnpX8iLGEX1VmQINBFufwdoBEADv/Gxytx/LcSXYuM0MwKojbBye81s0
G1nEx+lz6VAUpIUZnbkqdXBHC+dwrGS/CeeLuAjPRLU8AoxE/jjvZVp8xFGEWHYd
klqXGZ/gJfP5d3fIUBtZHZEJl8B8m9pMHf/AQQdsC+YzizSG5t5Mhnotw044LXtd
EEkx2t6Jz0OGrh+5IoxqX7pZiq6Cv19BohaUioKMdp7ES6RYfN7ol6HSLFlrMXtV
fh/ijpN9j3ZhVGVeRC8kKHQsJ5PkIbmvxBiUh7SJmfZUx0IQhNMaDHXfdZAGNtnh
zzNReb1FqNLSVkrS/PnsAQzMhG1BDm2VOSF64jebKXffFqM5LXRQTeqTLsjUbbrq
R6s/GCO8UF7jfUj6I7taLygmsHO/JD4jpKRC0gbpUBfaiJyLvuepx3kWoqL3sN0L
hlMI80+fA7GTvoOx4tpqVlzlE6TajYu+jfW3QpOFS5ewEMdL26hzxsZg/geZvTbA
rcP+OsJKRmhv4kNo6AydyHQ/3ZV/f3X9mT3/SPLbJaumkgp3Yzd6t5PeBu+ZQk/m
N5WNNuaihNEV7llb1ZhvY0Fxu9BVd/BNl0rzuxp3rIinB2TX2SCg7wE5xXkwXuQ/
2eTDE0v0HlGntkuZjGowDZkxHZQSxZVOzdZCRVaX/WEFLpKa2AQpw5RJrQ4oZ/Of
ifXyJzP27o03wQARAQABtEJVYnVudHUgQXJjaGl2ZSBBdXRvbWF0aWMgU2lnbmlu
ZyBLZXkgKDIwMTgpIDxmdHBtYXN0ZXJAdWJ1bnR1LmNvbT6JAjgEEwEKACIFAluf
wdoCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEIcZINGZG8k8LHMQAKS2
cnxz/5WaoCOWArf5g6UHbeOCgc5DBm0hCuFDZWWv427aGei3CPuLw0DGLCXZdyc5
dqE8mvjMlOmmAKKlj1uGg3TYCbQWjWPeMnBPZbkFgkZoXJ7/6CB7bWRht1sHzpt1
LTZ+SYDwOwJ68QRp7DRaZl9Y6QiUbeuhq2DUcTofVbBxbhrckN4ZteLvm+/nG9m/
ciopc66LwRdkxqfJ32Cyq+1TS5VaIJDG7DWziG+Kbu6qCDM4QNlg3LH7p14CrRxA
bc4lvohRgsV4eQqsIcdFkuVY5HPPj2K8TqpY6STe8Gh0aprG1RV8ZKay3KSMpnyV
1fAKn4fM9byiLzQAovC0LZ9MMMsrAS/45AvC3IEKSShjLFn1X1dRCiO6/7jmZEoZ
tAp53hkf8SMBsi78hVNrBumZwfIdBA1v22+LY4xQK8q4XCoRcA9G+pvzU9YVW7cR
nDZZGl0uwOw7z9PkQBF5KFKjWDz4fCk+K6+YtGpovGKekGBb8I7EA6UpvPgqA/Qd
I0t1IBP0N06RQcs1fUaAQEtz6DGy5zkRhR4pGSZn+dFET7PdAjEK84y7BdY4t+U1
jcSIvBj0F2B7LwRL7xGpSpIKi/ekAXLs117bvFHaCvmUYN7JVp1GMmVFxhIdx6CF
m3fxG8QjNb5tere/YqK+uOgcXny1UlwtCUzlrSaP
=GitC
-----END PGP PUBLIC KEY BLOCK-----
+57 -157
View File
@@ -46,6 +46,9 @@ def get_deb_extra_depends() -> str:
custom_arch = os.environ.get("DEB_ARCH")
if custom_arch == "armhf": # for arm32v7 libsciter-gtk.so
return ", libatomic1"
if custom_arch == "riscv64": # libvpx/libaom are static; these come from the distribution
# Cross-built on Ubuntu 24.04 (glibc 2.39, g++ 13): keep apt from installing it on older releases.
return ", libc6 (>= 2.39), libstdc++6 (>= 13), libopus0, libyuv0, libsodium23"
return ""
def system2(cmd):
@@ -140,10 +143,10 @@ def make_parser():
help='Build with unix file copy paste feature'
)
parser.add_argument(
'--drm',
'--no-drm',
action='store_true',
help='Linux only: build the DRM/KMS capture backend (bundles libdrmtap.so, '
'dlopen-ed in-process by the root service). Off by default.'
help='Linux only: build without the DRM/KMS capture backend (on by default for Flutter '
'builds; it bundles libdrmtap.so, dlopen-ed in-process by the root service)'
)
parser.add_argument(
'--print-features',
@@ -297,11 +300,10 @@ def external_resources(flutter, args, res_dir):
def linux_packaging_branch():
"""Which packaging path `main()` will take on THIS host.
MUST mirror the elif chain in main() (pacman / yum / zypper / else), and exists so `--drm` can
refuse a branch that is not drm-aware instead of silently producing a stock-named package with
the capture backend compiled in. Only the final `deb` branch reaches `build_flutter_deb`, which
is what bundles libdrmtap, renames the package, adds Conflicts/Provides and asserts the staged
binary really is a drm build.
MUST mirror the elif chain in main() (pacman / yum / zypper / else), and exists so the drm
backend is compiled in only where the package can carry libdrmtap: the `deb` branch
(`build_flutter_deb`) and the pacman Flutter branch (PKGBUILD). The yum and zypper branches
build Sciter rpms from res/rpm.spec and res/rpm-suse.spec, which do not.
"""
if os.path.isfile('/usr/bin/pacman'):
return 'pacman'
@@ -322,29 +324,14 @@ def get_features(args):
features.append('flutter')
if args.unix_file_copy_paste:
features.append('unix-file-copy-paste')
if args.drm:
# Say so rather than quietly handing back a stock build: the backend is Linux-only, so on
# any other host the flag cannot be honoured and the resulting binary would look like a
# DRM build without being one.
if windows or osx:
raise Exception('--drm is Linux only')
# And only on the deb branch. The other three Linux paths (pacman/yum/zypper) package
# straight from `target/release` without bundling libdrmtap, without the rename, without
# Conflicts/Provides and without assert_staged_binary_is_drm() -- so they would emit a
# package NAMED `rustdesk` carrying the consent-bypass backend and the root-side uinput
# injection. The separate package name is the informed consent this feature rests on, so
# refuse rather than ship a stock-named build of it.
branch = linux_packaging_branch()
if branch != 'deb':
raise Exception(
f'--drm is only supported on the deb packaging path; this host would package via '
f'{branch}, which cannot bundle libdrmtap or name the package distinctly')
# The backend is off at runtime until the user turns on allow-drm-capture, so every Linux
# Flutter package carries it.
if (args.flutter and not (windows or osx) and not args.no_drm
and linux_packaging_branch() in ('deb', 'pacman')):
features.append('drm')
# The display wake is its own compile gate on top of `drm`, and the unattended package is
# exactly where it belongs: that variant exists to reach a machine nobody is sitting at,
# and a machine whose screen went dark is the case it is for. Dropping `drm-wake` from
# this line builds the same capture backend with no wake code in the binary at all.
# It is ALSO switchable at runtime; see OPTION_ENABLE_DRM_DISPLAY_WAKE.
# The display wake is its own compile gate on top of `drm`: it reaches a machine whose
# screen went dark, which is the unattended case DRM capture is for. It is also switchable
# at runtime; see OPTION_ENABLE_DRM_DISPLAY_WAKE.
features.append('drm-wake')
if osx:
if args.screencapturekit:
@@ -365,7 +352,9 @@ Architecture: %s
Maintainer: rustdesk <info@rustdesk.com>
Homepage: https://rustdesk.com
Depends: libgtk-3-0t64 | libgtk-3-0, libxcb-randr0, libxdo3 | libxdo4, libxfixes3, libxcb-shape0, libxcb-xfixes0, libasound2t64 | libasound2, libsystemd0, curl, libva2, libva-drm2, libva-x11-2, libgstreamer-plugins-base1.0-0, gstreamer1.0-pipewire%s
Recommends: libayatana-appindicator3-1
Recommends: libayatana-appindicator3-1, libdrm2 (>= 2.4.101), libegl1, libgles2
Conflicts: rustdesk-unattended-wayland
Replaces: rustdesk-unattended-wayland
Description: A remote control software.
""" % (version, get_deb_arch(), get_deb_extra_depends())
@@ -390,9 +379,9 @@ def ffi_bindgen_function_refactor():
# The commit is fetched directly by sha, so no branch or tag name takes part in the build: see
# build_libdrmtap_so(). This is the SINGLE source of truth for the pin, deliberately not duplicated in
# any workflow, so a bump is one edit here (plus the informational version comment in
# libs/scrap/Cargo.toml). This commit is libdrmtap v0.5.12.
# libs/scrap/Cargo.toml). This commit is libdrmtap v0.6.1.
LIBDRMTAP_REPO_PINNED = 'https://github.com/rustdesk-org/libdrmtap'
LIBDRMTAP_SHA_PINNED = '5936a7a88b94aa43516a3dd0eb509d2383f31e2d'
LIBDRMTAP_SHA_PINNED = '12600215d37ae66417a8dcef1e56c01ccf2933ac'
LIBDRMTAP_REPO = os.environ.get('DRMTAP_REPO', LIBDRMTAP_REPO_PINNED)
LIBDRMTAP_SHA = os.environ.get('DRMTAP_SHA', LIBDRMTAP_SHA_PINNED)
# Every way of getting a different .so than the pin needs the same explicit opt-in. Otherwise the
@@ -423,7 +412,7 @@ def _prebuilt_dir_is_the_pinned_checkout(prebuilt_dir):
def _validate_libdrmtap_pin():
# Called from build_libdrmtap_so(), NOT at import: a stock (non --drm) build must stay
# Called from build_libdrmtap_so(), NOT at import: a build without drm (--no-drm) must stay
# byte-identical to upstream in behaviour too, and leftover DRMTAP_* variables in the
# environment (or a malformed sha) must not be able to fail a build that never touches
# libdrmtap.
@@ -604,9 +593,6 @@ def _assert_so_has_egl(so_path):
'libgles2-mesa-dev; Arch: mesa libglvnd).')
DRM_PACKAGE_NAME = 'rustdesk-unattended-wayland'
def assert_so_satisfies_the_runtime_abi_gate(so_path):
"""The .so we are about to ship must be one the RUNTIME will actually accept.
@@ -645,15 +631,15 @@ def assert_so_satisfies_the_runtime_abi_gate(so_path):
'could not parse the libdrmtap ABI gate out of drmtap_dl.rs (DRMTAP_ABI_MAJOR / '
'DRMTAP_ABI_MINOR / DRMTAP_MIN_MINOR_PATCH). The gate moved and this check did not; '
'fix the check rather than removing it, or the pin and the gate can drift silently.')
accepted = so_ver[0] == major and so_ver[1] == minor and (so_ver[1], so_ver[2]) >= floor
accepted = so_ver[0] == major and so_ver[1] <= minor and (so_ver[1], so_ver[2]) >= floor
if not accepted:
raise Exception(
f'the libdrmtap being packaged is {so_ver[0]}.{so_ver[1]}.{so_ver[2]}, which the '
f'runtime loader would REFUSE: drmtap_dl.rs accepts exactly major {major}, minor '
f'{minor}, patch >= {floor[1]}. Shipping it produces a deb whose DRM capture can never '
f'runtime loader would REFUSE: drmtap_dl.rs accepts major {major}, from '
f'{floor[0]}.{floor[1]} up to minor {minor}. Shipping it produces a deb whose DRM capture can never '
'start. Move the build pin and the gate together, or fix whichever one is wrong.')
print(f'[drm] libdrmtap {so_ver[0]}.{so_ver[1]}.{so_ver[2]} satisfies the runtime ABI gate '
f'(major {major}, minor {minor}, patch >= {floor[1]})')
f'(major {major}, {floor[0]}.{floor[1]} up to minor {minor})')
def stage_libdrmtap_into_deb(so_path):
@@ -672,68 +658,6 @@ def stage_libdrmtap_into_deb(so_path):
system2(f'ln -sf "{so_basename}" tmpdeb/usr/lib/rustdesk/libdrmtap.so.0')
def _max_glibc_minor(path):
# Read from .dynstr rather than via objdump so packaging needs no binutils; chunked because
# librustdesk.so is ~45 MB.
best = 0
with open(path, 'rb') as f:
tail = b''
while True:
chunk = f.read(1 << 20)
if not chunk:
return best
for m in re.finditer(rb'GLIBC_2\.(\d+)', tail + chunk):
best = max(best, int(m.group(1)))
tail = chunk[-16:]
def measured_glibc_floor():
# libdrmtap is built on a newer base than the rest of the deb, so the floor is whichever staged
# object is higher -- and it moves whenever either base does.
paths = [p for p in glob.glob('tmpdeb/usr/lib/rustdesk/libdrmtap.so.0.*')
+ glob.glob('tmpdeb/usr/share/rustdesk/lib/librustdesk.so')
+ glob.glob('tmpdeb/usr/share/rustdesk/rustdesk')
if os.path.isfile(p) and not os.path.islink(p)]
minor = max((_max_glibc_minor(p) for p in paths), default=0)
if not minor:
raise Exception(
f'could not measure a GLIBC_2.x floor from any staged object ({paths or "none found"}); '
'refusing to ship the unattended-wayland variant with an undeclared libc6 floor, which '
'is what lets it install on a host where libdrmtap can never load')
return f'2.{minor}'
def retarget_control_to_drm_variant():
# Rewrite the control file that generate_control_file just produced, instead of parameterizing that
# function: the stock packaging path stays exactly as upstream wrote it, and everything specific to
# this variant lives here. The variant installs the same files as the stock package, so it must
# conflict with and replace it: you install one or the other, never both. It also needs libdrmtap's
# own runtime deps, which the stock package has no reason to carry.
path = '../res/DEBIAN/control'
floor = measured_glibc_floor()
print(f'[drm] {DRM_PACKAGE_NAME} libc6 floor measured at {floor}')
with open(path) as f:
lines = f.readlines()
out = []
for line in lines:
if line.startswith('Package: rustdesk'):
out.append(f'Package: {DRM_PACKAGE_NAME}\n')
out.append('Conflicts: rustdesk\nReplaces: rustdesk\nProvides: rustdesk\n')
elif line.startswith('Depends:'):
# 2.4.101 is where drmModeGetFB2 landed; below it libdrmtap loads and can never capture.
out.append(line.rstrip('\n') + ', libdrm2 (>= 2.4.101), libegl1, libgles2, '
f'libc6 (>= {floor})\n')
else:
out.append(line)
body = ''.join(out)
# Fail loudly rather than silently shipping a package that says `rustdesk`: a stock control file
# that stopped matching either anchor would otherwise produce a variant deb wearing the stock name.
if f'Package: {DRM_PACKAGE_NAME}\n' not in body or 'libegl1' not in body:
raise Exception(f'could not retarget {path} to the drm variant; upstream control layout changed')
with open(path, 'w') as f:
f.write(body)
def build_flutter_deb(version, features):
if not skip_cargo:
system2(f'cargo build --locked --features {features} --lib --release')
@@ -762,11 +686,10 @@ def build_flutter_deb(version, features):
'cp ../res/rustdesk-link.desktop tmpdeb/usr/share/applications/rustdesk-link.desktop')
system2(
"echo \"#!/bin/sh\" >> tmpdeb/usr/share/rustdesk/files/polkit && chmod a+x tmpdeb/usr/share/rustdesk/files/polkit")
# Bundle libdrmtap.so only when this build actually enabled the `drm` feature, so stock packages
# stay exactly what they were. The root service dlopens it in-process by absolute path.
# Bundle libdrmtap.so only when this build actually enabled the `drm` feature (not with
# --no-drm). The root service dlopens it in-process by absolute path.
# `features` is the comma-joined string, so split it: a bare substring test would also match any
# future feature merely containing "drm" (drm-lease, vaapi-drm) and rename the deb to the
# consent-bypass variant without --drm ever being passed.
# future feature merely containing "drm" (drm-lease, vaapi-drm).
ships_so = 'drm' in features.split(',')
if ships_so:
# Same artifact assertion as the --package path. Under --skip-cargo nothing here rebuilt the
@@ -776,8 +699,6 @@ def build_flutter_deb(version, features):
system2('mkdir -p tmpdeb/DEBIAN')
generate_control_file(version)
if ships_so:
retarget_control_to_drm_variant()
system2('cp -a ../res/DEBIAN/* tmpdeb/DEBIAN/')
md5_file_folder("tmpdeb/")
system2('dpkg-deb -b tmpdeb rustdesk.deb;')
@@ -785,9 +706,6 @@ def build_flutter_deb(version, features):
system2('/bin/rm -rf tmpdeb/')
system2('/bin/rm -rf ../res/DEBIAN/control')
os.rename('rustdesk.deb', '../rustdesk-%s.deb' % version)
if ships_so:
# Named apart from the stock package so installing the consent-free variant is a deliberate act.
os.rename('../rustdesk-%s.deb' % version, f'../{DRM_PACKAGE_NAME}-{version}.deb')
os.chdir("..")
@@ -815,38 +733,30 @@ def _carries_drmtap_marker(path, marker=DRMTAP_DLOPEN_MARKER):
def assert_staged_binary_is_drm():
"""The staged BINARY must really be a drm build before it is named the unattended-wayland
variant. That package conflicts with and replaces the stock one, so shipping a stock binary
under that name produces something that can never capture and cannot be installed alongside
what it replaced. The marker is the absolute dlopen path from drmtap_dl.rs, present only when
the feature is compiled in -- assert what was produced, not what was asked for.
Called from BOTH packaging paths. It used to guard only one of them, and `--skip-cargo` (which
is how CI packages) reaches the other, where nothing had rebuilt the binary at all.
"""The staged BINARY must really be a drm build before libdrmtap is packaged with it. Under
`--skip-cargo` (how CI packages) nothing here rebuilt the binary, so `features` says what was
asked for while the staged bundle can be anything. The marker is the absolute dlopen path from
drmtap_dl.rs, present only when the feature is compiled in -- assert what was produced, not
what was asked for.
"""
binaries = [p for p in glob.glob('tmpdeb/usr/share/rustdesk/lib/librustdesk.so')
+ glob.glob('tmpdeb/usr/share/rustdesk/rustdesk') if os.path.isfile(p)]
if not any(_carries_drmtap_marker(p) for p in binaries):
raise Exception(
f'--drm was requested but the staged bundle does not look like a drm build (no '
f'the build enabled drm but the staged bundle does not look like a drm build (no '
f'{DRMTAP_DLOPEN_MARKER.decode()} dlopen path in {binaries or "any staged binary"}); '
'refusing to package it as the unattended-wayland variant, which conflicts with and '
'replaces the stock package but could never capture')
# And the WAKE half. `--drm` enables `drm-wake` too (see get_features), and the deb is named and
# documented as the variant that can reach a machine whose screen has gone dark. The dlopen
# marker above does not distinguish them: `--features drm` alone carries it and has no wake code
# at all. Asserting only the first half is how a deb can be named for a feature it does not have.
'the cargo line that produced it is missing the feature: --features ...,drm,drm-wake '
'(or pass --no-drm)')
# And the WAKE half: get_features enables `drm-wake` with `drm`, and the dlopen marker above
# does not tell them apart -- `--features drm` alone carries it and has no wake code at all.
if not any(_carries_drmtap_marker(p, DRMTAP_WAKE_MARKER) for p in binaries):
raise Exception(
f'--drm was requested but the staged binary has no {DRMTAP_WAKE_MARKER.decode()} '
f'the build enabled drm but the staged binary has no {DRMTAP_WAKE_MARKER.decode()} '
f'marker in {binaries or "any staged binary"}, so it was built without `drm-wake`; '
'refusing to package it as the unattended-wayland variant, which is named and '
'documented as the build that can wake an idle-disabled display. If this fired under '
'--skip-cargo, the cargo line that produced the bundle is missing the feature: '
'--features ...,drm,drm-wake')
'the cargo line that produced it is missing the feature: --features ...,drm,drm-wake')
def build_deb_from_folder(version, binary_folder, want_drm=False):
def build_deb_from_folder(version, binary_folder):
os.chdir('flutter')
system2('mkdir -p tmpdeb/usr/bin/')
system2('mkdir -p tmpdeb/usr/share/rustdesk')
@@ -870,33 +780,26 @@ def build_deb_from_folder(version, binary_folder, want_drm=False):
'cp ../res/rustdesk-link.desktop tmpdeb/usr/share/applications/rustdesk-link.desktop')
system2(
"echo \"#!/bin/sh\" >> tmpdeb/usr/share/rustdesk/files/polkit && chmod a+x tmpdeb/usr/share/rustdesk/files/polkit")
# Where the capture library comes from for a `--package <folder> --drm` build. Two shapes are
# Where the capture library comes from for a `--package <folder>` drm build. Two shapes are
# supported, because two exist in practice: a bundle that already carries libdrmtap.so.0.*
# (someone staged it, e.g. a CI artifact), and a plain bundle, which is what every build path
# here actually produces -- the flutter deb builds the library straight into the staged deb, so
# nothing ever puts it inside the bundle folder. Demanding it in the bundle made this flag
# combination impossible to satisfy.
# nothing ever puts it inside the bundle folder.
bundled_glob = glob.glob('tmpdeb/usr/share/rustdesk/libdrmtap.so.0.*')
bundle_carries_so = any(os.path.isfile(p) and not os.path.islink(p) for p in bundled_glob)
# The variant must be decided by the EXPLICIT --drm request, not merely by what happens to be
# staged: a bundle that carries the .so must NOT be shipped as the consent-bypass variant when
# --drm was never passed.
# `--package` compiles nothing, so only the staged binary knows whether it is a drm build; a
# Sciter or --no-drm bundle must not get libdrmtap.
want_drm = any(_carries_drmtap_marker(p)
for p in glob.glob('tmpdeb/usr/share/rustdesk/lib/librustdesk.so')
+ glob.glob('tmpdeb/usr/share/rustdesk/rustdesk') if os.path.isfile(p))
if bundle_carries_so and not want_drm:
raise Exception(
'the staged bundle carries libdrmtap.so.0.* but --drm was not passed; refusing '
'to silently ship the consent-bypass unattended-wayland variant (pass --drm to '
'build it deliberately)')
'the staged bundle carries libdrmtap.so.0.* but the binary is not a drm build')
if want_drm:
# Whichever shape we are in, the staged BINARY must really be a drm build. This is the
# property the old presence-of-the-.so test stood in for, badly: a stock binary packaged as
# the unattended-wayland variant would carry the consent-bypass name, conflict with and
# replace the stock package, and never be able to capture. The marker is the absolute
# dlopen path from drmtap_dl.rs, present only when the feature is compiled in -- the same
# kind of artifact assertion as _assert_so_has_egl, and for the same reason: assert what
# was produced, not what was asked for.
# The dlopen marker decided want_drm; this also asserts the drm-wake half.
assert_staged_binary_is_drm()
if bundle_carries_so:
so = _single_real_so(bundled_glob, 'the staged --drm bundle')
so = _single_real_so(bundled_glob, 'the staged drm bundle')
# The THIRD artifact source, and the last one that was missing the check: --package
# takes the .so straight out of a bundle somebody else produced, so it has the same
# exposure as DRMTAP_PREBUILT_DIR (see the comment on that branch). A CPU-only stub
@@ -915,10 +818,6 @@ def build_deb_from_folder(version, binary_folder, want_drm=False):
system2('mkdir -p tmpdeb/DEBIAN')
generate_control_file(version)
# Keyed on the EXPLICIT request, not on what happened to be staged: by here a --drm build has
# its library in tmpdeb whichever of the two shapes it came from.
if want_drm:
retarget_control_to_drm_variant()
system2('cp -a ../res/DEBIAN/* tmpdeb/DEBIAN/')
md5_file_folder("tmpdeb/")
system2('dpkg-deb -b tmpdeb rustdesk.deb;')
@@ -926,8 +825,6 @@ def build_deb_from_folder(version, binary_folder, want_drm=False):
system2('/bin/rm -rf tmpdeb/')
system2('/bin/rm -rf ../res/DEBIAN/control')
os.rename('rustdesk.deb', '../rustdesk-%s.deb' % version)
if want_drm:
os.rename('../rustdesk-%s.deb' % version, f'../{DRM_PACKAGE_NAME}-{version}.deb')
os.chdir("..")
@@ -962,6 +859,9 @@ def build_flutter_arch_manjaro(version, features):
os.chdir('flutter')
system2('flutter build linux --release')
system2(f'strip {flutter_build_dir}/lib/librustdesk.so')
# PKGBUILD installs the library from third_party/libdrmtap/build-pkg.
if 'drm' in features.split(','):
build_libdrmtap_so()
os.chdir('../res')
system2('HBB=`pwd`/.. FLUTTER=1 makepkg -f')
@@ -1030,7 +930,7 @@ def main():
portable = args.portable
package = args.package
if package:
build_deb_from_folder(version, package, args.drm)
build_deb_from_folder(version, package)
return
res_dir = 'resources'
external_resources(flutter, args, res_dir)
+83 -71
View File
@@ -1,69 +1,86 @@
<p align="center">
<img src="../res/logo-header.svg" alt="RustDesk - Your remote desktop"><br>
<a href="#free-public-servers">Servers</a> •
<a href="#raw-steps-to-build">Build</a> •
<a href="#how-to-build-with-docker">Docker</a> •
<a href="#file-structure">Structure</a> •
<a href="#snapshot">Snapshot</a><br>
[<a href="../README.md">English</a>] | [<a href="README-UA.md">Українська</a>] | [<a href="README-CS.md">česky</a>] | [<a href="README-ZH.md">中文</a>] | [<a href="README-HU.md">Magyar</a>] | [<a href="README-ES.md">Español</a>] | [<a href="README-FA.md">فارسی</a>] | [<a href="README-FR.md">Français</a>] | [<a href="README-DE.md">Deutsch</a>] | [<a href="README-PL.md">Polski</a>] | [<a href="README-ID.md">Indonesian</a>] | [<a href="README-FI.md">Suomi</a>] | [<a href="README-ML.md">മലയാളം</a>] | [<a href="README-JP.md">日本語</a>] | [<a href="README-NL.md">Nederlands</a>] | [<a href="README-IT.md">Italiano</a>] | [<a href="README-RU.md">Русский</a>] | [<a href="README-PTBR.md">Português (Brasil)</a>] | [<a href="README-EO.md">Esperanto</a>] | [<a href="README-KR.md">한국어</a>] | [<a href="README-VN.md">Tiếng Việt</a>] | [<a href="README-GR.md">Ελληνικά</a>]<br>
<b> لغتك الأم, <a href="https://github.com/rustdesk/doc.rustdesk.com">Doc</a> و <a href="https://github.com/rustdesk/rustdesk/tree/master/src/lang">RustDesk UI</a>, README نحن بحاجة إلى مساعدتك لترجمة هذا </b>
</p>
<img src="../res/logo-header.svg" alt="RustDesk - سطح مكتبك عن بُعد"><br>
<a href="#خطوات-البناء-الأساسية">البناء</a> •
<a href="#كيفية-البناء-باستخدام-docker">Docker</a> •
<a href="#هيكل-الملفات">هيكل الملفات</a> •
<a href="#لقطات-الشاشة">لقطات الشاشة</a><br>
[<a href="../README.md">English</a>] | [<a href="README-UA.md">Українська</a>] | [<a href="README-CS.md">česky</a>] | [<a href="README-ZH.md">中文</a>] | [<a href="README-HU.md">Magyar</a>] | [<a href="README-ES.md">Español</a>] | [<a href="README-FA.md">فارسی</a>] | [<a href="README-FR.md">Français</a>] | [<a href="README-DE.md">Deutsch</a>] | [<a href="README-PL.md">Polski</a>] | [<a href="README-ID.md">Indonesian</a>] | [<a href="README-FI.md">Suomi</a>] | [<a href="README-ML.md">മലയാളം</a>] | [<a href="README-JP.md">日本語</a>] | [<a href="README-NL.md">Nederlands</a>] | [<a href="README-IT.md">Italiano</a>] | [<a href="README-RU.md">Русский</a>] | [<a href="README-PTPT.md">Português (Portugal)</a>] | [<a href="README-PTBR.md">Português (Brasil)</a>] | [<a href="README-EO.md">Esperanto</a>] | [<a href="README-KR.md">한국어</a>] | [<a href="README-AR.md">العربية</a>] | [<a href="README-VN.md">Tiếng Việt</a>] | [<a href="README-DA.md">Dansk</a>] | [<a href="README-GR.md">Ελληνικά</a>] | [<a href="README-TR.md">Türkçe</a>] | [<a href="README-NO.md">Norsk</a>] | [<a href="README-RO.md">Română</a>] | [<a href="README-KA.md">ქართული</a>]<br>
<b dir="rtl">نحتاج إلى مساعدتك لترجمة هذا الملف، <a href="https://github.com/rustdesk/rustdesk/tree/master/src/lang">وواجهة RustDesk</a>، <a href="https://github.com/rustdesk/doc.rustdesk.com">ووثائق RustDesk</a> إلى لغتك الأم.</b>
> [!Caution]
> **إخلاء مسؤولية بشأن إساءة الاستخدام:**
>
> لا يقرّ مطوّرو RustDesk أي استخدام غير أخلاقي أو غير قانوني لهذا البرنامج ولا يدعمونه. وتُعدّ إساءة الاستخدام، مثل الوصول أو التحكم دون تصريح أو انتهاك الخصوصية، مخالفة صريحة لإرشاداتنا. ولا يتحمل مؤلفو البرنامج مسؤولية أي إساءة لاستخدامه.
[Discord](https://discord.gg/nDceKgxnkV) | [Twitter](https://twitter.com/rustdesk) | [Reddit](https://www.reddit.com/r/rustdesk) | [YouTube](https://www.youtube.com/@rustdesk) :تواصل معنا عبر
[![RustDesk Server Pro](https://img.shields.io/badge/RustDesk%20Server%20Pro-%D8%A7%D9%84%D9%85%D9%8A%D8%B2%D8%A7%D8%AA%20%D8%A7%D9%84%D9%85%D8%AA%D9%82%D8%AF%D9%85%D8%A9-blue)](https://rustdesk.com/pricing.html)
[![RustDesk Server Pro — الميزات المتقدمة](../res/rustdesk-server-pro-ar.svg)](https://rustdesk.com/pricing.html)
.Rustبرنامج آخر لسطح المكتب عن بعد، مكتوب بـ
يعمل خارج الصندوق، لا حاجة إلى إعدادات. لديك سيطرة كاملة على بياناتك، دون مخاوف بشأن الأمن. يمكنك استخدام خادم
الخاص بنا rendezvous/relay
[جهز لنفسك واحدا](https://rustdesk.com/server), أو
[خاص بك rendezvous/relay أكتب خادم](https://github.com/rustdesk/rustdesk-server-demo).
حلّ آخر للتحكم بسطح المكتب عن بُعد، مكتوب بلغة Rust. يعمل مباشرةً دون الحاجة إلى أي إعدادات. يمنحك تحكمًا كاملًا في بياناتك دون القلق بشأن الأمان. يمكنك استخدام خادمنا لتنسيق الاتصالات وترحيلها (rendezvous/relay)، أو [إعداد خادمك الخاص](https://rustdesk.com/server)، أو [برمجة خادمك الخاص لتنسيق الاتصالات وترحيلها](https://github.com/rustdesk/rustdesk-server-demo).
![image](https://user-images.githubusercontent.com/71636191/171661982-430285f0-2e12-4b1d-9957-4a58e375304d.png)
لمساعدتك على ذلك [`docs/CONTRIBUTING.md`](CONTRIBUTING.md) يرحب بمساهمة الجميع. اطلع على RustDesk.
يرحّب RustDesk بمساهمات الجميع. راجع [دليل المساهمة](CONTRIBUTING.md) لمساعدتك على البدء.
[**؟ RustDesk كيفية يعمل**](https://github.com/rustdesk/rustdesk/wiki/How-does-RustDesk-work%3F)
[**الأسئلة الشائعة**](https://github.com/rustdesk/rustdesk/wiki/FAQ)
[**BINARY تنزيل**](https://github.com/rustdesk/rustdesk/releases)
[**تنزيل البرنامج**](https://github.com/rustdesk/rustdesk/releases)
[**الإصدار التجريبي الليلي**](https://github.com/rustdesk/rustdesk/releases/tag/nightly)
[<img src="https://f-droid.org/badge/get-it-on.png"
alt="احصل عليه من F-Droid"
height="80">](https://f-droid.org/en/packages/com.carriez.flutter_hbb)
[<img src="https://flathub.org/api/badge?svg&locale=en"
alt="احصل عليه من Flathub"
height="80">](https://flathub.org/apps/com.rustdesk.RustDesk)
## التبعيات
لواجهة المستخدم الرسومية [sciter](https://sciter.com/) نسخة سطح المكتب تستخدم
بنفسك sciter dynamic library عليك تحميل
تستخدم إصدارات سطح المكتب Flutter أو Sciter (الذي لم يعد ينصح التوصية باستخدامه) لواجهة المستخدم الرسومية. يقتصر هذا الدليل على Sciter، لأنه أسهل وأنسب للبدء. لبناء إصدار Flutter، راجع [ملف إعداد التكامل المستمر (CI)](https://github.com/rustdesk/rustdesk/blob/master/.github/workflows/flutter-build.yml).
[Windows](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll) |
[Linux](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so) |
[MacOS](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/libsciter.dylib)
يرجى تنزيل المكتبة الديناميكية الخاصة بـ Sciter يدويًا.
Sciter إلى Flutter سنقوم بترحيل نسخة سطح المكتب من .Flutter تستخدم إصدارات الهاتف المحمول.
[Windows](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.win/x64/sciter.dll) | [Linux](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so) | [macOS](https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.osx/libsciter.dylib)
## خطوات البناء
## خطوات البناء الأساسية
- C++ build env و Rust development env قم بإعداد
- جهّز بيئة تطوير Rust وبيئة بناء &#x200E;C++&#x200E;.
- ثبّت [vcpkg](https://github.com/microsoft/vcpkg)، واضبط متغير البيئة `VCPKG_ROOT` بشكل صحيح.
- على Windows:
```sh
vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static
```
- على Linux وmacOS:
```sh
vcpkg install libvpx libyuv opus aom
```
- شغّل الأمر `cargo run`.
- بطريقة صحيحة `VCPKG_ROOT` env variable وأعد [vcpkg](https://github.com/microsoft/vcpkg) ثبت
## [دليل البناء](https://rustdesk.com/docs/en/dev/build/)
- Windows: `vcpkg install libvpx:x64-windows-static libyuv:x64-windows-static opus:x64-windows-static aom:x64-windows-static`
- Linux/MacOS: `vcpkg install libvpx libyuv opus aom`
- run `cargo run`
## [البناء](https://rustdesk.com/docs/en/dev/build/)
## Linux
## كيفية البناء على Linux
### Ubuntu 18 (Debian 10)
```sh
sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake
sudo apt install -y zip g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev \
libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake make \
libclang-dev ninja-build libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
```
### openSUSE Tumbleweed
```sh
sudo zypper install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libXfixes-devel cmake alsa-lib-devel gstreamer-devel gstreamer-plugins-base-devel xdotool-devel
```
### Fedora 28 (CentOS 8)
```sh
sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libxdo-devel libXfixes-devel pulseaudio-libs-devel cmake alsa-lib-devel
sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libxdo-devel libXfixes-devel pulseaudio-libs-devel cmake alsa-lib-devel gstreamer1-devel gstreamer1-plugins-base-devel
```
### Arch (Manjaro)
@@ -72,8 +89,7 @@ sudo yum -y install gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-
sudo pacman -Syu --needed unzip git cmake gcc curl wget yasm nasm zip make pkg-config clang gtk3 xdotool libxcb libxfixes alsa-lib pipewire
```
### vcpkg تثبيت
### تثبيت vcpkg
```sh
git clone https://github.com/microsoft/vcpkg
@@ -85,7 +101,7 @@ export VCPKG_ROOT=$HOME/vcpkg
vcpkg/vcpkg install libvpx libyuv opus aom
```
### Fix libvpx (For Fedora)
### إصلاح libvpx على Fedora
```sh
cd vcpkg/buildtrees/libvpx/src
@@ -103,70 +119,66 @@ cd
```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
git clone https://github.com/rustdesk/rustdesk
git clone --recurse-submodules https://github.com/rustdesk/rustdesk
cd rustdesk
mkdir -p target/debug
wget https://raw.githubusercontent.com/c-smile/sciter-sdk/master/bin.lnx/x64/libsciter-gtk.so
mv libsciter-gtk.so target/debug
VCPKG_ROOT=$HOME/vcpkg cargo run
```
## كيفية البناء باستخدام Docker
## Docker طريقة البناء باستخدام
ابدأ باستنساخ المستودع وبناء الكونتاينر:
ابدأ باستنساخ المستودع وبناء صورة Docker:
```sh
git clone https://github.com/rustdesk/rustdesk
cd rustdesk
git submodule update --init --recursive
docker build -t "rustdesk-builder" .
```
ثم، في كل مرة تحتاج إلى بناء التطبيق، قم بتشغيل الأمر التالي:
بعد ذلك، شغّل الأمر التالي كلما احتجت إلى بناء التطبيق:
```sh
docker run --rm -it -v $PWD:/home/user/rustdesk -v rustdesk-git-cache:/home/user/.cargo/git -v rustdesk-registry-cache:/home/user/.cargo/registry -e PUID="$(id -u)" -e PGID="$(id -g)" rustdesk-builder
```
لاحظ أن البناء الأول قد يستغرق وقتًا أطول قبل تخزين التبعيات، وسيكون البناء اللاحق أسرع. بالإضافة إلى ذلك، إذا كنت بحاجة إلى تحديد وسائط مختلفة لأمر البناء، فيمكنك القيام بذلك في نهاية الأمر بوضع
`<OPTIONAL-ARGS>`
على سبيل المثال، إذا كنت ترغب في بناء إصدار محسن، فستقوم بتشغيل الأمر أعلاه متبوعًا بـ
`--release`
:سيكون الملف القابل للتنفيذ الناتج متاحًا في مجلد تارغت، ويمكن تشغيله باستخدام
قد يستغرق البناء الأول وقتًا أطول حتى تُخزَّن التبعيات مؤقتًا، بينما تكون عمليات البناء اللاحقة أسرع. ويمكنك تمرير خيارات إضافية لأمر البناء بإضافتها في نهاية الأمر، في الموضع المخصّص لـ `<OPTIONAL-ARGS>`. على سبيل المثال، لبناء إصدار محسّن للأداء، أضف &#x200E;<code>--release</code>&#x200E; إلى نهاية الأمر السابق. سيتوفر الملف التنفيذي الناتج داخل مجلد `target` على جهازك، ويمكن تشغيله بالأمر:
```sh
target/debug/rustdesk
```
:أو في حال قمت ببناء إصدار محسن
أما إذا بنيت إصدارًا باستخدام &#x200E;<code>--release</code>&#x200E;، فيمكنك تشغيله بالأمر:
```sh
target/release/rustdesk
```
RustDesk يرجى التأكد من أنك تنفذ هذه الأوامر من جذر مستودع
وإلا فقد لا يتمكن التطبيق من العثور على الموارد المطلوبة. لاحظ أيضًا أن الأوامر الفرعية الأخرى مثل
`install` أو `run`
لا يتم دعمها حاليًا عبر هذه الطريقة لأنها ستقوم بتثبيت أو تشغيل البرنامج داخل الكونتاينر بدلاً من الهوست.
تأكد من تشغيل هذه الأوامر من المجلد الجذري لمستودع RustDesk، وإلا فقد يتعذر على التطبيق العثور على الموارد المطلوبة. كذلك، لا تدعم هذه الطريقة حاليًا أوامر cargo الفرعية الأخرى، مثل `install` أو`run`، لأنها ستثبّت البرنامج أو تشغّله داخل الحاوية بدلًا من الجهاز المضيف.
## هيكل الملف
<h2 id="هيكل-الملفات" dir="rtl">هيكل الملفات</h2>
- **[libs/hbb_common](https://github.com/rustdesk/hbb_common)**: وظائف لنقل الملفات، وبعض وظائف المرافق الأخرى tcp/udp، protobuf ترميز الفيديو، إعدادات
<ul dir="rtl">
<li><strong><a href="https://github.com/rustdesk/hbb_common"><bdi dir="ltr">libs/hbb_common</bdi></a></strong>: الإعدادات، وطبقة تغليف لبروتوكولَي TCP وUDP، وبعض الدوال المساعدة المشتركة مع الخادم.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/base"><bdi dir="ltr">libs/base</bdi></a></strong>: ملفات protobuf، ودوال نظام الملفات لنقل الملفات، وشيفرة لوحة المفاتيح والمنصات الخاصة بهذا التطبيق.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/scrap"><bdi dir="ltr">libs/scrap</bdi></a></strong>: التقاط الشاشة وترميز الفيديو وفك ترميزه.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/enigo"><bdi dir="ltr">libs/enigo</bdi></a></strong>: التحكم بلوحة المفاتيح والفأرة حسب نظام التشغيل.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard"><bdi dir="ltr">libs/clipboard</bdi></a></strong>: تنفيذ نسخ الملفات ولصقها على Windows وLinux وmacOS.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/ui"><bdi dir="ltr">src/ui</bdi></a></strong>: واجهة Sciter القديمة التي لم يعد يُنصح باستخدامها.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/server"><bdi dir="ltr">src/server</bdi></a></strong>: خدمات الصوت والحافظة والإدخال والفيديو، واتصالات الشبكة.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/client.rs"><bdi dir="ltr">src/client.rs</bdi></a></strong>: بدء اتصال بين طرفين.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/rendezvous_mediator.rs"><bdi dir="ltr">src/rendezvous_mediator.rs</bdi></a></strong>: التواصل مع <a href="https://github.com/rustdesk/rustdesk-server"><bdi dir="ltr">rustdesk-server</bdi></a>، وانتظار اتصال مباشر بالطرف البعيد باستخدام تقنية اجتياز NAT عبر TCP ‏(TCP hole punching)، أو اتصال عبر خادم ترحيل.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/src/platform"><bdi dir="ltr">src/platform</bdi></a></strong>: الشيفرة الخاصة بكل نظام تشغيل.</li>
<li><strong><a href="https://github.com/rustdesk/rustdesk/tree/master/flutter"><bdi dir="ltr">flutter</bdi></a></strong>: شيفرة Flutter لإصدارات سطح المكتب والأجهزة المحمولة.</li>
</ul>
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: التقاط الشاشة
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: التحكم في لوحة المفاتيح/الماوس الخاصة بكل منصة
- **[src/ui](https://github.com/rustdesk/rustdesk/tree/master/src/ui)**: واجهة المستخدم الرسومية
- **[src/server](https://github.com/rustdesk/rustdesk/tree/master/src/server)**: خدمات الصوت/الحافظة/المدخلات/الفيديو، ووصلات الشبكة
- **[src/client.rs](https://github.com/rustdesk/rustdesk/tree/master/src/client.rs)**: بدء اتصال متقارن
- **[src/rendezvous_mediator.rs](https://github.com/rustdesk/rustdesk/tree/master/src/rendezvous_mediator.rs)**: أو المنقول عن بُعد (TCP hole punching) انتظر الاتصال المباشر [rustdesk-server](https://github.com/rustdesk/rustdesk-server) الإتصال ب
- **[src/platform](https://github.com/rustdesk/rustdesk/tree/master/src/platform)**: رمز خاص بكل منصة
- **[flutter](https://github.com/rustdesk/rustdesk/tree/master/flutter)**: رمز الهاتف المحمول
## لقطات الشاشة
## لقطات
![مدير الاتصالات](https://github.com/rustdesk/rustdesk/assets/28412477/db82d4e7-c4bc-4823-8e6f-6af7eadf7651)
![image](https://user-images.githubusercontent.com/71636191/113112362-ae4deb80-923b-11eb-957d-ff88daad4f06.png)
![الاتصال بجهاز يعمل بنظام Windows](https://github.com/rustdesk/rustdesk/assets/28412477/9baa91e9-3362-4d06-aa1a-7518edcbd7ea)
![image](https://user-images.githubusercontent.com/71636191/113112619-f705a480-923b-11eb-911d-97e984ef52b6.png)
![نقل الملفات](https://github.com/rustdesk/rustdesk/assets/28412477/39511ad3-aa9a-4f8c-8947-1cce286a46ad)
![image](https://user-images.githubusercontent.com/71636191/113112857-3fbd5d80-923c-11eb-9836-768325faf906.png)
![image](https://user-images.githubusercontent.com/71636191/135385039-38fdbd72-379a-422d-b97f-33df71fb1cec.png)
![إنشاء نفق TCP](https://github.com/rustdesk/rustdesk/assets/28412477/78e8708f-e87e-4570-8373-1360033ea6c5)
+3 -3
View File
@@ -8,6 +8,7 @@ import 'package:flutter_hbb/common/formatter/id_formatter.dart';
import 'package:flutter_hbb/common/hbbs/hbbs.dart';
import 'package:flutter_hbb/common/widgets/peer_card.dart';
import 'package:flutter_hbb/common/widgets/peers_view.dart';
import 'package:flutter_hbb/common/widgets/resizable_side_panel.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/desktop/widgets/popup_menu.dart';
import 'package:flutter_hbb/models/ab_model.dart';
@@ -73,7 +74,7 @@ class _AddressBookState extends State<AddressBook> {
});
Widget _buildAddressBookLandscape() {
return Row(
return ResizablePanelRow(
children: [
Offstage(
offstage: hideAbTagsPanel.value,
@@ -83,7 +84,6 @@ class _AddressBookState extends State<AddressBook> {
border: Border.all(
color: Theme.of(context).colorScheme.background)),
child: Container(
width: 200,
height: double.infinity,
child: Column(
children: [
@@ -103,7 +103,7 @@ class _AddressBookState extends State<AddressBook> {
],
),
),
).marginOnly(right: 12.0)),
).resizable(kOptionAbTagsPanelWidth, defaultWidth: 200)),
_buildPeersViews()
],
);
+4 -3
View File
@@ -4,6 +4,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_hbb/common/hbbs/hbbs.dart';
import 'package:flutter_hbb/common/widgets/login.dart';
import 'package:flutter_hbb/common/widgets/peers_view.dart';
import 'package:flutter_hbb/common/widgets/resizable_side_panel.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/state_model.dart';
import 'package:get/get.dart';
@@ -58,7 +60,7 @@ class _MyGroupState extends State<MyGroup> {
}
Widget _buildLandscape() {
return Row(
return ResizablePanelRow(
children: [
Container(
decoration: BoxDecoration(
@@ -66,7 +68,6 @@ class _MyGroupState extends State<MyGroup> {
border:
Border.all(color: Theme.of(context).colorScheme.background)),
child: Container(
width: 150,
height: double.infinity,
child: Column(
children: [
@@ -81,7 +82,7 @@ class _MyGroupState extends State<MyGroup> {
],
),
),
).marginOnly(right: 12.0),
).resizable(kOptionAccessibleDevicesPanelWidth, defaultWidth: 150),
Expanded(
child: Align(
alignment: Alignment.topLeft,
@@ -0,0 +1,111 @@
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_hbb/models/platform_model.dart';
const double _kDividerWidth = 12;
const double _kMinContentWidth = 120;
// One 220 px peer card (see peers_view.dart) plus the 12 px spacing.
const double _kPeerCardWidth = 232;
/// A [Row] that lets a [ResizableSidePanel] inside it cap its width to the space the row actually has.
class ResizablePanelRow extends StatelessWidget {
final List<Widget> children;
const ResizablePanelRow({Key? key, required this.children})
: super(key: key);
@override
Widget build(BuildContext context) => LayoutBuilder(
builder: (context, constraints) => _AvailableWidth(
width: constraints.maxWidth, child: Row(children: children)));
}
class _AvailableWidth extends InheritedWidget {
final double width;
const _AvailableWidth({required this.width, required Widget child})
: super(child: child);
@override
bool updateShouldNotify(_AvailableWidth oldWidget) =>
width != oldWidget.width;
}
class ResizableSidePanel extends StatefulWidget {
static const double minWidth = 150;
static const double maxWidth = 300;
final String optionKey;
final double defaultWidth;
final Widget child;
const ResizableSidePanel({
Key? key,
required this.optionKey,
required this.defaultWidth,
required this.child,
}) : super(key: key);
@override
State<ResizableSidePanel> createState() => _ResizableSidePanelState();
}
class _ResizableSidePanelState extends State<ResizableSidePanel> {
late double _width;
double _cap = double.infinity;
@override
void initState() {
super.initState();
final saved =
double.tryParse(bind.mainGetLocalOption(key: widget.optionKey));
_width = _clamp(saved ?? widget.defaultWidth);
}
double _clamp(double w) =>
w.clamp(ResizableSidePanel.minWidth, ResizableSidePanel.maxWidth)
.toDouble();
void _persist() => bind.mainSetLocalOption(
key: widget.optionKey, value: _width.toStringAsFixed(0));
@override
Widget build(BuildContext context) {
final available = context
.dependOnInheritedWidgetOfExactType<_AvailableWidth>()
?.width;
final room = (available ?? double.infinity) - _kDividerWidth;
_cap = room.isFinite
? max(
0.0,
max(room - _kPeerCardWidth,
min(ResizableSidePanel.minWidth, room - _kMinContentWidth)))
: double.infinity;
final sign = Directionality.of(context) == TextDirection.rtl ? -1.0 : 1.0;
return Row(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(width: min(_width, _cap), child: widget.child),
MouseRegion(
cursor: SystemMouseCursors.resizeLeftRight,
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onHorizontalDragUpdate: (details) => setState(() => _width =
_clamp(min(_width, _cap) + sign * details.delta.dx)),
onHorizontalDragEnd: (_) => _persist(),
onHorizontalDragCancel: _persist,
child:
const SizedBox(width: _kDividerWidth, height: double.infinity),
),
),
],
);
}
}
extension ResizableSidePanelExt on Widget {
Widget resizable(String optionKey, {required double defaultWidth}) =>
ResizableSidePanel(
optionKey: optionKey, defaultWidth: defaultWidth, child: this);
}
+37 -20
View File
@@ -476,7 +476,9 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
);
}
// osPassword
if (isDefaultConn && perms['keyboard'] != false) {
if (isDefaultConn &&
perms['keyboard'] != false &&
bind.mainGetBuildinOption(key: kOptionHideToolbarOsPassword) != 'Y') {
v.add(
TTextMenu(
child: Row(children: [
@@ -501,7 +503,9 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
// paste
if (isDefaultConn &&
pi.platform != kPeerPlatformAndroid &&
perms['keyboard'] != false) {
perms['keyboard'] != false &&
bind.mainGetBuildinOption(key: kOptionHideToolbarSendClipboardKeystrokes) !=
'Y') {
v.add(TTextMenu(
child: Text(translate('Send clipboard keystrokes')),
onPressed: () async {
@@ -595,21 +599,27 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
child: Text(translate('Transfer file')),
onPressed: () => connectWithToken(isFileTransfer: true)),
);
v.add(
TTextMenu(
child: Text(translate('View camera')),
onPressed: () => connectWithToken(isViewCamera: true)),
);
v.add(
TTextMenu(
child: Text('${translate('Terminal')} (beta)'),
onPressed: () => connectWithToken(isTerminal: true)),
);
v.add(
TTextMenu(
child: Text(translate('TCP tunneling')),
onPressed: () => connectWithToken(isTcpTunneling: true)),
);
if (bind.mainGetBuildinOption(key: kOptionHideToolbarViewCamera) != 'Y') {
v.add(
TTextMenu(
child: Text(translate('View camera')),
onPressed: () => connectWithToken(isViewCamera: true)),
);
}
if (bind.mainGetBuildinOption(key: kOptionHideToolbarTerminal) != 'Y') {
v.add(
TTextMenu(
child: Text('${translate('Terminal')} (beta)'),
onPressed: () => connectWithToken(isTerminal: true)),
);
}
if (bind.mainGetBuildinOption(key: kOptionHideToolbarTcpTunneling) != 'Y') {
v.add(
TTextMenu(
child: Text(translate('TCP tunneling')),
onPressed: () => connectWithToken(isTcpTunneling: true)),
);
}
}
// note
if (isDefaultConn && !bind.isDisableAccount()) {
@@ -697,6 +707,7 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
ffiModel.keyboard &&
pi.platform != kPeerPlatformAndroid &&
versionCmp(pi.version, '1.2.0') >= 0 &&
bind.mainGetBuildinOption(key: kOptionHideToolbarSwitchSides) != 'Y' &&
bind.peerGetSessionsCount(id: id, connType: ffi.connType.index) == 1) {
v.add(TTextMenu(
child: Text(translate('Switch Sides')),
@@ -739,7 +750,9 @@ List<TTextMenu> toolbarControls(BuildContext context, String id, FFI ffi) {
// to-do:
// 1. Web desktop
// 2. Mobile, copy the image to the clipboard
if ((isDefaultConn || ffi.connType == ConnType.viewCamera) && isDesktop) {
if ((isDefaultConn || ffi.connType == ConnType.viewCamera) &&
isDesktop &&
bind.mainGetBuildinOption(key: kOptionHideToolbarScreenshot) != 'Y') {
final isScreenshotSupported = bind.sessionGetCommonSync(
sessionId: sessionId, key: 'is_screenshot_supported', param: '');
if ('true' == isScreenshotSupported) {
@@ -1202,12 +1215,16 @@ Future<List<TToggleMenu>> toolbarDisplayToggle(
child: Text(translate('True color (4:4:4)'))));
}
if (isDefaultConn && isMobile) {
final showMobileKeyboardSettings = isDefaultConn &&
isMobile &&
bind.mainGetBuildinOption(key: kOptionHideToolbarKeyboardSettings) !=
'Y';
if (showMobileKeyboardSettings) {
v.addAll(toolbarKeyboardToggles(ffi));
}
// view mode (mobile only, desktop is in keyboard menu)
if (isDefaultConn && isMobile && versionCmp(pi.version, '1.2.0') >= 0) {
if (showMobileKeyboardSettings && versionCmp(pi.version, '1.2.0') >= 0) {
v.add(TToggleMenu(
value: ffiModel.viewOnly,
onChanged: (value) async {
+19
View File
@@ -83,12 +83,14 @@ const String kWindowEventGetCachedSessionData = "get_cached_session_data";
const String kWindowEventOpenMonitorSession = "open_monitor_session";
const String kOptionViewStyle = "view_style";
const String kOptionKeyboardMode = "keyboard_mode";
const String kOptionScrollStyle = "scroll_style";
const String kOptionEdgeScrollEdgeThickness = "edge-scroll-edge-thickness";
const String kOptionImageQuality = "image_quality";
const String kOptionOpenNewConnInTabs = "enable-open-new-connections-in-tabs";
const String kOptionTextureRender = "use-texture-render";
const String kOptionD3DRender = "allow-d3d-render";
const String kOptionAllowUnicodeInput = "allow-unicode-input";
const String kOptionOpenInTabs = "allow-open-in-tabs";
const String kOptionOpenInWindows = "allow-open-in-windows";
const String kOptionForceAlwaysRelay = "force-always-relay";
@@ -105,6 +107,7 @@ const String kOptionAutoDisconnectTimeout = "auto-disconnect-timeout";
const String kOptionEnableHwcodec = "enable-hwcodec";
const String kOptionAllowAutoRecordIncoming = "allow-auto-record-incoming";
const String kOptionAllowAutoRecordOutgoing = "allow-auto-record-outgoing";
const String kOptionAllowDrmCapture = "allow-drm-capture";
const String kOptionHideRecordingButton = "hide-recording-button";
const String kOptionVideoSaveDirectory = "video-save-directory";
const String kOptionAccessMode = "access-mode";
@@ -160,6 +163,9 @@ const String kOptionRemoteMenubarFraction = "remote-menubar-frac";
const String kOptionAllowMultiEdgeToolbarDock =
"allow-multi-edge-toolbar-dock";
const String kOptionHideAbTagsPanel = "hideAbTagsPanel";
const String kOptionAbTagsPanelWidth = "ab-tags-panel-width";
const String kOptionAccessibleDevicesPanelWidth =
"accessible-devices-panel-width";
const String kOptionRemoteMenubarState = "remoteMenubarState";
const String kOptionPeerSorting = "peer-sorting";
const String kOptionPeerTabIndex = "peer-tab-index";
@@ -206,6 +212,19 @@ const String kOptionHideProxySetting = "hide-proxy-settings";
const String kOptionHideWebSocketSetting = "hide-websocket-settings";
const String kOptionHideStopService = "hide-stop-service";
const String kOptionHideAccountPasswordLogin = "hide-account-password-login";
const String kOptionHideToolbarOsPassword = "hide-toolbar-os-password";
const String kOptionHideToolbarSendClipboardKeystrokes =
"hide-toolbar-send-clipboard-keystrokes";
const String kOptionHideToolbarViewCamera = "hide-toolbar-view-camera";
const String kOptionHideToolbarTerminal = "hide-toolbar-terminal";
const String kOptionHideToolbarTcpTunneling = "hide-toolbar-tcp-tunneling";
const String kOptionHideToolbarSwitchSides = "hide-toolbar-switch-sides";
const String kOptionHideToolbarScreenshot = "hide-toolbar-screenshot";
const String kOptionHideToolbarVoiceCall = "hide-toolbar-voice-call";
const String kOptionHideToolbarDisplaySettings =
"hide-toolbar-display-settings";
const String kOptionHideToolbarKeyboardSettings =
"hide-toolbar-keyboard-settings";
const String kOptionQuitButtonText = "quit-button-text";
const String kOptionHideRemotePrinterSetting = "hide-remote-printer-settings";
const String kOptionHideGeneralSetting = "hide-general-settings";
@@ -531,25 +531,29 @@ class _DesktopHomePageState extends State<DesktopHomePage>
return Container();
}
final LinuxCards = <Widget>[];
if (bind.isSelinuxEnforcing()) {
// Check is SELinux enforcing, but show user a tip of is SELinux enabled for simple.
final keyShowSelinuxHelpTip = "show-selinux-help-tip";
if (bind.mainGetLocalOption(key: keyShowSelinuxHelpTip) != 'N') {
final drmSupported = bind.mainIsInstalled() &&
bind.mainGetCommonSync(key: 'is-drm-capture-supported') == 'true';
if (drmSupported && mainGetBoolOptionSync(kOptionAllowDrmCapture)) {
// DRM capture reaches the session and the login screen: no warning.
} else if (drmSupported &&
!isOptionFixed(kOptionAllowDrmCapture) &&
!bind.isDisableSettings()) {
final currentIsWayland = bind.mainCurrentIsWayland();
if (currentIsWayland || bind.mainIsLoginWayland()) {
LinuxCards.add(buildInstallCard(
"Warning",
"selinux_tip",
"",
() async {},
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
help: 'Help',
link:
'https://rustdesk.com/docs/en/client/linux/#permissions-issue',
closeButton: true,
closeOption: keyShowSelinuxHelpTip,
));
"Warning",
currentIsWayland ? "wayland-drm-tip" : "login-wayland-drm-tip",
"Enable", () async {
await mainSetBoolOption(kOptionAllowDrmCapture, true);
setState(() {});
},
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
help: 'Help',
link: currentIsWayland
? 'https://rustdesk.com/docs/en/client/linux/#x11-required'
: 'https://rustdesk.com/docs/en/client/linux/#login-screen'));
}
}
if (bind.mainCurrentIsWayland()) {
} else if (bind.mainCurrentIsWayland()) {
LinuxCards.add(buildInstallCard(
"Warning", "wayland_experiment_tip", "", () async {},
marginTop: LinuxCards.isEmpty ? 20.0 : 5.0,
@@ -527,6 +527,14 @@ class _GeneralState extends State<_General> {
final showAutoUpdate = (isWindows && bind.mainIsInstalled()) ||
(isMacOS && bind.mainIsInstalled() && bind.mainIsInstalledDaemon(prompt: false) && !bind.isCustomClient());
final children = <Widget>[
if (!isWeb && isWindows && !incomingOnly)
_OptionCheckBox(
context,
'Enable Unicode input',
kOptionAllowUnicodeInput,
isServer: false,
trailing: const InfoTooltipIcon(tipKey: 'unicode-input-tip'),
),
if (!isWeb && !incomingOnly)
_OptionCheckBox(context, 'Confirm before closing multiple tabs',
kOptionEnableConfirmClosingTabs,
@@ -1997,6 +2005,23 @@ class _NetworkState extends State<_Network> with AutomaticKeepAliveClientMixin {
}
}
bool shouldShowKeyboardModeSetting() {
if (isWeb) return true;
final supportedInputSources = bind.mainSupportedInputSource();
if (supportedInputSources.isEmpty) return false;
try {
final sources = jsonDecode(supportedInputSources);
return sources is List &&
sources.any((source) =>
source is List &&
source.isNotEmpty &&
source.first != 'Input source 2');
} on FormatException catch (e) {
debugPrint('Failed to decode supported input sources: $e');
return false;
}
}
class _Display extends StatefulWidget {
const _Display({Key? key}) : super(key: key);
@@ -2014,6 +2039,7 @@ class _DisplayState extends State<_Display> {
imageQuality(context),
codec(context),
if (isDesktop) trackpadSpeed(context),
if (shouldShowKeyboardModeSetting()) keyboardMode(),
if (!isWeb) privacyModeImpl(context),
other(context),
]).marginOnly(bottom: _kListViewBottomMargin);
@@ -2145,6 +2171,26 @@ class _DisplayState extends State<_Display> {
]);
}
Widget keyboardMode() {
return _Card(title: 'Keyboard mode', children: [
ComboBox(
keys: [kKeyMapMode, kKeyTranslateMode, kKeyLegacyMode],
values: [
translate('Map mode'),
translate('Translate mode'),
translate('Legacy mode'),
],
initialKey: bind.mainGetUserDefaultOption(key: kOptionKeyboardMode),
enabled: !isOptionFixed(kOptionKeyboardMode),
onChanged: (mode) async {
await bind.mainSetUserDefaultOption(
key: kOptionKeyboardMode, value: mode);
if (mounted) setState(() {});
},
).marginOnly(left: _kContentHMargin),
]);
}
Widget codec(BuildContext context) {
onChanged(String value) async {
await bind.mainSetUserDefaultOption(
@@ -2890,6 +2936,19 @@ class _WaylandCardState extends State<WaylandCard> {
"true";
final children = [
if (isLinux &&
bind.mainIsInstalled() &&
!bind.isOutgoingOnly() &&
!bind.isDisableSettings() &&
bind.mainGetCommonSync(key: 'is-drm-capture-supported') ==
'true') ...[
_OptionCheckBox(
context, 'Use DRM screen capture', kOptionAllowDrmCapture),
Align(
alignment: Alignment.topLeft,
child: Text(translate('drm-capture-tip')),
).marginOnly(left: _kCardLeftMargin),
],
if (restoreToken.isNotEmpty)
_buildClearScreenSelection(context, restoreToken),
if (hasShortcutsPermission)
@@ -836,14 +836,19 @@ class _RemoteToolbarState extends State<RemoteToolbar> {
toolbarItems
.add(_ControlMenu(id: widget.id, ffi: widget.ffi, state: widget.state));
toolbarItems.add(_DisplayMenu(
id: widget.id,
ffi: widget.ffi,
state: widget.state,
setFullscreen: _setFullscreen,
));
if (bind.mainGetBuildinOption(key: kOptionHideToolbarDisplaySettings) !=
'Y') {
toolbarItems.add(_DisplayMenu(
id: widget.id,
ffi: widget.ffi,
state: widget.state,
setFullscreen: _setFullscreen,
));
}
// Do not show keyboard for camera connection type.
if (widget.ffi.connType == ConnType.defaultConn) {
if (widget.ffi.connType == ConnType.defaultConn &&
bind.mainGetBuildinOption(key: kOptionHideToolbarKeyboardSettings) !=
'Y') {
toolbarItems.add(_KeyboardMenu(id: widget.id, ffi: widget.ffi));
}
toolbarItems.add(_ChatMenu(id: widget.id, ffi: widget.ffi));
@@ -2836,7 +2841,8 @@ class _ChatMenuState extends State<_ChatMenu> {
@override
Widget build(BuildContext context) {
if (isWeb) {
if (isWeb ||
bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) == 'Y') {
return buildTextChatButton();
} else {
return _IconSubmenuButton(
+52 -28
View File
@@ -1015,40 +1015,64 @@ class BottomSheetBody extends StatelessWidget {
final _actions = actions ?? [];
return BottomSheet(
builder: (BuildContext context) {
final mediaQuery = MediaQuery.of(context);
final view = View.maybeOf(context);
final viewBottomPadding = view != null && view.devicePixelRatio > 0
? view.padding.bottom / view.devicePixelRatio
: 0.0;
final bottomInset = mediaQuery.padding.bottom > viewBottomPadding
? mediaQuery.padding.bottom
: viewBottomPadding;
return Container(
height: 65,
alignment: Alignment.centerLeft,
decoration: BoxDecoration(
color: MyTheme.accent50,
borderRadius: BorderRadius.vertical(top: Radius.circular(10))),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
leading,
SizedBox(width: 16),
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
child: SafeArea(
top: false,
minimum: EdgeInsets.only(bottom: bottomInset),
child: Container(
height: 65,
alignment: Alignment.centerLeft,
padding: EdgeInsets.symmetric(horizontal: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Row(
children: [
Text(title, style: TextStyle(fontSize: 18)),
Text(text,
style: TextStyle(fontSize: 14)) // TODO color
leading,
SizedBox(width: 16),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 18)),
Text(text,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14)) // TODO color
],
),
)
],
)
],
),
Row(children: () {
_actions.add(IconButton(
icon: Icon(Icons.cancel_outlined),
onPressed: onCanceled,
));
return _actions;
}())
],
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: [
..._actions,
IconButton(
icon: Icon(Icons.cancel_outlined),
onPressed: onCanceled,
),
],
)
],
),
),
));
},
+58 -38
View File
@@ -566,12 +566,13 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
}
return Container(
color: MyTheme.canvasColor,
child: inputModel.isPhysicalMouse.value
? getBodyForMobile()
: RawTouchGestureDetectorRegion(
child: getBodyForMobile(),
ffi: gFFI,
),
child: withKeyHelpTools(
inputModel.isPhysicalMouse.value
? getBodyForMobile()
: RawTouchGestureDetectorRegion(
child: getBodyForMobile(),
ffi: gFFI,
)),
);
}),
),
@@ -620,14 +621,17 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
clientClose(sessionId, gFFI);
},
),
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
if (bind.mainGetBuildinOption(
key: kOptionHideToolbarDisplaySettings) !=
'Y')
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
] +
(isWebDesktop || ffiModel.viewOnly || !ffiModel.keyboard
? []
@@ -649,14 +653,17 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
color: Colors.white,
icon: Icon(Icons.keyboard),
onPressed: openKeyboard),
IconButton(
color: Colors.white,
icon: Icon(gFFI.ffiModel.touchMode
? Icons.touch_app
: Icons.mouse),
onPressed: () => setState(
() => _showGestureHelp = !_showGestureHelp),
),
if (bind.mainGetBuildinOption(
key: kOptionHideToolbarKeyboardSettings) !=
'Y')
IconButton(
color: Colors.white,
icon: Icon(gFFI.ffiModel.touchMode
? Icons.touch_app
: Icons.mouse),
onPressed: () => setState(
() => _showGestureHelp = !_showGestureHelp),
),
]) +
(isWeb
? []
@@ -706,6 +713,27 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
!gFFI.canvasModel.cursorEmbedded &&
!gFFI.inputModel.relativeMouseMode.value;
// The key bar sits above the canvas, outside its gesture region: a touch on the bar must not
// also reach the canvas recognizers, which would send it to the remote as a mouse event.
// The cursor and the touch-mode virtual mouse stay above the bar, as they were inside the canvas
// stack. The mouse-mode virtual mouse stays inside the region: see getBodyForMobile.
Widget withKeyHelpTools(Widget body) => Stack(children: [
Positioned.fill(child: body),
Obx(() {
final chatKeyboardRequested =
gFFI.chatModel.softKeyboardRequested.value;
return KeyHelpTools(
keyboardIsVisible: keyboardVisibilityController.isVisible &&
(_showEdit || chatKeyboardRequested),
showGestureHelp: _showGestureHelp);
}),
if (showCursorPaint) CursorPaint(widget.id),
if (gFFI.ffiModel.touchMode)
FloatingMouse(
ffi: gFFI,
),
]);
Widget getBodyForMobile() {
return Container(
color: MyTheme.canvasColor,
@@ -717,14 +745,6 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
right: 10,
child: QualityMonitor(gFFI.qualityMonitorModel),
),
Obx(() {
final chatKeyboardRequested =
gFFI.chatModel.softKeyboardRequested.value;
return KeyHelpTools(
keyboardIsVisible: keyboardVisibilityController.isVisible &&
(_showEdit || chatKeyboardRequested),
showGestureHelp: _showGestureHelp);
}),
SizedBox(
width: 0,
height: 0,
@@ -756,14 +776,9 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
).workaroundFreezeLinuxMint(),
),
];
if (showCursorPaint) {
paints.add(CursorPaint(widget.id));
}
if (gFFI.ffiModel.touchMode) {
paints.add(FloatingMouse(
ffi: gFFI,
));
} else {
// Holding a virtual button while another finger drags needs both pointers in the canvas
// recognizers (isSpecialHoldDragActive), so these stay inside the gesture region.
if (!gFFI.ffiModel.touchMode) {
paints.add(FloatingMouseWidgets(
ffi: gFFI,
));
@@ -899,6 +914,11 @@ class _RemotePageState extends State<RemotePage> with WidgetsBindingObserver {
VoiceCallStatus.waitingForResponse,
VoiceCallStatus.connected
].contains(gFFI.chatModel.voiceCallStatus.value);
if (!isInVoice &&
bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) == 'Y') {
onPressedTextChat(id);
return;
}
final menus = [
makeTextMenu('Text chat', Icon(Icons.message, color: MyTheme.accent),
() => onPressedTextChat(widget.id)),
+16 -8
View File
@@ -311,14 +311,17 @@ class _ViewCameraPageState extends State<ViewCameraPage>
clientClose(sessionId, gFFI);
},
),
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
if (bind.mainGetBuildinOption(
key: kOptionHideToolbarDisplaySettings) !=
'Y')
IconButton(
color: Colors.white,
icon: Icon(Icons.tv),
onPressed: () {
setState(() => _showEdit = false);
showOptions(context, widget.id, gFFI.dialogManager);
},
)
] +
(isWeb
? []
@@ -519,6 +522,11 @@ class _ViewCameraPageState extends State<ViewCameraPage>
VoiceCallStatus.waitingForResponse,
VoiceCallStatus.connected
].contains(gFFI.chatModel.voiceCallStatus.value);
if (!isInVoice &&
bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) == 'Y') {
onPressedTextChat(id);
return;
}
final menus = [
makeTextMenu('Text chat', Icon(Icons.message, color: MyTheme.accent),
() => onPressedTextChat(widget.id)),
+10
View File
@@ -1188,6 +1188,8 @@ class FfiModel with ChangeNotifier {
}
if (waitForFirstImage.isFalse) return;
// A second show under the same tag would orphan the first overlay: no dismiss can reach it.
clearWaitingForImage(dialogManager, sessionId);
dialogManager.show(
(setState, close, context) => CustomAlertDialog(
title: null,
@@ -1504,6 +1506,14 @@ class FfiModel with ChangeNotifier {
checkDesktopKeyboardMode() async {
if (isInputSourceFlutter) {
if (isWeb && !pi.isWayland) {
final mode = await bind.sessionGetKeyboardMode(sessionId: sessionId);
if (mode != null &&
bind.sessionIsKeyboardModeSupported(
sessionId: sessionId, mode: mode)) {
return;
}
}
// Local side, flutter keyboard input source
// Currently only map mode is supported, legacy mode is used for compatibility.
for (final mode in [kKeyMapMode, kKeyLegacyMode]) {
+18 -1
View File
@@ -21,6 +21,18 @@ import '../models/state_model.dart';
typedef ShortcutCallback = FutureOr<void> Function();
Iterable<String> _actionsInGroup(String titleKey) {
final groups = kKeyboardShortcutActionGroups.where((g) => g.titleKey == titleKey);
return allActionEntries(groups).map((entry) => entry.id);
}
final _toolbarOptionForShortcut = {
for (final id in _actionsInGroup('Display'))
id: kOptionHideToolbarDisplaySettings,
for (final id in _actionsInGroup('Keyboard'))
id: kOptionHideToolbarKeyboardSettings,
};
/// Per-session shortcut dispatcher. Attached to FFI when a session is created.
///
/// The Rust matcher (src/keyboard/shortcuts.rs) emits `shortcut_triggered`
@@ -82,6 +94,10 @@ class ShortcutModel {
/// belongs to RustDesk and is never forwarded to the remote.
void onTriggered(String actionId) {
if (parent.target?.closed != false) return;
final option = _toolbarOptionForShortcut[actionId];
if (option != null && bind.mainGetBuildinOption(key: option) == 'Y') {
return;
}
unawaited(Future.sync(() async {
final refresh = _refreshers[actionId];
if (refresh != null) {
@@ -467,7 +483,8 @@ void registerSessionShortcutActions(
if (status == VoiceCallStatus.connected ||
status == VoiceCallStatus.waitingForResponse) {
bind.sessionCloseVoiceCall(sessionId: sessionId);
} else {
} else if (bind.mainGetBuildinOption(key: kOptionHideToolbarVoiceCall) !=
'Y') {
bind.sessionRequestVoiceCall(sessionId: sessionId);
}
});
-4
View File
@@ -1749,10 +1749,6 @@ class RustdeskImpl {
return versionToNumber(v: version) > versionToNumber(v: '1.2.4');
}
bool isSelinuxEnforcing({dynamic hint}) {
return false;
}
String mainDefaultPrivacyModeImpl({dynamic hint}) {
throw UnimplementedError("mainDefaultPrivacyModeImpl");
}
+14
View File
@@ -27,6 +27,12 @@ void host_channel_call_handler(FlMethodChannel* channel, FlMethodCall* method_ca
GtkWidget *find_gl_area(GtkWidget *widget);
void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view);
// Added in Flutter 3.27. Declared weak so that this builds with Flutter 3.24,
// where it is NULL.
extern "C" void fl_view_set_background_color(FlView* view,
const GdkRGBA* color)
__attribute__((weak));
extern bool gIsConnectionManager;
// --- Side mouse button support (back/forward) ---
@@ -330,6 +336,14 @@ void try_set_transparent(GtkWindow* window, GdkScreen* screen, FlView* view)
gtk_gl_area_set_has_alpha(GTK_GL_AREA(gl_area), TRUE);
}
// Flutter >= 3.27 sets up its GtkGLArea for transparency itself (newer
// versions do not use one), but fills the view with an opaque black
// background unless a transparent background color is set.
if (fl_view_set_background_color != NULL) {
const GdkRGBA transparent = {0.0, 0.0, 0.0, 0.0};
fl_view_set_background_color(view, &transparent);
}
if (screen != NULL) {
GdkVisual *visual = NULL;
gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE);
@@ -6,6 +6,8 @@
<false/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.network.server</key>
+2
View File
@@ -41,6 +41,8 @@
<string>$(PRODUCT_COPYRIGHT)</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSCameraUsageDescription</key>
<string>Capture video from the camera for the purpose of remote camera viewing.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Record the sound from microphone for the purpose of the remote desktop.</string>
<key>NSPrincipalClass</key>
@@ -6,6 +6,8 @@
<false/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.network.client</key>
+2 -2
View File
@@ -339,8 +339,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: cddc2e64f8fefce4f80db87b20bcda2dd019bed6
resolved-ref: cddc2e64f8fefce4f80db87b20bcda2dd019bed6
ref: 27d0a46fcff13153b46e0777fe92ff03a5834286
resolved-ref: 27d0a46fcff13153b46e0777fe92ff03a5834286
url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window"
source: git
version: "0.1.0"
+2 -2
View File
@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# 1.1.9-1 works for android, but for ios it becomes 1.1.91, need to set it to 1.1.9-a.1 for iOS, will get 1.1.9.1, but iOS store not allow 4 numbers
version: 1.5.3+71
version: 1.5.4+72
environment:
sdk: '^3.1.0'
@@ -58,7 +58,7 @@ dependencies:
desktop_multi_window:
git:
url: https://github.com/rustdesk-org/rustdesk_desktop_multi_window
ref: cddc2e64f8fefce4f80db87b20bcda2dd019bed6
ref: 27d0a46fcff13153b46e0777fe92ff03a5834286
freezed_annotation: ^2.0.3
flutter_custom_cursor:
git:
@@ -0,0 +1,69 @@
import 'package:flutter/material.dart';
import 'package:flutter_hbb/mobile/pages/file_manager_page.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
Widget buildSubject({
VoidCallback? onCanceled,
List<IconButton>? actions,
}) {
return MaterialApp(
home: Scaffold(
bottomSheet: BottomSheetBody(
leading: const Icon(Icons.check),
title: 'Wybrano',
text: '1 elementów [Lokalny]',
onCanceled: onCanceled,
actions: actions,
),
),
);
}
testWidgets('keeps action buttons above bottom system navigation bar',
(tester) async {
tester.view.physicalSize = const Size(360, 800);
tester.view.devicePixelRatio = 1.0;
tester.view.padding = const FakeViewPadding(bottom: 48);
tester.view.viewPadding = const FakeViewPadding(bottom: 48);
addTearDown(tester.view.reset);
var canceled = false;
await tester.pumpWidget(buildSubject(
onCanceled: () => canceled = true,
actions: [
IconButton(icon: const Icon(Icons.save_alt), onPressed: () {}),
IconButton(icon: const Icon(Icons.compare_arrows), onPressed: () {}),
IconButton(icon: const Icon(Icons.delete_forever), onPressed: () {}),
],
));
expect(tester.takeException(), isNull);
expect(tester.getSize(find.byType(BottomSheetBody)).height, 113.0);
for (final icon in const [
Icons.save_alt,
Icons.compare_arrows,
Icons.delete_forever,
Icons.cancel_outlined,
]) {
expect(tester.getBottomRight(find.byIcon(icon)).dy,
lessThanOrEqualTo(752.0));
}
await tester.tap(find.byIcon(Icons.cancel_outlined));
await tester.pump();
expect(canceled, isTrue);
});
testWidgets('preserves default height when bottom inset is zero',
(tester) async {
tester.view.physicalSize = const Size(360, 800);
tester.view.devicePixelRatio = 1.0;
addTearDown(tester.view.reset);
await tester.pumpWidget(buildSubject());
expect(tester.takeException(), isNull);
expect(tester.getSize(find.byType(BottomSheetBody)).height, 65.0);
});
}
@@ -0,0 +1,27 @@
import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_test/flutter_test.dart';
class _Binding extends Fake implements RustdeskImpl {
final String sources;
_Binding(this.sources);
@override
String mainSupportedInputSource({dynamic hint}) => sources;
}
void main() {
test('Keyboard mode is hidden when only Input source 2 is available', () {
const source1 = '["Input source 1","input_source_1_tip"]';
const source2 = '["Input source 2","input_source_2_tip"]';
platformFFI.setBindingForTesting(_Binding('[$source2]'));
expect(shouldShowKeyboardModeSetting(), isFalse);
platformFFI.setBindingForTesting(_Binding('[$source1]'));
expect(shouldShowKeyboardModeSetting(), isTrue);
platformFFI.setBindingForTesting(_Binding('[$source1,$source2]'));
expect(shouldShowKeyboardModeSetting(), isTrue);
});
}
@@ -0,0 +1,66 @@
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/common/widgets/peers_view.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/desktop/pages/connection_page.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/peer_model.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:provider/provider.dart';
class _OutgoingClient extends Fake implements RustdeskImpl {
@override
bool isOutgoingOnly({dynamic hint}) => true;
@override
bool isDisableAb({dynamic hint}) => true;
@override
bool isDisableGroupPanel({dynamic hint}) => true;
@override
bool mainIsOptionFixed({required String key, dynamic hint}) => false;
@override
String mainGetLocalOption({required String key, dynamic hint}) => '';
@override
String getLocalFlutterOption({required String k, dynamic hint}) =>
k == kOptionPeerTabVisible ? '[false,false,false,false,false]' : '';
@override
Future<void> setLocalFlutterOption(
{required String k, required String v, dynamic hint}) async {}
@override
String translate(
{required String name, required String locale, dynamic hint}) =>
'';
@override
Future<String> mainGetLastRemoteId({dynamic hint}) async => '';
@override
Future<void> mainLoadRecentPeers({dynamic hint}) async {}
@override
Future<void> mainLoadLanPeers({dynamic hint}) async {}
}
void main() {
testWidgets('refreshing recent peers keeps the remote ID caret',
(tester) async {
isTest = true;
platformFFI.setBindingForTesting(_OutgoingClient());
await initGlobalFFI();
await tester.pumpWidget(MaterialApp(
theme: MyTheme.lightTheme,
home: ChangeNotifierProvider.value(
value: gFFI.peerTabModel,
child: const Scaffold(body: ConnectionPage()),
),
));
final field = find.descendant(
of: find.byType(RawAutocomplete<Peer>),
matching: find.byType(TextField));
await tester.showKeyboard(field);
await tester.pumpAndSettle();
await tester.enterText(field, 'lhb');
await platformFFI.tryHandle({'name': LoadEvent.recent, 'peers': '[]'});
await tester.pumpAndSettle();
expect(tester.widget<TextField>(field).controller!.selection,
const TextSelection.collapsed(offset: 3));
}, variant: TargetPlatformVariant.only(TargetPlatform.windows));
}
+123 -1
View File
@@ -2,10 +2,12 @@ import 'dart:async';
import 'dart:convert';
import 'package:dash_chat_2/dash_chat_2.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_hbb/common.dart' show SessionID;
import 'package:flutter_hbb/common/widgets/keyboard_shortcuts/shortcut_constants.dart';
import 'package:flutter_hbb/common/widgets/toolbar.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/chat_model.dart';
@@ -40,6 +42,35 @@ class _ChatBinding extends Fake implements RustdeskImpl {
}
}
class _ToolbarBinding extends _ChatBinding {
String option = '';
int voiceCallRequests = 0;
@override
Future<void> sessionRequestVoiceCall(
{required SessionID sessionId, dynamic hint}) async {
voiceCallRequests++;
}
@override
String mainGetBuildinOption({required String key, dynamic hint}) =>
key == option ? 'Y' : '';
@override
bool isDisableAccount({dynamic hint}) => false;
@override
int versionToNumber({required String v, dynamic hint}) => 1;
@override
int peerGetSessionsCount(
{required String id, required int connType, dynamic hint}) =>
1;
@override
String? sessionGetCommonSync(
{required SessionID sessionId,
required String key,
required String param,
dynamic hint}) =>
key == 'is_screenshot_supported' ? 'true' : null;
}
class _Chat extends ChatModel {
_Chat(FFI session) : super(WeakReference(session));
@@ -53,6 +84,9 @@ class _Chat extends ChatModel {
}
class _LegacyBinding extends _ChatBinding {
@override
String mainGetBuildinOption({required String key, dynamic hint}) => '';
final keys = <(String, bool, bool)>[];
@override
@@ -120,9 +154,11 @@ class _Session extends Fake implements FFI {
@override
late final _Chat chatModel = _Chat(this);
@override
late final ElevationModel elevationModel = ElevationModel(WeakReference(this));
@override
late ShortcutModel shortcutModel;
@override
ConnType get connType => ConnType.defaultConn;
ConnType connType = ConnType.defaultConn;
}
void main() {
@@ -189,6 +225,92 @@ void main() {
}
}
for (final (option, label) in [
(kOptionHideToolbarOsPassword, 'OS Password'),
(kOptionHideToolbarSendClipboardKeystrokes, 'Send clipboard keystrokes'),
(kOptionHideToolbarViewCamera, 'View camera'),
(kOptionHideToolbarTerminal, 'Terminal (beta)'),
(kOptionHideToolbarTcpTunneling, 'TCP tunneling'),
]) {
testWidgets('hiding $label leaves file transfer available', (tester) async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
Future<void> showControls() => tester.pumpWidget(MaterialApp(
home: Builder(builder: (context) {
return Column(children: [
for (final item in toolbarControls(context, session.id, session))
item.getChild(),
]);
}),
));
await showControls();
expect(find.text(label), findsOneWidget);
binding.option = option;
await showControls();
expect(find.text(label), findsNothing);
expect(find.text('Transfer file'), findsOneWidget);
});
}
for (final (option, action) in [
(kOptionHideToolbarSwitchSides, kShortcutActionSwitchSides),
(kOptionHideToolbarScreenshot, kShortcutActionScreenshot),
]) {
testWidgets('hiding $action removes its menu entry', (tester) async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
await tester.pumpWidget(const SizedBox());
final context = tester.element(find.byType(SizedBox));
bool hasEntry() => toolbarControls(context, session.id, session)
.any((item) => item.actionId == action);
expect(hasEntry(), isTrue);
binding.option = option;
expect(hasEntry(), isFalse);
if (action == kShortcutActionScreenshot) {
session.connType = ConnType.viewCamera;
expect(hasEntry(), isFalse);
binding.option = '';
expect(hasEntry(), isTrue);
}
});
}
for (final (option, action) in [
(kOptionHideToolbarDisplaySettings, kShortcutActionToggleMute),
(kOptionHideToolbarKeyboardSettings, kShortcutActionKeyboardModeMap),
]) {
test('$option blocks $action but allows text chat',
() async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
final calls = <String>[];
model.register(action, () => calls.add(action));
model.register(kShortcutActionToggleChat, () => calls.add('chat'));
model.onTriggered(action);
await pumpEventQueue();
binding.option = option;
model.onTriggered(action);
model.onTriggered(kShortcutActionToggleChat);
await pumpEventQueue();
expect(calls, [action, 'chat']);
});
}
test('the voice call shortcut respects the toolbar option', () async {
final binding = _ToolbarBinding();
platformFFI.setBindingForTesting(binding);
registerSessionShortcutActions(session);
model.onTriggered(kShortcutActionToggleVoiceCall);
await pumpEventQueue();
expect(binding.voiceCallRequests, 1);
binding.option = kOptionHideToolbarVoiceCall;
model.onTriggered(kShortcutActionToggleVoiceCall);
await pumpEventQueue();
expect(binding.voiceCallRequests, 1);
});
test('fresh Chat shortcut sends through its outgoing session', () async {
final binding = _ChatBinding();
platformFFI.setBindingForTesting(binding);
@@ -0,0 +1,68 @@
import 'package:flutter/material.dart';
import 'package:flutter_hbb/common.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/platform_model.dart';
import 'package:flutter_test/flutter_test.dart';
class _Binding extends Fake implements RustdeskImpl {
@override
String translate(
{required String name, required String locale, dynamic hint}) =>
name;
@override
String mainGetLocalOption({required String key, dynamic hint}) => '';
@override
String getLocalFlutterOption({required String k, dynamic hint}) => '';
@override
bool isDisableAb({dynamic hint}) => false;
@override
bool isDisableAccount({dynamic hint}) => false;
@override
bool isDisableGroupPanel({dynamic hint}) => false;
@override
Future<void> sessionOnWaitingForImageDialogShow(
{required SessionID sessionId, dynamic hint}) async {}
@override
Future<void> sessionInputOsPassword(
{required SessionID sessionId,
required String value,
dynamic hint}) async {}
}
void main() {
setUpAll(() async {
isTest = true;
platformFFI.setBindingForTesting(_Binding());
await initGlobalFFI();
});
// A reconnect to an already selected Windows session reports the wait twice.
testWidgets('no waiting dialog is left after a repeated wait is dismissed',
(tester) async {
await tester.pumpWidget(MaterialApp(
navigatorKey: globalKey,
home: const Scaffold(),
));
final model = gFFI.ffiModel;
model.waitForFirstImage.value = true;
for (var i = 0; i < 2; i++) {
model.showConnectedWaitingForImage(gFFI.dialogManager, gFFI.sessionId,
'success', 'Successful', kMsgboxTextWaitingForImage);
}
await tester.pump();
expect(find.text(kMsgboxTextWaitingForImage), findsWidgets);
// Both the first frame and leaving the remote page end in dismissAll().
gFFI.dialogManager.dismissAll();
await tester.pump(const Duration(seconds: 2));
expect(find.text(kMsgboxTextWaitingForImage), findsNothing);
});
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 39 KiB

+30
View File
@@ -16,6 +16,7 @@ pub const OPTION_ENABLE_REMOTE_PRINTER: &str = "enable-remote-printer";
pub const OPTION_DISABLE_CLIPBOARD: &str = "disable_clipboard";
pub const OPTION_LOCK_AFTER_SESSION_END: &str = "lock_after_session_end";
pub const OPTION_PRIVACY_MODE: &str = "privacy_mode";
pub const OPTION_REG_RECOVERY: &str = "reg_recovery";
pub const OPTION_TOUCH_MODE: &str = "touch-mode";
pub const OPTION_SYNC_INIT_CLIPBOARD: &str = "sync-init-clipboard";
pub const OPTION_THEME: &str = "theme";
@@ -75,6 +76,7 @@ pub const OPTION_VERIFICATION_METHOD: &str = "verification-method";
pub const OPTION_TEMPORARY_PASSWORD_LENGTH: &str = "temporary-password-length";
pub const OPTION_CUSTOM_RENDEZVOUS_SERVER: &str = "custom-rendezvous-server";
pub const OPTION_API_SERVER: &str = "api-server";
pub const OPTION_API_IDLE_HEARTBEAT_INTERVAL_SECONDS: &str = "api-idle-heartbeat-interval-seconds";
pub const OPTION_KEY: &str = "key";
pub const OPTION_PRESET_ADDRESS_BOOK_NAME: &str = "preset-address-book-name";
pub const OPTION_PRESET_ADDRESS_BOOK_TAG: &str = "preset-address-book-tag";
@@ -89,6 +91,7 @@ pub const OPTION_ENABLE_ANDROID_SOFTWARE_ENCODING_HALF_SCALE: &str =
"enable-android-software-encoding-half-scale";
pub const OPTION_ENABLE_TRUSTED_DEVICES: &str = "enable-trusted-devices";
pub const OPTION_TRUSTED_DEVICE_EXPIRATION: &str = "trusted-device-expiration-days";
pub const OPTION_ALLOW_DRM_CAPTURE: &str = "allow-drm-capture";
pub const OPTION_AV1_TEST: &str = "av1-test";
/// Maximum number of files allowed during a single file transfer request.
///
@@ -124,6 +127,17 @@ pub const OPTION_HIDE_REMOTE_PRINTER_SETTINGS: &str = "hide-remote-printer-setti
pub const OPTION_HIDE_WEBSOCKET_SETTINGS: &str = "hide-websocket-settings";
pub const OPTION_HIDE_STOP_SERVICE: &str = "hide-stop-service";
pub const OPTION_HIDE_ACCOUNT_PASSWORD_LOGIN: &str = "hide-account-password-login";
pub const OPTION_HIDE_TOOLBAR_OS_PASSWORD: &str = "hide-toolbar-os-password";
pub const OPTION_HIDE_TOOLBAR_SEND_CLIPBOARD_KEYSTROKES: &str =
"hide-toolbar-send-clipboard-keystrokes";
pub const OPTION_HIDE_TOOLBAR_VIEW_CAMERA: &str = "hide-toolbar-view-camera";
pub const OPTION_HIDE_TOOLBAR_TERMINAL: &str = "hide-toolbar-terminal";
pub const OPTION_HIDE_TOOLBAR_TCP_TUNNELING: &str = "hide-toolbar-tcp-tunneling";
pub const OPTION_HIDE_TOOLBAR_SWITCH_SIDES: &str = "hide-toolbar-switch-sides";
pub const OPTION_HIDE_TOOLBAR_SCREENSHOT: &str = "hide-toolbar-screenshot";
pub const OPTION_HIDE_TOOLBAR_VOICE_CALL: &str = "hide-toolbar-voice-call";
pub const OPTION_HIDE_TOOLBAR_DISPLAY_SETTINGS: &str = "hide-toolbar-display-settings";
pub const OPTION_HIDE_TOOLBAR_KEYBOARD_SETTINGS: &str = "hide-toolbar-keyboard-settings";
pub const OPTION_QUIT_BUTTON_TEXT: &str = "quit-button-text";
pub const OPTION_ALLOW_COMMAND_LINE_SETTINGS_WHEN_SETTINGS_DISABLED: &str =
"allow-command-line-settings-when-settings-disabled";
@@ -161,6 +175,7 @@ pub const OPTION_FLUTTER_CURRENT_AB_NAME: &str = "current-ab-name";
pub const OPTION_ALLOW_REMOTE_CM_MODIFICATION: &str = "allow-remote-cm-modification";
pub const OPTION_ALLOW_SYNC_CLIPBOARD_BETWEEN_SESSIONS: &str =
"allow-sync-clipboard-between-sessions";
pub const OPTION_ALLOW_UNICODE_INPUT: &str = "allow-unicode-input";
pub const OPTION_PRINTER_INCOMING_JOB_ACTION: &str = "printer-incomming-job-action";
pub const OPTION_PRINTER_ALLOW_AUTO_PRINT: &str = "allow-printer-auto-print";
@@ -186,6 +201,8 @@ pub const OPTION_DISABLE_GROUP_PANEL: &str = "disable-group-panel";
pub const OPTION_DISABLE_DISCOVERY_PANEL: &str = "disable-discovery-panel";
pub const OPTION_PRE_ELEVATE_SERVICE: &str = "pre-elevate-service";
pub const IPC_PRESERVED_KEYS: &[&str] = &[OPTION_REG_RECOVERY];
// DEFAULT_DISPLAY_SETTINGS, OVERWRITE_DISPLAY_SETTINGS
pub const KEYS_DISPLAY_SETTINGS: &[&str] = &[
OPTION_VIEW_ONLY,
@@ -209,6 +226,7 @@ pub const KEYS_DISPLAY_SETTINGS: &[&str] = &[
OPTION_USE_ALL_MY_DISPLAYS_FOR_THE_REMOTE_SESSION,
OPTION_VIEW_STYLE,
OPTION_TERMINAL_PERSISTENT,
OPTION_KEYBOARD_MODE,
OPTION_SCROLL_STYLE,
OPTION_EDGE_SCROLL_EDGE_THICKNESS,
OPTION_IMAGE_QUALITY,
@@ -312,6 +330,7 @@ pub const KEYS_SETTINGS: &[&str] = &[
OPTION_PROXY_PASSWORD,
OPTION_CUSTOM_RENDEZVOUS_SERVER,
OPTION_API_SERVER,
OPTION_API_IDLE_HEARTBEAT_INTERVAL_SECONDS,
OPTION_KEY,
OPTION_ALLOW_WEBSOCKET,
OPTION_WEBSOCKET_PORT,
@@ -335,6 +354,7 @@ pub const KEYS_SETTINGS: &[&str] = &[
OPTION_ALLOW_AUTO_UPDATE,
OPTION_ALLOW_KCP_CC,
OPTION_ALLOW_WEBRTC_CC,
OPTION_ALLOW_DRM_CAPTURE,
];
// BUILDIN_SETTINGS
@@ -354,6 +374,16 @@ pub const KEYS_BUILDIN_SETTINGS: &[&str] = &[
OPTION_HIDE_WEBSOCKET_SETTINGS,
OPTION_HIDE_STOP_SERVICE,
OPTION_HIDE_ACCOUNT_PASSWORD_LOGIN,
OPTION_HIDE_TOOLBAR_OS_PASSWORD,
OPTION_HIDE_TOOLBAR_SEND_CLIPBOARD_KEYSTROKES,
OPTION_HIDE_TOOLBAR_VIEW_CAMERA,
OPTION_HIDE_TOOLBAR_TERMINAL,
OPTION_HIDE_TOOLBAR_TCP_TUNNELING,
OPTION_HIDE_TOOLBAR_SWITCH_SIDES,
OPTION_HIDE_TOOLBAR_SCREENSHOT,
OPTION_HIDE_TOOLBAR_VOICE_CALL,
OPTION_HIDE_TOOLBAR_DISPLAY_SETTINGS,
OPTION_HIDE_TOOLBAR_KEYBOARD_SETTINGS,
OPTION_HIDE_USERNAME_ON_CARD,
OPTION_HIDE_HELP_CARDS,
OPTION_DEFAULT_CONNECT_PASSWORD,
+21 -1
View File
@@ -1667,7 +1667,8 @@ pub fn is_write_need_confirmation(
// We decide to give the decision whether to override the existing file to users,
// which obey the behavior of the file manager in our system.
let mut is_identical = false;
if remote_mt == local_mt && digest.file_size == metadata.len() {
// The peer's digest only carries whole seconds (see `get_current_digest()`).
if remote_mt.as_secs() == local_mt.as_secs() && digest.file_size == metadata.len() {
is_identical = true;
}
Ok(DigestCheckResult::NeedConfirm(FileTransferDigest {
@@ -1918,6 +1919,25 @@ mod tests {
assert!(dst.exists());
}
#[test]
fn write_confirmation_compares_modified_time_in_seconds() {
let tmp_root = TestTempDir::new("rustdesk_digest_secs");
std::fs::create_dir_all(&tmp_root.path).expect("create temp dir");
let file = tmp_root.join("same.txt");
std::fs::write(&file, b"content").expect("create file");
let mtime = filetime::FileTime::from_unix_time(1_700_000_000, 500_000_000);
filetime::set_file_mtime(&file, mtime).expect("set mtime");
let digest = FileTransferDigest {
last_modified: 1_700_000_000,
file_size: 7,
..Default::default()
};
assert!(matches!(
is_write_need_confirmation(false, &file.to_string_lossy(), &digest).unwrap(),
DigestCheckResult::NeedConfirm(d) if d.is_identical
));
}
#[test]
fn compressed_file_extensions_ignore_case() {
// Cameras and phones name their photos IMG_0001.JPG.
@@ -3,6 +3,8 @@ mod paste_observer;
mod paste_task;
pub mod pasteboard_context;
pub use pasteboard_context::has_rustdesk_file_url_owner;
pub fn should_handle_msg(msg: &crate::ClipboardFile) -> bool {
matches!(
msg,
@@ -29,6 +29,7 @@ lazy_static::lazy_static! {
}
pub const TEMP_FILE_PREFIX: &str = ".rustdesk_";
const RUSTDESK_FILE_URL_OWNER_TYPE: &str = "com.rustdesk.file-url-owner";
#[derive(Default, Debug, Clone, PartialEq)]
pub(super) struct PasteObserverInfo {
@@ -293,6 +294,10 @@ impl PasteboardContext {
)]);
let item = objc2_app_kit::NSPasteboardItem::new();
item.setDataProvider_forTypes(&ProtocolObject::from_id(provider), &types);
item.setString_forType(
&NSString::from_str(""),
&NSString::from_str(RUSTDESK_FILE_URL_OWNER_TYPE),
);
self.pasteboard.clearContents();
if !self
.pasteboard
@@ -430,3 +435,82 @@ pub fn create_pasteboard_context() -> ResultType<Box<PasteboardContext>> {
context.init();
Ok(context)
}
pub fn has_rustdesk_file_url_owner() -> bool {
autoreleasepool(|_| unsafe {
let Some(pasteboard): Option<Id<NSPasteboard>> =
msg_send_id![NSPasteboard::class(), generalPasteboard]
else {
return false;
};
let Some(items) = pasteboard.pasteboardItems() else {
return false;
};
items.iter().any(|item| {
item.types()
.iter()
.any(|ty| ty.to_string() == RUSTDESK_FILE_URL_OWNER_TYPE)
})
})
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn ownership_check_skips_lazy_provider_until_external_read() {
struct TempFileGuard(String);
impl Drop for TempFileGuard {
fn drop(&mut self) {
if let Err(e) = std::fs::remove_file(&self.0) {
eprintln!("failed to remove temp file {}: {e}", self.0);
}
}
}
let pasteboard: Option<Id<NSPasteboard>> =
unsafe { msg_send_id![NSPasteboard::class(), generalPasteboard] };
let pasteboard = pasteboard.expect("failed to get general pasteboard");
let (tx, rx) = channel();
let (tx_paste_task, rx_paste_task) = channel();
let context = PasteboardContext {
pasteboard: pasteboard.clone(),
observer: Arc::new(Mutex::new(PasteObserver::new())),
tx_handle: Some(ContextInfo {
tx,
handle: thread::spawn(|| {}),
}),
tx_remove_file: None,
remove_file_handle: None,
tx_paste_task,
paste_task: Arc::new(Mutex::new(PasteTask::new(rx_paste_task))),
};
let before_count = PasteboardContext::temp_files_count();
autoreleasepool(|_| {
context
.set_clipboard_item(context.tx_handle.as_ref().unwrap(), 9, 7)
.unwrap();
});
assert!(has_rustdesk_file_url_owner());
assert!(
rx.try_recv().is_err(),
"ownership check must not invoke lazy file-url provider"
);
assert_eq!(PasteboardContext::temp_files_count(), before_count);
let url = unsafe { pasteboard.stringForType(NSPasteboardTypeFileURL) }
.expect("external read should resolve lazy file URL")
.to_string();
let task_info = rx
.try_recv()
.expect("external read should notify provider channel")
.expect("provider should create placeholder file");
let _guard = TempFileGuard(task_info.source_path.clone());
assert!(url.ends_with(&task_info.source_path));
assert!(Path::new(&task_info.source_path).exists());
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "rustdesk-portable-packer"
version = "1.5.3"
version = "1.5.4"
edition = "2021"
description = "RustDesk Remote Desktop"
+3 -2
View File
@@ -14,7 +14,7 @@ wayland = ["gstreamer", "gstreamer-app", "gstreamer-video", "dbus", "tracing", "
# `drm` is a pure runtime-dlopen backend: rustdesk loads `libdrmtap.so.0` at runtime (`drmtap_dl.rs`)
# and NEVER link-time links it, so the graceful PipeWire fallback when the .so or EGL is absent is
# preserved and the drm build pulls in no libdrm/seccomp/cap/EGL link-time deps. The .so is pinned by
# `DRMTAP_SHA` in build.py, which fetches that exact commit (libdrmtap v0.5.12). We deliberately do
# `DRMTAP_SHA` in build.py, which fetches that exact commit (libdrmtap v0.6.1). We deliberately do
# NOT depend on the `libdrmtap-sys` crate: its build.rs statically compiles the whole libdrmtap C tree
# and a CAP_SYS_ADMIN helper and emits `-ldrm -lseccomp -lcap`, which would defeat the dlopen model.
# Depends on `wayland`: the three drm modules live inside the `#[cfg(feature = "wayland")]` arm of
@@ -42,6 +42,7 @@ features = ["dxgi", "dxgi1_2", "dxgi1_5", "dxgi1_6", "d3d11", "winuser", "winerr
[target.'cfg(target_os = "macos")'.dependencies]
block = "0.1"
objc = "0.2"
[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.13"
@@ -74,6 +75,6 @@ zbus = { version = "3.15", optional = true }
git = "https://github.com/rustdesk-org/hwcodec"
optional = true
[target.'cfg(any(target_os = "windows", target_os = "linux"))'.dependencies]
[target.'cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))'.dependencies]
nokhwa = { git = "https://github.com/rustdesk-org/nokhwa.git", branch = "fix_from_raw_parts", features = ["input-native"] }
+58 -13
View File
@@ -3,7 +3,7 @@ use std::{
sync::{Arc, Mutex},
};
#[cfg(any(target_os = "windows", target_os = "linux"))]
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
use nokhwa::{
pixel_format::RgbAFormat,
query,
@@ -18,7 +18,7 @@ use crate::AdapterDevice;
use crate::common::{bail, ResultType};
use crate::{Frame, TraitCapturer};
#[cfg(any(target_os = "windows", target_os = "linux"))]
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
use crate::{PixelBuffer, Pixfmt};
pub const PRIMARY_CAMERA_IDX: usize = 0;
@@ -26,7 +26,7 @@ lazy_static::lazy_static! {
static ref SYNC_CAMERA_DISPLAYS: Arc<Mutex<Vec<DisplayInfo>>> = Arc::new(Mutex::new(Vec::new()));
}
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
const CAMERA_NOT_SUPPORTED: &str = "This platform doesn't support camera yet";
pub struct Cameras;
@@ -36,9 +36,43 @@ pub fn primary_camera_exists() -> bool {
Cameras::exists(PRIMARY_CAMERA_IDX)
}
#[cfg(any(target_os = "windows", target_os = "linux"))]
/// nokhwa's AVFoundation query uses `AVCaptureDeviceDiscoverySession`, which exists only on
/// macOS 10.15+. Without it `class!` panics, and the release profile aborts the process.
#[cfg(target_os = "macos")]
pub fn is_camera_supported() -> bool {
objc::runtime::Class::get("AVCaptureDeviceDiscoverySession").is_some()
}
/// AVFoundation requires the camera permission to be requested (and granted) before any
/// other nokhwa call. Blocks up to 30s while the system prompt is shown.
#[cfg(target_os = "macos")]
fn ensure_macos_camera_permission() -> ResultType<()> {
if nokhwa::nokhwa_check() {
return Ok(());
}
let (tx, rx) = std::sync::mpsc::channel();
let tx = Mutex::new(tx);
nokhwa::nokhwa_initialize(move |granted| {
if let Ok(tx) = tx.lock() {
let _ = tx.send(granted);
}
});
match rx.recv_timeout(std::time::Duration::from_secs(30)) {
Ok(true) => Ok(()),
Ok(false) => bail!("Camera permission denied"),
Err(_) => bail!("Timed out waiting for camera permission"),
}
}
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
impl Cameras {
pub fn all_info() -> ResultType<Vec<DisplayInfo>> {
#[cfg(target_os = "macos")]
if !is_camera_supported() {
return Ok(Vec::new());
}
#[cfg(target_os = "macos")]
ensure_macos_camera_permission()?;
match query(ApiBackend::Auto) {
Ok(cameras) => {
let mut camera_displays = SYNC_CAMERA_DISPLAYS.lock().unwrap();
@@ -116,6 +150,10 @@ impl Cameras {
}
pub fn exists(index: usize) -> bool {
#[cfg(target_os = "macos")]
if !is_camera_supported() || !nokhwa::nokhwa_check() {
return false;
}
match query(ApiBackend::Auto) {
Ok(cameras) => index < cameras.len(),
_ => return false,
@@ -123,6 +161,14 @@ impl Cameras {
}
fn create_camera(index: &CameraIndex) -> ResultType<Camera> {
#[cfg(target_os = "macos")]
if !is_camera_supported() {
bail!("Camera is not supported on this macOS version");
}
#[cfg(target_os = "macos")]
if !nokhwa::nokhwa_check() {
bail!("Camera permission not granted");
}
let format_type = if cfg!(target_os = "linux") {
RequestedFormatType::None
} else {
@@ -158,7 +204,7 @@ impl Cameras {
}
}
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
impl Cameras {
pub fn all_info() -> ResultType<Vec<DisplayInfo>> {
return Ok(Vec::new());
@@ -181,18 +227,18 @@ impl Cameras {
}
}
#[cfg(any(target_os = "windows", target_os = "linux"))]
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
pub struct CameraCapturer {
camera: Camera,
data: Vec<u8>,
last_data: Vec<u8>, // for faster compare and copy
}
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
pub struct CameraCapturer;
impl CameraCapturer {
#[cfg(any(target_os = "windows", target_os = "linux"))]
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
fn new(current: usize) -> ResultType<Self> {
let index = CameraIndex::Index(current as u32);
let camera = Cameras::create_camera(&index)?;
@@ -204,14 +250,14 @@ impl CameraCapturer {
}
#[allow(dead_code)]
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
fn new(_current: usize) -> ResultType<Self> {
bail!(CAMERA_NOT_SUPPORTED);
}
}
impl TraitCapturer for CameraCapturer {
#[cfg(any(target_os = "windows", target_os = "linux"))]
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
fn frame<'a>(&'a mut self, _timeout: std::time::Duration) -> std::io::Result<Frame<'a>> {
// TODO: move this check outside `frame`.
if !self.camera.is_stream_open() {
@@ -228,9 +274,8 @@ impl TraitCapturer for CameraCapturer {
Ok(decoded) => {
self.data = decoded.as_raw().to_vec();
crate::would_block_if_equal(&mut self.last_data, &self.data)?;
// FIXME: macos's PixelBuffer cannot be directly created from bytes slice.
cfg_if::cfg_if! {
if #[cfg(any(target_os = "linux", target_os = "windows"))] {
if #[cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))] {
Ok(Frame::PixelBuffer(PixelBuffer::new(
&self.data,
Pixfmt::RGBA,
@@ -258,7 +303,7 @@ impl TraitCapturer for CameraCapturer {
}
}
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
fn frame<'a>(&'a mut self, _timeout: std::time::Duration) -> std::io::Result<Frame<'a>> {
Err(io::Error::new(
io::ErrorKind::Other,
+58 -2
View File
@@ -2,7 +2,7 @@
use super::drmtap_dl::{
self, drmtap_config, drmtap_ctx, drmtap_cursor_info, drmtap_device, drmtap_display,
drmtap_dmabuf_desc, drmtap_frame_info, DrmtapLib,
drmtap_dmabuf_desc, drmtap_frame_info, drmtap_packet, DrmtapLib,
};
use hbb_common::log;
use std::ffi::CString;
@@ -666,6 +666,62 @@ impl DrmReader {
}
}
pub fn has_packet(&self) -> bool {
self.lib.packet.is_some()
}
/// libdrmtap 0.6 packet grab: every lit plane of the CRTC, so also a window the compositor
/// put on an overlay or underlay plane, as opaque bytes plus a CLOEXEC dup of each of its
/// read-only dma-buf fds, in order. Errors map like `grab_desc`. Needs `has_packet()`. The
/// rotation of the frame is known only after the convert, so it is asked on that side.
pub fn grab_packet(&mut self) -> io::Result<(Vec<u8>, Vec<OwnedFd>)> {
let Some((grab, release, _)) = self.lib.packet else {
return Err(io::ErrorKind::Unsupported.into());
};
// SAFETY: self.ctx is valid and `pkt` zeroed caller storage. A successful grab owns its
// fds until `release`, which runs after they are dup'd; a failed grab owns none.
unsafe {
let mut pkt: drmtap_packet = std::mem::zeroed();
let ret = grab(self.ctx, &mut pkt);
if ret < 0 {
let errno = -ret;
if errno == hbb_common::libc::EAGAIN
|| errno == hbb_common::libc::EBUSY
|| errno == hbb_common::libc::EINTR
{
return Err(io::ErrorKind::WouldBlock.into());
}
// More than four lit planes and none of the kept ones covers the CRTC: keep the
// last frame, like grab_desc does on an underlay.
if errno == hbb_common::libc::E2BIG {
return Err(io::ErrorKind::WouldBlock.into());
}
if errno == hbb_common::libc::ENOTSUP {
return Err(io::Error::new(
io::ErrorKind::Unsupported,
"drmtap_grab_packet: no transferable dma-buf (ENOTSUP)",
));
}
return Err(io::Error::new(
io::ErrorKind::Other,
format!("drmtap_grab_packet failed: errno {errno}"),
));
}
let bytes = pkt.bytes[..(pkt.len as usize).min(pkt.bytes.len())].to_vec();
let fds = pkt.fds[..(pkt.nfds as usize).min(pkt.fds.len())]
.iter()
.map(|&fd| {
match hbb_common::libc::fcntl(fd, hbb_common::libc::F_DUPFD_CLOEXEC, 0) {
d if d >= 0 => Ok(OwnedFd::from_raw_fd(d)),
_ => Err(io::Error::last_os_error()),
}
})
.collect::<io::Result<Vec<_>>>();
release(&mut pkt);
fds.map(|fds| (bytes, fds))
}
}
/// Read the hardware cursor plane: the hidden sentinel when the plane reports the cursor invisible, the real shape when visible, and `None` when the read fails.
pub fn cursor(&mut self) -> Option<CursorSnapshot> {
// SAFETY: ctx valid; c zeroed; released on EVERY path after a successful get_cursor. Only a failed get_cursor returns without releasing, because then there is nothing to release.
@@ -912,7 +968,7 @@ const DRM_MODE_ROTATE_0: u32 = 1 << 0;
/// turned the scanout, so the frame arrives turned by the whole output transform, which is the
/// virtio-gpu and vmwgfx case this exists for. Anything else (`-ENOENT` with no plane bound, a
/// failed property read) is `None`, and the consumer keeps its pre-0.5.8 rule.
fn plane_rotation_answer(rc: c_int, rotation: u32) -> Option<u32> {
pub(super) fn plane_rotation_answer(rc: c_int, rotation: u32) -> Option<u32> {
if rc == 0 {
Some(rotation)
} else if rc == -hbb_common::libc::ENOTSUP {
+91
View File
@@ -170,6 +170,97 @@ impl RenderConverter {
Ok((data, w, h, pixfmt))
}
}
/// Composes a packet from `DrmReader::grab_packet` into one CRTC-sized frame; libdrmtap checks
/// the bytes and every fd before it uses them. Same output contract and checks as `convert()`.
pub fn convert_packet(
&mut self,
bytes: &[u8],
fds: &[RawFd],
) -> io::Result<(&[u8], u32, u32, Pixfmt)> {
let Some((_, _, convert_packet)) = self.lib.packet else {
return Err(io::Error::new(
io::ErrorKind::Other,
"drm: libdrmtap has no packet API",
));
};
// SAFETY: self.ctx is a valid render context; `bytes` and `fds` are only read during the
// call; `frame` is zeroed and libdrmtap owns its pixels, as in `convert()`.
unsafe {
let mut frame: drmtap_frame_info = std::mem::zeroed();
let ret = convert_packet(
self.ctx,
bytes.as_ptr(),
bytes.len(),
fds.as_ptr(),
fds.len(),
&mut frame,
);
if ret < 0 {
let errno = -ret;
if errno == hbb_common::libc::EAGAIN
|| errno == hbb_common::libc::EBUSY
|| errno == hbb_common::libc::EINTR
{
return Err(io::ErrorKind::WouldBlock.into());
}
return Err(io::Error::new(
io::ErrorKind::Other,
format!("drmtap_convert_packet failed: errno {errno}"),
));
}
if frame.data.is_null() || frame.width == 0 || frame.height == 0 || frame.stride == 0 {
return Err(io::Error::new(
io::ErrorKind::Other,
"drmtap_convert_packet produced an empty frame",
));
}
let w = frame.width;
let h = frame.height;
let stride = frame.stride as usize;
if w > MAX_DIM || h > MAX_DIM || stride < (w as usize) * 4 {
return Err(io::Error::new(
io::ErrorKind::Other,
format!(
"drmtap_convert_packet bad geometry {w}x{h} stride {stride} fourcc {:#010x}",
frame.format
),
));
}
let len = match stride.checked_mul(h as usize) {
Some(sz) if sz > 0 && sz <= MAX_FRAME_BYTES => sz,
other => {
return Err(io::Error::new(
io::ErrorKind::Other,
format!("drmtap_convert_packet frame size out of range ({other:?} bytes)"),
));
}
};
let pixfmt = match frame.format {
DRM_FORMAT_XRGB8888 | DRM_FORMAT_ARGB8888 => Pixfmt::BGRA,
DRM_FORMAT_XBGR8888 | DRM_FORMAT_ABGR8888 => Pixfmt::RGBA,
other => {
return Err(io::Error::new(
io::ErrorKind::Other,
format!("drmtap_convert_packet produced an unsupported output fourcc {other:#010x}"),
));
}
};
let data = std::slice::from_raw_parts(frame.data as *const u8, len);
Ok((data, w, h, pixfmt))
}
}
/// The DRM `rotation` of the frame the last `convert_packet` produced: rotate-0 for a composed
/// frame, the plane's own for one layer converted as its buffer. Same answers as
/// `DrmReader::plane_rotation`.
pub fn plane_rotation(&mut self) -> Option<u32> {
let f = self.lib.plane_rotation?;
let mut rotation: u32 = 0;
// SAFETY: self.ctx is a live context and `rotation` outlives the call.
let rc = unsafe { f(self.ctx, &mut rotation) };
super::drm_reader::plane_rotation_answer(rc, rotation)
}
}
impl Drop for RenderConverter {
+77 -15
View File
@@ -116,6 +116,16 @@ pub struct drmtap_cursor_info {
pub _priv: *mut c_void,
}
/// `drmtap_packet` (libdrmtap 0.6.0): every lit plane of the CRTC as opaque bytes plus their
/// dma-buf fds, filled by `drmtap_grab_packet` and handed as is to `drmtap_convert_packet`.
#[repr(C)]
pub struct drmtap_packet {
pub bytes: [u8; 1024],
pub len: u32,
pub nfds: u32,
pub fds: [c_int; 16],
}
// Resolved symbol typedefs.
type FnVersion = unsafe extern "C" fn() -> c_int;
@@ -152,6 +162,17 @@ type FnPlaneRotation = unsafe extern "C" fn(*mut drmtap_ctx, *mut u32) -> c_int;
type FnCrtcRefresh = unsafe extern "C" fn(*mut drmtap_ctx, *mut u64, *mut u64) -> c_int;
type FnConvertDmabuf =
unsafe extern "C" fn(*mut drmtap_ctx, *const drmtap_dmabuf_desc, *mut drmtap_frame_info) -> c_int;
type FnGrabPacket = unsafe extern "C" fn(*mut drmtap_ctx, *mut drmtap_packet) -> c_int;
type FnPacketRelease = unsafe extern "C" fn(*mut drmtap_packet);
type FnConvertPacket = unsafe extern "C" fn(
*mut drmtap_ctx,
*const u8,
usize,
*const c_int,
usize,
*mut drmtap_frame_info,
) -> c_int;
type FnAbi = unsafe extern "C" fn(*mut u32, *mut u32);
/// The dlopen'd libdrmtap; the `Library` is kept alive for the process lifetime, so the raw fn pointers stay valid.
pub struct DrmtapLib {
@@ -178,6 +199,9 @@ pub struct DrmtapLib {
/// Optional: it only exists from libdrmtap 0.5.9. Absent means the producer takes the
/// whole-hertz refresh of the enumeration as its pacing floor.
pub crtc_refresh: Option<FnCrtcRefresh>,
/// Optional: grab, release and convert of libdrmtap 0.6.0, all three or none. Absent means
/// frames travel as one `drmtap_dmabuf_desc`, as before.
pub packet: Option<(FnGrabPacket, FnPacketRelease, FnConvertPacket)>,
pub version: (c_int, c_int, c_int),
}
@@ -229,6 +253,7 @@ impl DrmtapLib {
render_node: None,
plane_rotation: Some(plane_rotation),
crtc_refresh: None,
packet: None,
version: (0, 5, 8),
}
}
@@ -246,14 +271,18 @@ const DRMTAP_ABI_MAJOR: c_int = 0;
// has been present since 0.4.10.
const DRMTAP_MIN_MINOR_PATCH: (c_int, c_int) = (5, 0);
// The MINOR series this build's mirrored structs were verified against: libdrmtap's header freezes
// only `drmtap_device` and `drmtap_dmabuf_desc`, so an unverified minor could be read at wrong offsets.
const DRMTAP_ABI_MINOR: c_int = 5;
// The newest MINOR series this build's mirrored structs were verified against: libdrmtap's header
// freezes only `drmtap_device`, `drmtap_dmabuf_desc` and `drmtap_packet`, so an unverified minor
// could be read at wrong offsets. 0.6 changed none of the structs 0.5 mirrors.
const DRMTAP_ABI_MINOR: c_int = 6;
// `DRMTAP_ABI_LEVEL` of the header this build mirrors (0.6.0). Level 2 adds the packet API; a
// library without `drmtap_abi` (0.5.x) is level 1.
const DRMTAP_ABI_LEVEL: u32 = 2;
/// Whether a library reporting `major.minor.patch` may be loaded (major and minor exact, patch at or above the floor).
/// Whether a library reporting `major.minor.patch` may be loaded (major exact, minor not newer than the verified one, at or above the floor).
fn abi_accepted(major: c_int, minor: c_int, patch: c_int) -> bool {
major == DRMTAP_ABI_MAJOR
&& minor == DRMTAP_ABI_MINOR
&& minor <= DRMTAP_ABI_MINOR
&& (minor, patch) >= DRMTAP_MIN_MINOR_PATCH
}
@@ -302,8 +331,8 @@ impl DrmtapLib {
let why = if major != DRMTAP_ABI_MAJOR {
"the struct layouts this build mirrors track the ABI major, so reading a \
frame descriptor through a mismatched one would mis-decode it"
} else if minor != DRMTAP_ABI_MINOR {
"this build mirrors the struct layouts of one minor and only that one; \
} else if minor > DRMTAP_ABI_MINOR {
"this build mirrors the struct layouts of the minors it was verified against; \
under 0.x semver the minor is the breaking axis, so an unverified minor \
could be read at the wrong offsets. Widening it is a deliberate act, done \
with the layouts re-checked field by field"
@@ -314,12 +343,29 @@ impl DrmtapLib {
let (min_minor, min_patch) = DRMTAP_MIN_MINOR_PATCH;
log::warn!(
"libdrmtap {name} reports v{major}.{minor}.{patch}, which this build cannot \
use (needs ABI major {DRMTAP_ABI_MAJOR}, minor {DRMTAP_ABI_MINOR}, at least \
use (needs ABI major {DRMTAP_ABI_MAJOR}, minor at most {DRMTAP_ABI_MINOR}, at least \
v{DRMTAP_ABI_MAJOR}.{min_minor}.{min_patch}): {why}. Refusing to load; \
falling back to PipeWire/portal."
);
return None;
}
// The level range the library serves; it must include the level this build was written for.
let abi_level = match lib.get::<FnAbi>(b"drmtap_abi") {
Ok(abi) => {
let (mut current, mut oldest) = (0u32, 0u32);
abi(&mut current, &mut oldest);
if !(oldest..=current).contains(&DRMTAP_ABI_LEVEL) {
log::warn!(
"libdrmtap {name} v{major}.{minor}.{patch} serves ABI levels \
{oldest}..={current}, not {DRMTAP_ABI_LEVEL}. Refusing to load; \
falling back to PipeWire/portal."
);
return None;
}
current
}
Err(_) => 1,
};
let open: FnOpen = *lib.get(b"drmtap_open").ok()?;
let close: FnClose = *lib.get(b"drmtap_close").ok()?;
let list_displays: FnListDisplays = *lib.get(b"drmtap_list_displays").ok()?;
@@ -363,6 +409,16 @@ impl DrmtapLib {
lib.get(b"drmtap_plane_rotation").ok().map(|s| *s);
let crtc_refresh: Option<FnCrtcRefresh> =
lib.get(b"drmtap_crtc_refresh").ok().map(|s| *s);
let packet = (|| {
if abi_level < 2 {
return None;
}
Some((
*lib.get::<FnGrabPacket>(b"drmtap_grab_packet").ok()?,
*lib.get::<FnPacketRelease>(b"drmtap_packet_release").ok()?,
*lib.get::<FnConvertPacket>(b"drmtap_convert_packet").ok()?,
))
})();
// Log the load only now that every required symbol resolved: this fn still returns None on a missing one.
let loaded_from = real
.as_ref()
@@ -439,6 +495,7 @@ impl DrmtapLib {
render_node,
plane_rotation,
crtc_refresh,
packet,
version: (major, minor, patch),
})
}
@@ -462,7 +519,9 @@ pub fn get() -> Option<&'static DrmtapLib> {
#[cfg(test)]
mod tests {
use super::{abi_accepted, DRMTAP_ABI_MAJOR, DRMTAP_ABI_MINOR, DRMTAP_MIN_MINOR_PATCH};
use super::{
abi_accepted, drmtap_packet, DRMTAP_ABI_MAJOR, DRMTAP_ABI_MINOR, DRMTAP_MIN_MINOR_PATCH,
};
#[test]
fn abi_gate_accepts_the_floor_and_later_patches_of_the_same_minor() {
@@ -474,6 +533,8 @@ mod tests {
"v0.{minor}.{patch} is a patch of the verified minor and must be accepted"
);
}
// Accepting 0.6 relies on its frozen `drmtap_packet`: bytes[1024], len, nfds, fds[16].
assert_eq!(std::mem::size_of::<drmtap_packet>(), 1024 + 4 + 4 + 16 * 4);
}
#[test]
@@ -481,16 +542,17 @@ mod tests {
// Relative to DRMTAP_ABI_MINOR, so the next bump cannot leave this test asserting that the
// NEW verified minor must be refused -- which is what a hardcoded list did before.
let verified = DRMTAP_ABI_MINOR;
for (minor, patch) in [
(verified - 1, 99),
(verified + 1, 0),
(verified + 1, 99),
(verified + 4, 9),
] {
for (minor, patch) in [(verified + 1, 0), (verified + 1, 99), (verified + 4, 9)] {
assert!(
!abi_accepted(DRMTAP_ABI_MAJOR, minor, patch),
"v0.{minor}.{patch} is an unverified minor and must be refused"
);
}
// Below the floor (0.4.x) is refused too.
let below = DRMTAP_MIN_MINOR_PATCH.0 - 1;
assert!(
!abi_accepted(DRMTAP_ABI_MAJOR, below, 99),
"v0.{below}.99 is below the floor"
);
}
}
+39 -10
View File
@@ -1,5 +1,4 @@
use crate::{quartz, Frame, Pixfmt};
use std::marker::PhantomData;
use std::sync::{Arc, Mutex, TryLockError};
use std::{io, mem};
@@ -56,8 +55,7 @@ impl crate::TraitCapturer for Capturer {
crate::would_block_if_equal(&mut self.saved_raw_data, frame.inner())?;
frame.surface_to_bgra(self.height());
Ok(Frame::PixelBuffer(PixelBuffer {
frame,
data: PhantomData,
source: PixelSource::Screen(frame),
width: self.width(),
height: self.height(),
}))
@@ -74,16 +72,43 @@ impl crate::TraitCapturer for Capturer {
}
}
enum PixelSource<'a> {
Screen(quartz::Frame),
Bytes {
data: &'a [u8],
pixfmt: Pixfmt,
stride: usize,
},
}
pub struct PixelBuffer<'a> {
frame: quartz::Frame,
data: PhantomData<&'a [u8]>,
source: PixelSource<'a>,
width: usize,
height: usize,
}
impl<'a> PixelBuffer<'a> {
/// Wraps tightly packed data (e.g. RGBA from a camera).
pub fn new(data: &'a [u8], pixfmt: Pixfmt, width: usize, height: usize) -> Self {
let stride = width * pixfmt.bytes_per_pixel();
PixelBuffer {
source: PixelSource::Bytes {
data,
pixfmt,
stride,
},
width,
height,
}
}
}
impl<'a> crate::TraitPixelBuffer for PixelBuffer<'a> {
fn data(&self) -> &[u8] {
&*self.frame
match &self.source {
PixelSource::Screen(frame) => &**frame,
PixelSource::Bytes { data, .. } => data,
}
}
fn width(&self) -> usize {
@@ -95,13 +120,17 @@ impl<'a> crate::TraitPixelBuffer for PixelBuffer<'a> {
}
fn stride(&self) -> Vec<usize> {
let mut v = Vec::new();
v.push(self.frame.stride());
v
match &self.source {
PixelSource::Screen(frame) => vec![frame.stride()],
PixelSource::Bytes { stride, .. } => vec![*stride],
}
}
fn pixfmt(&self) -> Pixfmt {
Pixfmt::BGRA
match &self.source {
PixelSource::Screen(_) => Pixfmt::BGRA,
PixelSource::Bytes { pixfmt, .. } => *pixfmt,
}
}
}
+5 -1
View File
@@ -24,7 +24,7 @@ use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use base::platform::linux::{WaylandDisplayInfo, CMD_SH};
use hbb_common::{anyhow::anyhow, bail, config, serde_json, tokio, ResultType};
use hbb_common::{anyhow::anyhow, bail, config, serde_json, ResultType};
use super::capturable::PixelProvider;
use super::capturable::{Capturable, Recorder};
@@ -1053,6 +1053,10 @@ const RESTORE_TOKEN: &str = "restore_token";
const RESTORE_TOKEN_CONF_KEY: &str = "wayland-restore-token";
const PIPEWIRE_DISPLAY_OFFSET_CONF_KEY: &str = "wayland-pipewire-display-offset";
pub fn has_restore_token() -> bool {
!config::LocalConfig::get_option(RESTORE_TOKEN_CONF_KEY).is_empty()
}
pub fn get_available_cursor_modes() -> Result<u32, dbus::Error> {
let conn = SyncConnection::new_session()?;
let portal = get_portal(&conn);
+7 -2
View File
@@ -1,5 +1,5 @@
pkgname=rustdesk
pkgver=1.5.3
pkgver=1.5.4
pkgrel=0
epoch=
pkgdesc=""
@@ -10,7 +10,7 @@ groups=()
depends=('gtk3' 'xdotool' 'libxcb' 'libxfixes' 'alsa-lib' 'libva' 'libappindicator-gtk3' 'gst-plugins-base' 'gst-plugin-pipewire')
makedepends=()
checkdepends=()
optdepends=()
optdepends=('libdrm: DRM screen capture' 'libglvnd: DRM screen capture')
provides=()
conflicts=()
replaces=()
@@ -24,6 +24,11 @@ md5sums=() #generate with 'makepkg -g'
package() {
if [[ ${FLUTTER} ]]; then
mkdir -p "${pkgdir}/usr/share/rustdesk" && cp -r ${HBB}/flutter/build/linux/x64/release/bundle/* -t "${pkgdir}/usr/share/rustdesk"
so=$(find "${DRMTAP_PREBUILT_DIR:-${HBB}/third_party/libdrmtap/build-pkg}" -maxdepth 1 -type f -name 'libdrmtap.so.0.*' 2>/dev/null || true)
if [[ -n "$so" ]]; then
install -Dm 755 "$so" -t "${pkgdir}/usr/lib/rustdesk"
ln -s "$(basename "$so")" "${pkgdir}/usr/lib/rustdesk/libdrmtap.so.0"
fi
fi
mkdir -p "${pkgdir}/usr/bin"
pushd ${pkgdir} && ln -s /usr/share/rustdesk/rustdesk usr/bin/rustdesk && popd
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 122 KiB

+2
View File
@@ -0,0 +1,2 @@
<key>NSCameraUsageDescription</key>
<string>Capture video from the camera for the purpose of remote camera viewing.</string>
+10 -2
View File
@@ -1,13 +1,17 @@
Name: rustdesk
Version: 1.5.3
Version: 1.5.4
Release: 0
Summary: RPM package
License: GPL-3.0
URL: https://rustdesk.com
Vendor: rustdesk <info@rustdesk.com>
Requires: gtk3 libxcb1 libXfixes3 alsa-utils libXtst6 libva2 gstreamer-plugins-base gstreamer-plugin-pipewire
Recommends: libayatana-appindicator3-1 xdotool
Recommends: libayatana-appindicator3-1 xdotool libdrm.so.2()(64bit) libEGL.so.1()(64bit) libGLESv2.so.2()(64bit)
Provides: libdesktop_drop_plugin.so()(64bit), libdesktop_multi_window_plugin.so()(64bit), libfile_selector_linux_plugin.so()(64bit), libflutter_custom_cursor_plugin.so()(64bit), libflutter_linux_gtk.so()(64bit), libscreen_retriever_plugin.so()(64bit), libtray_manager_plugin.so()(64bit), liburl_launcher_linux_plugin.so()(64bit), libwindow_manager_plugin.so()(64bit), libwindow_size_plugin.so()(64bit), libtexture_rgba_renderer_plugin.so()(64bit)
# libdrmtap is dlopen-ed by the root service only when DRM capture is on, and falls back if it cannot
# load, so its own dependencies (newer glibc, EGL, libdrm) must not become requirements of the package.
%global __requires_exclude_from ^/usr/lib/rustdesk/.*$
%global __provides_exclude_from ^/usr/lib/rustdesk/.*$
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/
@@ -31,9 +35,13 @@ install -Dm 644 $HBB/res/rustdesk.desktop -t "%{buildroot}/usr/share/rustdesk/fi
install -Dm 644 $HBB/res/rustdesk-link.desktop -t "%{buildroot}/usr/share/rustdesk/files"
install -Dm 644 $HBB/res/128x128@2x.png "%{buildroot}/usr/share/icons/hicolor/256x256/apps/rustdesk.png"
install -Dm 644 $HBB/res/scalable.svg "%{buildroot}/usr/share/icons/hicolor/scalable/apps/rustdesk.svg"
mkdir -p "%{buildroot}/usr/lib/rustdesk"
so=$(find "${DRMTAP_PREBUILT_DIR:-${HBB}/third_party/libdrmtap/build-pkg}" -maxdepth 1 -type f -name 'libdrmtap.so.0.*' 2>/dev/null || true)
if [ -n "$so" ]; then install -Dm 755 "$so" -t "%{buildroot}/usr/lib/rustdesk"; ln -s "$(basename "$so")" "%{buildroot}/usr/lib/rustdesk/libdrmtap.so.0"; fi
%files
/usr/share/rustdesk/*
/usr/lib/rustdesk
/usr/share/rustdesk/files/rustdesk.service
/usr/share/icons/hicolor/256x256/apps/rustdesk.png
/usr/share/icons/hicolor/scalable/apps/rustdesk.svg
+10 -2
View File
@@ -1,13 +1,17 @@
Name: rustdesk
Version: 1.5.3
Version: 1.5.4
Release: 0
Summary: RPM package
License: GPL-3.0
URL: https://rustdesk.com
Vendor: rustdesk <info@rustdesk.com>
Requires: gtk3 libxcb libXfixes alsa-lib libva gstreamer1-plugins-base
Recommends: libayatana-appindicator-gtk3 libxdo
Recommends: libayatana-appindicator-gtk3 libxdo libdrm.so.2()(64bit) libEGL.so.1()(64bit) libGLESv2.so.2()(64bit)
Provides: libdesktop_drop_plugin.so()(64bit), libdesktop_multi_window_plugin.so()(64bit), libfile_selector_linux_plugin.so()(64bit), libflutter_custom_cursor_plugin.so()(64bit), libflutter_linux_gtk.so()(64bit), libscreen_retriever_plugin.so()(64bit), libtray_manager_plugin.so()(64bit), liburl_launcher_linux_plugin.so()(64bit), libwindow_manager_plugin.so()(64bit), libwindow_size_plugin.so()(64bit), libtexture_rgba_renderer_plugin.so()(64bit)
# libdrmtap is dlopen-ed by the root service only when DRM capture is on, and falls back if it cannot
# load, so its own dependencies (newer glibc, EGL, libdrm) must not become requirements of the package.
%global __requires_exclude_from ^/usr/lib/rustdesk/.*$
%global __provides_exclude_from ^/usr/lib/rustdesk/.*$
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/
@@ -31,9 +35,13 @@ install -Dm 644 $HBB/res/rustdesk.desktop -t "%{buildroot}/usr/share/rustdesk/fi
install -Dm 644 $HBB/res/rustdesk-link.desktop -t "%{buildroot}/usr/share/rustdesk/files"
install -Dm 644 $HBB/res/128x128@2x.png "%{buildroot}/usr/share/icons/hicolor/256x256/apps/rustdesk.png"
install -Dm 644 $HBB/res/scalable.svg "%{buildroot}/usr/share/icons/hicolor/scalable/apps/rustdesk.svg"
mkdir -p "%{buildroot}/usr/lib/rustdesk"
so=$(find "${DRMTAP_PREBUILT_DIR:-${HBB}/third_party/libdrmtap/build-pkg}" -maxdepth 1 -type f -name 'libdrmtap.so.0.*' 2>/dev/null || true)
if [ -n "$so" ]; then install -Dm 755 "$so" -t "%{buildroot}/usr/lib/rustdesk"; ln -s "$(basename "$so")" "%{buildroot}/usr/lib/rustdesk/libdrmtap.so.0"; fi
%files
/usr/share/rustdesk/*
/usr/lib/rustdesk
/usr/share/rustdesk/files/rustdesk.service
/usr/share/icons/hicolor/256x256/apps/rustdesk.png
/usr/share/icons/hicolor/scalable/apps/rustdesk.svg
+1 -1
View File
@@ -1,5 +1,5 @@
Name: rustdesk
Version: 1.5.3
Version: 1.5.4
Release: 0
Summary: RPM package
License: GPL-3.0
+69
View File
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="250"
height="20"
viewBox="0 0 250 20"
role="img"
aria-label="RustDesk Server Pro: الميزات المتقدمة"
version="1.1"
id="svg4"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<title
id="title1">RustDesk Server Pro: الميزات المتقدمة</title>
<defs
id="defs2">
<linearGradient
id="shine"
x2="0"
y2="1">
<stop
offset="0"
stop-color="#fff"
stop-opacity=".1"
id="stop1" />
<stop
offset="1"
stop-color="#000"
stop-opacity=".1"
id="stop2" />
</linearGradient>
<clipPath
id="rounded">
<rect
width="250"
height="20"
rx="3"
id="rect2" />
</clipPath>
</defs>
<g
clip-path="url(#rounded)"
id="g3">
<path
fill="#555"
d="M0 0h125v20H0z"
id="path2" />
<path
fill="#007ec6"
d="M125 0h125v20H125z"
id="path3" />
<rect
width="250"
height="20"
fill="url(#shine)"
id="rect3" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-weight="400"
id="g4">
<g font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110" transform="scale(.1)"><text x="635" y="150" fill="#010101" fill-opacity=".3" textLength="1150">RustDesk Server Pro</text><text x="635" y="140" textLength="1150">RustDesk Server Pro</text></g>
<path
d="m 224.61963,5.6425781 h 0.98828 V 14 h -0.98828 z m -2.07324,6.3647459 q 0,0.956055 -0.46729,1.498535 Q 221.64941,14 220.82227,14 h -0.69825 v -0.988281 h 0.40284 q 0.53173,0 0.76806,-0.236328 0.26319,-0.263184 0.26319,-0.83252 V 5.6425781 h 0.98828 z m -4.01221,1.713379 q -0.521,0.547852 -1.26758,0.547852 -1.14941,0 -1.74023,-0.526367 Q 215.18262,14 214.62402,14 h -0.85937 v -0.988281 h 0.62305 q 0.27929,0 0.51562,-0.19336 0.23096,-0.187988 0.25781,-0.451171 0.10742,-0.972168 0.83252,-1.401856 0.50489,-0.300781 1.0044,-0.300781 0.38672,0 0.74121,0.155762 1.03662,0.4458 1.12793,1.342773 0.0268,0.263184 0.30078,0.596191 0.19336,0.236328 0.76807,0.236328 h 0.40283 v 0.988282 h -0.69825 q -0.94531,0 -1.10644,-0.263184 z m -2.48145,-0.789551 q 0.33301,0.370606 1.18702,0.370606 0.25244,0 0.35449,-0.09668 0.2793,-0.284668 0.2793,-0.655273 0,-0.102051 -0.0269,-0.198731 -0.11816,-0.472656 -0.42969,-0.563965 -0.20947,-0.06445 -0.41894,-0.06445 -0.28467,0 -0.50489,0.14502 -0.26855,0.177246 -0.34912,0.698242 -0.0376,0.19873 -0.0913,0.365234 z m -3.89404,0.606934 Q 211.74512,14 210.92871,14 h -0.4834 v -0.988281 h 0.18799 q 0.53174,0 0.76807,-0.236328 0.26318,-0.263184 0.26318,-0.83252 v -1.165527 h 0.98828 v 1.165527 q 0,0.569336 0.26319,0.83252 0.23632,0.236328 0.76806,0.236328 h 0.29541 V 14 h -0.59082 q -0.80566,0 -1.22998,-0.461914 z m 0.26856,1.267578 h 0.80566 v 0.805664 h -0.80566 z m -1.34278,0 h 0.80567 v 0.805664 h -0.80567 z m -3.20654,-3.759766 h 0.98828 q 0.16113,0.601563 0.17725,0.762696 0.0537,0.553222 0.4458,0.966797 0.22558,0.236328 0.76806,0.236328 h 0.40284 V 14 h -0.69825 q -0.69824,0 -0.96679,-0.333008 -0.36524,1.493164 -1.71338,2.20752 -1.52539,0.811035 -3.25488,0.811035 v -0.988281 q 1.63281,0 2.72314,-0.6875 1.1709,-0.741211 1.35889,-1.858399 0.0537,-0.311523 0.0537,-0.698242 0,-0.676758 -0.28467,-1.407227 z m -0.0376,-2.1484371 H 208.646 V 9.703125 h -0.80567 z m -5.37646,-3.2548828 h 0.98828 V 14 h -0.98828 z m -1.96045,4.7641599 q 0.0806,0.483399 0.0806,0.859375 0,0.725098 -0.4082,1.267578 -0.6875,0.918457 -2.39014,1.262207 -1.53076,0.311524 -2.52441,0.311524 -1.02588,0 -1.71875,-0.204102 -1.77246,-0.520996 -1.77246,-1.960449 0,-0.741211 0.33838,-1.235351 h 0.98828 q -0.34912,0.504882 -0.34912,1.235351 0,0.671387 1.09033,1.03125 0.55859,0.182617 1.36963,0.182617 0.99365,0 2.41699,-0.306152 1.36963,-0.290039 1.72949,-0.896973 0.29541,-0.499511 0.29541,-0.902343 0,-0.316895 -0.13427,-0.644532 z m -4.3291,-0.703613 h 0.80566 v 0.805664 h -0.80566 z m -1.34278,0 h 0.80567 v 0.805664 h -0.80567 z m -9.27588,-4.0605469 h 0.98829 V 14 h -0.98829 z m -2.07324,6.3647459 q 0,0.956055 -0.46728,1.498535 Q 182.58545,14 181.7583,14 h -0.69824 v -0.988281 h 0.40283 q 0.53174,0 0.76807,-0.236328 0.26318,-0.263184 0.26318,-0.83252 V 5.6425781 h 0.98828 z m -4.01221,1.713379 q -0.52099,0.547852 -1.26757,0.547852 -1.14942,0 -1.74024,-0.526367 Q 176.11865,14 175.56006,14 h -0.85938 v -0.988281 h 0.62305 q 0.2793,0 0.51563,-0.19336 0.23095,-0.187988 0.25781,-0.451171 0.10742,-0.972168 0.83252,-1.401856 0.50488,-0.300781 1.00439,-0.300781 0.38672,0 0.74121,0.155762 1.03662,0.4458 1.12793,1.342773 0.0269,0.263184 0.30078,0.596191 0.19336,0.236328 0.76807,0.236328 h 0.40283 v 0.988282 h -0.69824 q -0.94531,0 -1.10645,-0.263184 z m -2.48144,-0.789551 q 0.33301,0.370606 1.18701,0.370606 0.25244,0 0.35449,-0.09668 0.2793,-0.284668 0.2793,-0.655273 0,-0.102051 -0.0269,-0.198731 -0.11816,-0.472656 -0.42968,-0.563965 -0.20948,-0.06445 -0.41895,-0.06445 -0.28467,0 -0.50488,0.14502 -0.26856,0.177246 -0.34912,0.698242 -0.0376,0.19873 -0.0913,0.365234 z m -3.89404,0.606934 Q 172.68115,14 171.86475,14 h -0.4834 v -0.988281 h 0.18799 q 0.53173,0 0.76806,-0.236328 0.26319,-0.263184 0.26319,-0.83252 v -1.165527 h 0.98828 v 1.165527 q 0,0.569336 0.26318,0.83252 0.23633,0.236328 0.76807,0.236328 h 0.29541 V 14 h -0.59082 q -0.80567,0 -1.22998,-0.461914 z m 0.26855,-4.9091797 h 0.80567 v 0.805664 h -0.80567 z m -1.34277,0 h 0.80566 v 0.805664 h -0.80566 z m -2.79834,1.2783203 q 0.98291,0.4296874 1.11181,1.2353514 0.043,0.268555 0.043,0.494141 0,0.39209 -0.11279,0.655273 -0.15576,0.359863 -0.34912,0.628418 0.20947,0.09131 0.99902,0.09131 h 0.68213 V 14 h -1.16553 Q 169.7002,14 168.70654,13.693848 167.71289,14 166.98242,14 h -1.16553 v -0.988281 h 0.68213 q 0.78955,0 0.99903,-0.09131 -0.15576,-0.214844 -0.34912,-0.628418 -0.1128,-0.24707 -0.1128,-0.655273 0,-0.236328 0.043,-0.494141 0.12354,-0.768066 1.11719,-1.2353514 0.16113,-0.075195 0.51025,-0.075195 0.33838,0 0.51563,0.075195 z m -0.51563,0.9130864 q -0.0806,0 -0.17724,0.05371 -0.30078,0.171875 -0.42969,0.456543 -0.0537,0.112793 -0.0537,0.268555 0,0.230957 0.1289,0.515625 0.16651,0.365234 0.53174,0.483399 0.33838,-0.112793 0.53174,-0.483399 0.13428,-0.268555 0.13428,-0.515625 0,-0.128906 -0.0591,-0.268555 -0.12354,-0.279296 -0.42969,-0.456543 -0.10205,-0.05371 -0.17725,-0.05371 z m 0.23633,-2.9970708 h 0.80567 v 0.8056641 h -0.80567 z m -1.34277,0 h 0.80566 v 0.805664Line truncated
id="text4"
style="font-size:11px;font-family:'DejaVu Sans';direction:rtl"
aria-label="الميزات المتقدمة" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.5 KiB

+82 -5
View File
@@ -4,10 +4,11 @@ use hbb_common::{
config::Config,
get_time,
password_security::{decrypt_vec_or_original, encrypt_vec_or_original},
tls::TlsType,
ResultType,
};
use serde_derive::{Deserialize, Serialize};
use std::sync::Mutex;
use std::{fmt, sync::Mutex, time::Duration};
use totp_rs::{Algorithm, Secret, TOTP};
lazy_static::lazy_static! {
@@ -111,7 +112,7 @@ pub fn get_2fa(raw: Option<String>) -> Option<TOTP> {
.unwrap_or_default()
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
#[derive(Clone, Default, Serialize, Deserialize)]
pub struct TelegramBot {
#[serde(skip)]
pub token_str: String,
@@ -119,6 +120,16 @@ pub struct TelegramBot {
pub chat_id: String,
}
impl fmt::Debug for TelegramBot {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("TelegramBot")
.field("token_str", &"[redacted]")
.field("token", &"[redacted]")
.field("chat_id", &self.chat_id)
.finish()
}
}
impl TelegramBot {
fn into_string(&self) -> ResultType<String> {
let token = encrypt_vec_or_original(self.token_str.as_bytes(), "00", 1024);
@@ -154,18 +165,39 @@ impl TelegramBot {
}
}
// The URL carries the bot token: never fall back to accepting an invalid certificate, and drop
// the URL from errors so the token stays out of the log.
async fn post_telegram(url: String, body: String) -> ResultType<String> {
let resp = crate::hbbs_http::create_http_client_async(TlsType::Rustls, false)
.post(url)
.header("Content-Type", "application/json")
.body(body)
.timeout(Duration::from_secs(12))
.send()
.await
.map_err(|e| anyhow!("{:?}", e.without_url()))?;
resp.text()
.await
.map_err(|e| anyhow!("{:?}", e.without_url()))
}
// https://gist.github.com/dideler/85de4d64f66c1966788c1b2304b9caf1
pub async fn send_2fa_code_to_telegram(text: &str, bot: TelegramBot) -> ResultType<()> {
let url = format!("https://api.telegram.org/bot{}/sendMessage", bot.token_str);
let params = serde_json::json!({"chat_id": bot.chat_id, "text": text});
crate::post_request(url, params.to_string(), "").await?;
post_telegram(url, params.to_string()).await?;
Ok(())
}
pub fn get_chatid_telegram(bot_token: &str) -> ResultType<Option<String>> {
let url = format!("https://api.telegram.org/bot{}/getUpdates", bot_token);
// because caller is in tokio runtime, so we must call post_request_sync in new thread.
let handle = std::thread::spawn(move || crate::post_request_sync(url, "".to_owned(), ""));
// because caller is in tokio runtime, so we must run the request in a new thread.
let handle = std::thread::spawn(move || -> ResultType<String> {
hbb_common::tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()?
.block_on(post_telegram(url, String::new()))
});
let resp = handle.join().map_err(|_| anyhow!("Thread panicked"))??;
let value = serde_json::from_str::<serde_json::Value>(&resp).map_err(|e| anyhow!(e))?;
@@ -202,3 +234,48 @@ pub fn get_chatid_telegram(bot_token: &str) -> ResultType<Option<String>> {
Ok(chat_id)
}
#[cfg(test)]
mod tests {
use super::{post_telegram, TelegramBot};
use hbb_common::tokio::{self, net::TcpListener};
use std::sync::{
atomic::{AtomicUsize, Ordering},
Arc,
};
#[test]
fn telegram_bot_debug_redacts_both_token_fields() {
let bot = TelegramBot {
token_str: "test-telegram-token".to_owned(),
token: vec![17, 29, 43],
chat_id: "test-chat".to_owned(),
};
let debug = format!("{bot:?}");
assert!(!debug.contains(&bot.token_str));
assert!(!debug.contains(&format!("{:?}", bot.token)));
assert!(debug.contains(&bot.chat_id));
}
#[tokio::test]
async fn telegram_request_has_no_tls_fallback_and_hides_the_token() {
let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();
let port = listener.local_addr().unwrap().port();
let attempts = Arc::new(AtomicUsize::new(0));
let counter = attempts.clone();
tokio::spawn(async move {
while let Ok((stream, _)) = listener.accept().await {
counter.fetch_add(1, Ordering::SeqCst);
drop(stream);
}
});
let token = "123456:test-telegram-token";
let url = format!("https://127.0.0.1:{port}/bot{token}/sendMessage");
let err = post_telegram(url, String::new()).await.unwrap_err();
assert!(!err.to_string().contains(token), "{err}");
assert_eq!(attempts.load(Ordering::SeqCst), 1);
}
}
+30
View File
@@ -3038,6 +3038,9 @@ impl LoginConfigHandler {
/// Check if the client should auto login.
/// Return password if the client should auto login, otherwise return empty string.
pub fn should_auto_login(&self) -> String {
if get_builtin_option(keys::OPTION_HIDE_TOOLBAR_OS_PASSWORD) == "Y" {
return String::new();
}
let l = self.lock_after_session_end.v;
let a = !self.get_option("auto-login").is_empty();
let p = self.get_option("os-password");
@@ -5799,6 +5802,33 @@ mod webrtc_race_tests {
#[path = "client/tests/trusted_devices_tests.rs"]
mod trusted_devices_tests;
#[cfg(test)]
mod auto_login_tests {
use super::*;
#[test]
fn hidden_os_password_skips_auto_login_with_a_saved_password() {
let mut login = LoginConfigHandler::default();
login.config.lock_after_session_end.v = true;
let options = &mut login.config.options;
options.insert("auto-login".into(), "Y".into());
options.insert("os-password".into(), "saved".into());
let key = keys::OPTION_HIDE_TOOLBAR_OS_PASSWORD;
let settings = &config::BUILTIN_SETTINGS;
let previous = settings.write().unwrap().insert(key.into(), "Y".into());
let hidden = login.should_auto_login();
settings.write().unwrap().remove(key);
let visible = login.should_auto_login();
if let Some(value) = previous {
settings.write().unwrap().insert(key.into(), value);
}
assert!(hidden.is_empty());
assert_eq!(visible, "saved");
}
}
#[cfg(test)]
mod kx_tests {
use super::*;
+22
View File
@@ -758,6 +758,26 @@ impl<T: InvokeUiSession> Remote<T> {
match data {
Data::Close => {
self.send_close_reason(peer, "").await;
if peer.is_webrtc() {
// Reconnect starts the next round without waiting for this one, and that
// round reuses this peer's file clipboard channel. Give it up before the
// wait, or this round's cleanup removes the channel the next one is using.
#[cfg(any(target_os = "windows", feature = "unix-file-copy-paste"))]
clipboard::remove_channel_by_conn_id(self.client_conn_id);
// The next round also loads the saved transfer jobs as soon as it logs in.
// The wait discards what arrives, so the jobs no longer change after this.
let _ = self.sync_jobs_status_to_local().await;
// Makes the save on exit a no-op, so it cannot write these jobs over what a
// newer round saved in the meantime.
self.is_connected = false;
// Dropping the stream can discard the queued reason, and then the controlled
// side keeps this session for a password-free reconnect. It closes once it
// has read the reason.
let _ = tokio::time::timeout(Duration::from_secs(1), async {
while let Some(Ok(_)) = peer.next().await {}
})
.await;
}
return false;
}
Data::Login((os_username, os_password, password, remember)) => {
@@ -1699,6 +1719,7 @@ impl<T: InvokeUiSession> Remote<T> {
Some(message::Union::VideoFrame(vf)) => {
if !self.first_frame {
self.first_frame = true;
log::info!("Received first video frame");
self.handler.close_success();
self.handler.adapt_size();
self.send_toggle_virtual_display_msg(peer).await;
@@ -2354,6 +2375,7 @@ impl<T: InvokeUiSession> Remote<T> {
}
}
Some(misc::Union::CloseReason(c)) => {
log::info!("Received CloseReason from the controlled side: {c:?}");
self.sent_close_reason = true; // The controlled end will close, no need to send close reason
self.handler.msgbox("error", "Connection Error", &c, "");
return false;
+23
View File
@@ -408,6 +408,14 @@ impl ClipboardContext {
side: ClipboardSide,
force: bool,
) -> ResultType<Vec<ClipboardData>> {
#[cfg(all(feature = "unix-file-copy-paste", target_os = "macos"))]
{
if formats.iter().any(|f| matches!(f, ClipboardFormat::FileUrl))
&& clipboard::platform::unix::macos::has_rustdesk_file_url_owner()
{
return Ok(vec![]);
}
}
let _lock = ARBOARD_MTX.lock().unwrap();
let data = self.get_formats(formats)?;
if data.is_empty() {
@@ -512,6 +520,21 @@ impl ClipboardContext {
#[cfg(feature = "unix-file-copy-paste")]
fn try_empty_clipboard_files(&mut self, side: ClipboardSide) {
let _lock = ARBOARD_MTX.lock().unwrap();
#[cfg(all(feature = "unix-file-copy-paste", target_os = "macos"))]
{
if clipboard::platform::unix::macos::has_rustdesk_file_url_owner() {
if let Err(e) = self.inner.set_formats(&[
ClipboardData::Text("".to_string()),
ClipboardData::Special((
RUSTDESK_CLIPBOARD_OWNER_FORMAT.to_owned(),
side.get_owner_data(),
)),
]) {
log::error!("Failed to empty clipboard files: {}", e);
}
return;
}
}
if let Ok(data) = self.get_formats(&[ClipboardFormat::FileUrl]) {
let urls = Self::get_file_urls_set_by_rustdesk(data, side);
if !urls.is_empty() {
+15
View File
@@ -43,9 +43,20 @@ fn finish_macos_update(result: hbb_common::ResultType<()>) -> Option<CoreMainAct
/// If it returns [`Some`], the action determines whether to start the UI or report failure.
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub fn core_main() -> Option<CoreMainAction> {
// Before global_init: with drm its is_x11() can read Config (allow-drm-capture), and Config
// loads from a path named after the custom client's app name. global_init's first two steps
// run first, for the custom client: its signature check uses libsodium, and the probe child
// must not get past its dispatch. global_init repeats both.
#[cfg(all(target_os = "linux", feature = "drm"))]
{
crate::common::init_sodium();
crate::platform::linux::dispatch_wayland_display_probe();
crate::load_custom_client();
}
if !crate::common::global_init() {
return None;
}
#[cfg(not(all(target_os = "linux", feature = "drm")))]
crate::load_custom_client();
#[cfg(windows)]
if !crate::platform::windows::bootstrap() {
@@ -521,7 +532,11 @@ pub fn core_main() -> Option<CoreMainAction> {
let options = crate::ipc::get_options();
println!("{}", options.get(&args[1]).unwrap_or(&"".to_owned()));
} else if args.len() == 3 {
#[cfg(all(target_os = "linux", feature = "drm"))]
let drm_capture_was_on = crate::platform::linux::drm_capture_enabled();
crate::ipc::set_option(&args[1], &args[2]);
#[cfg(all(target_os = "linux", feature = "drm"))]
crate::ipc::sync_drm_capture_to_service_blocking(drm_capture_was_on);
}
} else {
println!("Installation and administrative privileges required!");
+6 -11
View File
@@ -2616,17 +2616,6 @@ pub fn is_support_multi_ui_session(version: String) -> SyncReturn<bool> {
SyncReturn(crate::common::is_support_multi_ui_session(&version))
}
pub fn is_selinux_enforcing() -> SyncReturn<bool> {
#[cfg(target_os = "linux")]
{
SyncReturn(crate::platform::linux::is_selinux_enforcing())
}
#[cfg(not(target_os = "linux"))]
{
SyncReturn(false)
}
}
pub fn main_default_privacy_mode_impl() -> SyncReturn<String> {
SyncReturn(crate::privacy_mode::DEFAULT_PRIVACY_MODE_IMPL.to_owned())
}
@@ -2780,6 +2769,12 @@ pub fn main_get_common(key: String) -> String {
return crate::platform::is_win_10_or_greater().to_string();
#[cfg(not(target_os = "windows"))]
return false.to_string();
} else if key == "is-drm-capture-supported" {
// The bundled libdrmtap may not load (a glibc older than its build): then DRM cannot work.
#[cfg(all(target_os = "linux", feature = "drm"))]
return scrap::drmtap_dl::get().is_some().to_string();
#[cfg(not(all(target_os = "linux", feature = "drm")))]
return false.to_string();
} else if key == "transfer-job-id" {
return base::fs::get_next_job_id().to_string();
} else if key == "is-remote-modify-enabled-by-control-permissions" {
+60 -6
View File
@@ -15,10 +15,25 @@ use base::config::keys;
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
const TIME_HEARTBEAT: Duration = Duration::from_secs(15);
const UPLOAD_SYSINFO_TIMEOUT: Duration = Duration::from_secs(120);
const TIME_CONN: Duration = Duration::from_secs(3);
#[cfg(any(not(target_os = "ios"), test))]
fn idle_heartbeat_interval() -> Duration {
const MIN_SECS: u64 = 15;
const MAX_SECS: u64 = 300;
let value = Config::get_option(keys::OPTION_API_IDLE_HEARTBEAT_INTERVAL_SECONDS);
let seconds = value.trim().parse::<u64>().unwrap_or(MIN_SECS);
Duration::from_secs(seconds.clamp(MIN_SECS, MAX_SECS))
}
#[cfg(any(not(target_os = "ios"), test))]
fn idle_heartbeat_due(url: &str, last_sent: Option<&(String, Instant)>) -> bool {
last_sent.map_or(true, |(last_url, at)| {
last_url != url || at.elapsed() >= idle_heartbeat_interval()
})
}
#[cfg(not(any(target_os = "ios")))]
lazy_static::lazy_static! {
static ref SENDER : Mutex<broadcast::Sender<Vec<i32>>> = Mutex::new(start_hbbs_sync());
@@ -89,7 +104,7 @@ async fn start_hbbs_sync_async() {
Instant::now() + TIME_CONN,
TIME_CONN,
));
let mut last_sent: Option<Instant> = None;
let mut last_sent = None;
let mut info_uploaded = InfoUploaded::default();
let mut sysinfo_ver = "".to_owned();
loop {
@@ -225,10 +240,10 @@ async fn start_hbbs_sync_async() {
}
}
}
if conns.is_empty() && last_sent.map(|x| x.elapsed() < TIME_HEARTBEAT).unwrap_or(false) {
if conns.is_empty() && !idle_heartbeat_due(&url, last_sent.as_ref()) {
continue;
}
last_sent = Some(Instant::now());
last_sent = Some((url.clone(), Instant::now()));
let mut v = Value::default();
v["id"] = json!(id);
v["uuid"] = json!(crate::encode64(hbb_common::get_uuid()));
@@ -238,7 +253,7 @@ async fn start_hbbs_sync_async() {
}
let modified_at = LocalConfig::get_option("strategy_timestamp").parse::<i64>().unwrap_or(0);
v["modified_at"] = json!(modified_at);
let response = crate::post_request(url.clone(), v.to_string(), "").await;
let response = crate::post_request(url, v.to_string(), "").await;
if let Err(err) = &response {
hbb_common::throttled_log!(API_LOG_INTERVAL, warn, "Heartbeat failed: {err:?}");
}
@@ -256,7 +271,13 @@ async fn start_hbbs_sync_async() {
}
if let Some(strategy) = rsp.remove("strategy") {
if let Ok(strategy) = serde_json::from_value::<StrategyOptions>(strategy) {
if let Err(error) = handle_config_options(strategy.config_options).await {
#[cfg(all(target_os = "linux", feature = "drm"))]
let drm_capture_was_on = crate::platform::linux::drm_capture_enabled();
let result = handle_config_options(strategy.config_options).await;
// Also after a rejected update: the options outside authentication are applied.
#[cfg(all(target_os = "linux", feature = "drm"))]
crate::platform::linux::sync_drm_capture_to_service(drm_capture_was_on).await;
if let Err(error) = result {
hbb_common::throttled_log!(API_LOG_INTERVAL, error, "Strategy update rejected: {error}");
continue;
}
@@ -518,6 +539,39 @@ mod tests {
}
}
#[cfg(test)]
mod heartbeat_tests {
use super::{
config::OVERWRITE_SETTINGS, idle_heartbeat_due, idle_heartbeat_interval, keys, Instant,
};
#[tokio::test(start_paused = true)]
async fn switching_api_bypasses_the_idle_interval() {
let url = "https://a.example/api/heartbeat";
let last_sent = (url.to_owned(), Instant::now());
tokio::time::advance(super::TIME_CONN).await;
assert!(!idle_heartbeat_due(url, Some(&last_sent)));
assert!(idle_heartbeat_due(
"https://b.example/api/heartbeat",
Some(&last_sent)
));
}
#[test]
fn configured_idle_heartbeat_interval() {
let key = keys::OPTION_API_IDLE_HEARTBEAT_INTERVAL_SECONDS;
let actual = ["", "invalid", "10", "60", "600"].map(|value| {
OVERWRITE_SETTINGS
.write()
.unwrap()
.insert(key.into(), value.into());
idle_heartbeat_interval().as_secs()
});
OVERWRITE_SETTINGS.write().unwrap().remove(key);
assert_eq!(actual, [15, 15, 15, 60, 300]);
}
}
#[cfg(test)]
mod strategy_tests {
use super::{filter_config_options, HashMap};
+209 -37
View File
@@ -1,5 +1,11 @@
#[path = "ipc/auth.rs"]
mod ipc_auth;
#[cfg(all(windows, test))]
#[path = "ipc/config_tests.rs"]
pub(crate) mod config_tests;
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[path = "ipc/unix_credentials.rs"]
pub(crate) mod unix_credentials;
#[cfg(windows)]
#[path = "ipc/windows.rs"]
mod ipc_windows;
@@ -57,7 +63,9 @@ pub(crate) use ipc_auth::ensure_peer_executable_matches_current_by_pid_opt;
#[cfg(windows)]
pub(crate) use ipc_auth::log_rejected_windows_ipc_connection;
#[cfg(any(target_os = "linux", target_os = "macos"))]
use ipc_auth::{active_uid, authorize_service_scoped_ipc_connection};
use ipc_auth::{
active_uid, authorize_service_scoped_ipc_connection, authorize_unix_main_ipc_connection,
};
#[cfg(target_os = "macos")]
use ipc_auth::authorize_user_server_process;
#[cfg(windows)]
@@ -142,15 +150,13 @@ pub async fn connect_service(ms_timeout: u64) -> ResultType<ConnectionTmpl<ConnC
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub(crate) async fn connect_trusted_device_service(
pub(crate) async fn connect_root_service(
ms_timeout: u64,
) -> ResultType<ConnectionTmpl<ConnClient>> {
let connection = connect_service(ms_timeout)
let connection = connect_with_path(ms_timeout, &Config::ipc_path(crate::POSTFIX_SERVICE))
.await
.map_err(crate::trusted_devices::authority::Unavailable)?;
if connection.peer_uid() != Some(0) {
bail!("Trusted-device system service is not an authenticated root peer");
}
ipc_auth::verify_service_uid(connection.peer_uid())?;
Ok(connection)
}
@@ -550,7 +556,13 @@ pub enum Data {
// (drmtap_open_render failed, e.g. no /dev/dri/renderD* access). The service then streams the
// CPU-converted `DrmFrame` path for this connection instead of a dma-buf fd the consumer cannot
// detile, so a render-node-less seat still captures instead of losing the stream.
DrmStart { display: i32, need_cpu: bool },
// `no_packet`: a libdrmtap packet failed to convert here, so stream one descriptor instead.
DrmStart {
display: i32,
need_cpu: bool,
#[serde(default)]
no_packet: bool,
},
/// Service -> client: the enumerated DRM displays (sent once, before frames).
#[cfg(all(target_os = "linux", feature = "drm"))]
DrmDisplayList(Vec<DrmDisplayInfo>),
@@ -632,6 +644,10 @@ pub(crate) async fn start_with_listener(postfix: &str, mut incoming: Incoming) {
continue;
}
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
if postfix.is_empty() && !authorize_unix_main_ipc_connection(&stream) {
continue;
}
#[cfg(windows)]
if postfix.is_empty() {
// Windows main IPC (`postfix == ""`) is authorized here.
@@ -664,6 +680,10 @@ pub(crate) async fn start_with_listener(postfix: &str, mut incoming: Incoming) {
#[cfg(any(target_os = "linux", target_os = "macos"))]
if postfix == crate::POSTFIX_SERVICE {
if matches!(&data, Data::SyncConfig(_)) {
if let Err(err) = unix_credentials::verify_sync_client(&stream).await {
ipc_auth::log_rejected_sync_client(err);
break;
}
handle(data, &mut stream).await;
} else {
log::warn!(
@@ -1080,7 +1100,8 @@ async fn handle(data: Data, stream: &mut Connection) {
},
Data::Options(value) => match value {
None => {
let v = Config::get_options();
let mut v = Config::get_options();
remove_preserved_keys(&mut v);
allow_err!(stream.send(&Data::Options(Some(v))).await);
}
Some(value) => {
@@ -1089,15 +1110,29 @@ async fn handle(data: Data, stream: &mut Connection) {
if let Some(v) = value.get("privacy-mode-impl-key") {
crate::privacy_mode::switch(v);
}
#[cfg(all(target_os = "linux", feature = "drm"))]
let drm_capture_was_on = crate::platform::linux::drm_capture_enabled();
if let Err(error) = crate::trusted_devices::config::update_options(value).await {
allow_err!(
stream
.send(&Data::SecurityConfigError(error.to_string()))
.await
);
// Also after a rejected update: the options can be applied by then.
#[cfg(all(target_os = "linux", feature = "drm"))]
if crate::is_server() {
crate::platform::linux::sync_drm_capture_to_service(drm_capture_was_on)
.await;
}
return;
}
allow_err!(stream.send(&Data::Options(None)).await);
// Not from a UI that hosts this IPC itself: its copy of the config can be older
// than the service's, and the sync sends all of it.
#[cfg(all(target_os = "linux", feature = "drm"))]
if crate::is_server() {
crate::platform::linux::sync_drm_capture_to_service(drm_capture_was_on).await;
}
}
},
Data::NatType(_) => {
@@ -1145,6 +1180,8 @@ async fn handle(data: Data, stream: &mut Connection) {
};
#[cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))]
let config2 = Config2::get();
let mut config2 = config2;
remove_preserved_keys(&mut config2.options);
allow_err!(
stream
.send(&Data::SyncConfig(Some((Config::get(), config2).into())))
@@ -1554,13 +1591,15 @@ pub async fn connect(ms_timeout: u64, postfix: &str) -> ResultType<ConnectionTmp
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
{
if postfix == crate::POSTFIX_SERVICE {
return connect_root_service(ms_timeout).await;
}
let use_user_main_ipc = USE_USER_MAIN_IPC.with(|use_user_main| use_user_main.get());
let is_root_main_ipc =
unsafe { hbb_common::libc::geteuid() == 0 } && postfix.is_empty() && use_user_main_ipc;
if is_root_main_ipc {
let uid = user_main_ipc_server_uid()?;
let path = Config::ipc_path_for_uid(uid, postfix);
return connect_with_path(ms_timeout, &path).await;
return unix_credentials::verified_main(ms_timeout, uid).await;
}
let path = Config::ipc_path(postfix);
return connect_with_path(ms_timeout, &path).await;
@@ -1699,6 +1738,46 @@ where
.await
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
async fn send_after_main_listener_ready(
&mut self,
data: &Data,
ms_timeout: u64,
) -> ResultType<()> {
// Keep the sender verifiable until admission. On macOS its peer PID disappears on close.
self.send(&Data::OnlineStatus(None)).await?;
let Some(Data::OnlineStatus(Some(_))) = self.next_timeout(ms_timeout).await? else {
bail!("Unexpected status response from main IPC listener");
};
self.send(data).await
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub(crate) async fn send_takeover_close(&mut self, ms_timeout: u64) -> ResultType<()> {
self.send_after_main_listener_ready(&Data::Close, ms_timeout)
.await
}
#[cfg(any(
feature = "hwcodec",
all(test, any(target_os = "linux", target_os = "macos"))
))]
async fn send_hwcodec_config(
&mut self,
value: String,
readback_timeout_ms: Option<u64>,
) -> ResultType<()> {
self.send(&Data::HwCodecConfig(Some(value))).await?;
if let Some(ms) = readback_timeout_ms {
// The host must resolve this process's executable before it can consume the report.
self.send(&Data::HwCodecConfig(None)).await?;
let Some(Data::HwCodecConfig(Some(_))) = self.next_timeout(ms).await? else {
bail!("Host did not confirm the hardware codec configuration");
};
}
Ok(())
}
pub async fn next_timeout(&mut self, ms_timeout: u64) -> ResultType<Option<Data>> {
Ok(timeout(ms_timeout, self.next()).await??)
}
@@ -1760,9 +1839,7 @@ async fn get_config_async(name: &str, ms_timeout: u64) -> ResultType<Option<Stri
}
pub async fn set_config_async(name: &str, value: String) -> ResultType<()> {
let mut c = connect(1000, "").await?;
c.send_config(name, value).await?;
Ok(())
set_data_async(&Data::Config((name.to_owned(), Some(value)))).await
}
#[tokio::main(flavor = "current_thread")]
@@ -1771,9 +1848,13 @@ pub async fn set_data(data: &Data) -> ResultType<()> {
}
async fn set_data_async(data: &Data) -> ResultType<()> {
let mut c = connect(1000, "").await?;
c.send(data).await?;
Ok(())
const TIMEOUT_MS: u64 = 1_000;
let mut c = connect(TIMEOUT_MS, "").await?;
#[cfg(target_os = "macos")]
if unsafe { hbb_common::libc::geteuid() } != 0 && crate::platform::is_installed() {
return c.send_after_main_listener_ready(data, TIMEOUT_MS).await;
}
c.send(data).await
}
#[tokio::main(flavor = "current_thread")]
@@ -2006,11 +2087,25 @@ pub async fn get_rendezvous_server(ms_timeout: u64) -> (String, Vec<String>) {
}
}
fn remove_preserved_keys(options: &mut HashMap<String, String>) {
for &key in keys::IPC_PRESERVED_KEYS {
options.remove(key);
}
}
fn cache_ipc_options(options: HashMap<String, String>) {
if crate::trusted_devices::config::uses_windows_host_profile() {
Config::set_options_preserving_keys(options, keys::IPC_PRESERVED_KEYS);
} else {
Config::set_options(options);
}
}
async fn get_options_(ms_timeout: u64) -> ResultType<HashMap<String, String>> {
let mut c = connect(ms_timeout, "").await?;
c.send(&Data::Options(None)).await?;
if let Some(Data::Options(Some(value))) = c.next_timeout(ms_timeout).await? {
Config::set_options(value.clone());
cache_ipc_options(value.clone());
Ok(value)
} else {
Ok(Config::get_options())
@@ -2045,7 +2140,8 @@ pub fn set_option(key: &str, value: &str) {
}
#[tokio::main(flavor = "current_thread")]
pub async fn set_options(value: HashMap<String, String>) -> ResultType<()> {
pub async fn set_options(mut value: HashMap<String, String>) -> ResultType<()> {
remove_preserved_keys(&mut value);
let _nat = CheckTestNatType::new();
let affected = crate::trusted_devices::config::changes_authentication(&value);
let connection = connect(1000, "").await;
@@ -2066,11 +2162,21 @@ pub async fn set_options(value: HashMap<String, String>) -> ResultType<()> {
_ if affected => bail!("The host did not confirm the configuration update"),
_ => {}
}
cache_ipc_options(value);
} else {
Config::set_options_preserving_keys(value, keys::IPC_PRESERVED_KEYS);
}
Config::set_options(value);
Ok(())
}
/// For the CLI, a process that just loaded the config. With no `--server` up to apply the change,
/// as right after an install, nothing else tells the service.
#[cfg(all(target_os = "linux", feature = "drm"))]
#[tokio::main(flavor = "current_thread")]
pub async fn sync_drm_capture_to_service_blocking(was_on: bool) {
crate::platform::linux::sync_drm_capture_to_service(was_on).await
}
#[inline]
async fn get_nat_type_(ms_timeout: u64) -> ResultType<i32> {
let mut c = connect(ms_timeout, "").await?;
@@ -2125,11 +2231,7 @@ pub async fn set_socks(value: config::Socks5Server) -> ResultType<()> {
} else {
Some(value.clone())
});
connect(1_000, "")
.await?
.send(&Data::Socks(Some(value)))
.await?;
Ok(())
set_data_async(&Data::Socks(Some(value))).await
}
async fn get_socks_ws_(ms_timeout: u64) -> ResultType<(Option<config::Socks5Server>, String)> {
@@ -2160,16 +2262,12 @@ pub fn get_proxy_status() -> bool {
}
#[tokio::main(flavor = "current_thread")]
pub async fn test_rendezvous_server() -> ResultType<()> {
let mut c = connect(1000, "").await?;
c.send(&Data::TestRendezvousServer).await?;
Ok(())
set_data_async(&Data::TestRendezvousServer).await
}
#[tokio::main(flavor = "current_thread")]
pub async fn notify_deployed() -> ResultType<()> {
let mut c = connect(1000, "").await?;
c.send(&Data::Deployed).await?;
Ok(())
set_data_async(&Data::Deployed).await
}
#[tokio::main(flavor = "current_thread")]
@@ -2199,8 +2297,7 @@ pub async fn connect_to_user_session(usid: Option<u32>) -> ResultType<()> {
#[tokio::main(flavor = "current_thread")]
pub async fn notify_server_to_check_hwcodec() -> ResultType<()> {
connect(1_000, "").await?.send(&&Data::CheckHwcodec).await?;
Ok(())
set_data_async(&Data::CheckHwcodec).await
}
#[cfg(target_os = "windows")]
@@ -2265,12 +2362,17 @@ pub fn client_get_hwcodec_config_thread(wait_sec: u64) {
#[cfg(feature = "hwcodec")]
#[tokio::main(flavor = "current_thread")]
pub async fn hwcodec_process() {
const IPC_TIMEOUT_MS: u64 = 1_000;
#[cfg(any(target_os = "linux", target_os = "macos"))]
let readback_timeout_ms = crate::platform::is_installed().then_some(IPC_TIMEOUT_MS);
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
let readback_timeout_ms = None;
let s = scrap::hwcodec::check_available_hwcodec();
for _ in 0..5 {
match crate::ipc::connect(1000, "").await {
match crate::ipc::connect(IPC_TIMEOUT_MS, "").await {
Ok(mut conn) => {
match conn
.send(&crate::ipc::Data::HwCodecConfig(Some(s.clone())))
.send_hwcodec_config(s.clone(), readback_timeout_ms)
.await
{
Ok(()) => {
@@ -2310,9 +2412,7 @@ pub async fn clear_wayland_screencast_restore_token(key: String) -> ResultType<b
))]
#[tokio::main(flavor = "current_thread")]
pub async fn update_controlling_session_count(count: usize) -> ResultType<()> {
let mut c = connect(1000, "").await?;
c.send(&Data::ControllingSessionCount(count)).await?;
Ok(())
set_data_async(&Data::ControllingSessionCount(count)).await
}
#[cfg(target_os = "linux")]
@@ -2420,6 +2520,78 @@ mod test {
#[cfg(any(target_os = "linux", target_os = "macos"))]
use super::*;
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[tokio::test]
async fn one_way_password_refresh_reports_listener_disconnect() {
const TIMEOUT_MS: u64 = 1_000;
let (gui, host) = tokio::net::UnixStream::pair().unwrap();
let mut host = ConnectionTmpl::new(host);
let gui = tokio::spawn(async move {
let refresh = Data::Config(("temporary-password".into(), Some(String::new())));
ConnectionTmpl::new(gui)
.send_after_main_listener_ready(&refresh, TIMEOUT_MS)
.await
});
assert!(matches!(
host.next_timeout(TIMEOUT_MS).await.unwrap(),
Some(Data::OnlineStatus(None))
));
assert_eq!(host.peer_pid(), Some(std::process::id()));
drop(host);
assert!(gui.await.unwrap().is_err(), "refresh reported success");
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[tokio::test]
async fn takeover_waits_for_listener_before_sending_close() {
const TIMEOUT_MS: u64 = 1_000;
let (sender, listener) = tokio::net::UnixStream::pair().unwrap();
let mut listener = ConnectionTmpl::new(listener);
let sender = tokio::spawn(async move {
ConnectionTmpl::new(sender)
.send_takeover_close(TIMEOUT_MS)
.await
});
assert!(matches!(
listener.next_timeout(TIMEOUT_MS).await.unwrap(),
Some(Data::OnlineStatus(None))
));
assert!(!sender.is_finished());
listener
.send(&Data::OnlineStatus(Some((0, false))))
.await
.unwrap();
assert!(matches!(
listener.next_timeout(TIMEOUT_MS).await.unwrap(),
Some(Data::Close)
));
sender.await.unwrap().unwrap();
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[tokio::test]
async fn codec_probe_waits_for_host_readback() {
const TIMEOUT_MS: u64 = 1_000;
let (probe, host) = tokio::net::UnixStream::pair().unwrap();
let mut host = ConnectionTmpl::new(host);
let probe = tokio::spawn(async move {
ConnectionTmpl::new(probe)
.send_hwcodec_config("{}".into(), Some(TIMEOUT_MS))
.await
});
assert!(matches!(host.next_timeout(TIMEOUT_MS).await.unwrap(),
Some(Data::HwCodecConfig(Some(value))) if value == "{}"));
assert!(matches!(
host.next_timeout(TIMEOUT_MS).await.unwrap(),
Some(Data::HwCodecConfig(None))
));
assert!(!probe.is_finished());
host.send(&Data::HwCodecConfig(Some("{}".into())))
.await
.unwrap();
probe.await.unwrap().unwrap();
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[test]
fn test_select_server_uid_uses_active_uid_when_no_server_found() {
+61
View File
@@ -170,6 +170,18 @@ pub(crate) fn is_allowed_service_peer_uid(peer_uid: u32, active_uid: Option<u32>
peer_uid == 0 || active_uid.is_some_and(|uid| uid == peer_uid)
}
#[cfg(any(target_os = "linux", target_os = "macos", test))]
#[inline]
fn is_allowed_unix_main_peer_uid(peer_uid: Option<u32>, server_uid: u32) -> bool {
peer_uid == Some(0) || peer_uid == Some(server_uid)
}
#[cfg(any(target_os = "linux", target_os = "macos", test))]
pub(super) fn verify_service_uid(peer_uid: Option<u32>) -> hbb_common::ResultType<()> {
hbb_common::anyhow::ensure!(peer_uid == Some(0), "Unix IPC service peer is not root");
Ok(())
}
#[cfg(target_os = "macos")]
#[inline]
fn console_owner_uid() -> Option<u32> {
@@ -519,6 +531,15 @@ pub(crate) fn ensure_peer_executable_matches_current_by_fd(
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
const UNAUTHORIZED_IPC_LOG_INTERVAL: std::time::Duration = std::time::Duration::from_secs(5);
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub(super) fn log_rejected_sync_client(error: anyhow::Error) {
hbb_common::throttled_log!(
UNAUTHORIZED_IPC_LOG_INTERVAL,
warn,
"Rejected service sync client: {error}"
);
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
#[inline]
fn log_rejected_service_connection(postfix: &str, peer_uid: Option<u32>, active_uid: Option<u32>) {
@@ -572,6 +593,26 @@ pub(crate) fn log_rejected_windows_ipc_connection(
);
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub(crate) fn authorize_unix_main_ipc_connection(stream: &Connection) -> bool {
let peer_uid = stream.peer_uid();
let server_uid = unsafe { libc::geteuid() };
if is_allowed_unix_main_peer_uid(peer_uid, server_uid)
&& (peer_uid == Some(0)
|| !crate::platform::is_installed()
|| ensure_peer_executable_matches_current_by_pid_opt(stream.peer_pid(), "").is_ok())
{
return true;
}
hbb_common::throttled_log!(
UNAUTHORIZED_IPC_LOG_INTERVAL,
warn,
"Rejected Unix main IPC connection: peer_uid={peer_uid:?}, server_uid={server_uid}, peer_pid={:?}",
stream.peer_pid()
);
false
}
#[cfg(any(target_os = "linux", target_os = "macos"))]
pub(crate) fn authorize_service_scoped_ipc_connection(stream: &Connection, postfix: &str) -> bool {
let peer_pid = stream.peer_pid();
@@ -871,6 +912,26 @@ impl ConnectionTmpl<parity_tokio_ipc::Connection> {
#[cfg(test)]
mod tests {
#[test]
fn service_client_requires_a_root_server() {
assert!(super::verify_service_uid(Some(0)).is_ok());
assert!(super::verify_service_uid(Some(1000)).is_err());
assert!(super::verify_service_uid(None).is_err());
}
#[test]
fn test_unix_main_peer_uid_policy() {
use super::is_allowed_unix_main_peer_uid;
assert!(is_allowed_unix_main_peer_uid(Some(0), 0));
assert!(!is_allowed_unix_main_peer_uid(Some(501), 0));
assert!(!is_allowed_unix_main_peer_uid(None, 0));
assert!(is_allowed_unix_main_peer_uid(Some(0), 501));
assert!(is_allowed_unix_main_peer_uid(Some(501), 501));
assert!(!is_allowed_unix_main_peer_uid(Some(502), 501));
assert!(!is_allowed_unix_main_peer_uid(None, 501));
}
#[test]
#[cfg(any(target_os = "macos", target_os = "linux"))]
fn test_service_peer_uid_policy() {
+69
View File
@@ -0,0 +1,69 @@
use super::*;
const RECORD: &str = "reg_recovery";
const SETTING: &str = "ipc-recovery-test-setting";
const TIMEOUT_MS: u64 = 1_000;
fn assert_synced(record: Option<&str>) {
for cfg in [Config2::get(), config::load_path(Config2::file())] {
assert_eq!(cfg.options.get(RECORD).map(String::as_str), record);
assert_eq!(cfg.options[SETTING], "gui");
}
}
async fn check_writes(client: &mut ConnectionTmpl<ConnClient>, base: &Config2) -> ResultType<()> {
for supplied in [None, Some(""), Some("active"), Some("old")] {
let mut cfg = base.clone();
if let Some(value) = supplied {
cfg.options.insert(RECORD.into(), value.into());
}
let options = Data::Options(Some(cfg.options.clone()));
let full = Data::SyncConfig(Some((Config::get(), cfg).into()));
for host in [Some("active"), None] {
Config::set_option(RECORD.into(), host.unwrap_or_default().into());
for request in [&options, &full] {
Config::set_option(SETTING.into(), "local".into());
client.send(request).await?;
let reply = client.next_timeout(TIMEOUT_MS).await?;
assert!(matches!(
(request, reply),
(Data::Options(_), Some(Data::Options(None)))
| (Data::SyncConfig(_), Some(Data::SyncConfig(None)))
));
assert_synced(host);
}
}
}
Ok(())
}
pub(crate) async fn ipc_preserves_reg_recovery() -> ResultType<()> {
let listener = tokio::spawn(start_with_listener("", new_listener("").await?));
let mut client = connect(TIMEOUT_MS, "").await?;
crate::common::set_server_running(true);
Config::set_option(RECORD.into(), "active".into());
let mut options = get_options_(TIMEOUT_MS).await?;
options.insert(SETTING.into(), "gui".into());
tokio::task::spawn_blocking(move || set_options(options)).await??;
client.send(&Data::SyncConfig(None)).await?;
let Some(Data::SyncConfig(Some(configs))) = client.next_timeout(TIMEOUT_MS).await? else {
bail!("expected full configuration");
};
let (config, snapshot) = *configs;
assert!(!snapshot.options.contains_key(RECORD));
for hosting in [true, false] {
crate::common::set_server_running(hosting);
let expected = (hosting || crate::platform::is_root()).then_some("active");
assert!(!get_options_(TIMEOUT_MS).await?.contains_key(RECORD));
assert_synced(expected);
Config::set_option(RECORD.into(), "active".into());
Config::set_option(SETTING.into(), "local".into());
crate::trusted_devices::config::sync_config(config.clone(), snapshot.clone())?;
assert_synced(expected);
}
check_writes(&mut client, &snapshot).await?;
Config::set_option(RECORD.into(), String::new());
Config::set_option(SETTING.into(), String::new());
listener.abort();
Ok(())
}
+168 -89
View File
@@ -2,7 +2,7 @@
use super::ipc_auth::active_uid_cached;
use super::*;
use std::os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, OwnedFd, RawFd};
use std::os::fd::{AsRawFd, BorrowedFd, FromRawFd, OwnedFd, RawFd};
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
pub struct DrmDisplayInfo {
@@ -27,11 +27,14 @@ pub struct DrmDisplayInfo {
/// mode TRANSPOSED whatever the compositor reports (gamescope's wl_output has no transform).
#[serde(default)]
pub plane_transposed: bool,
/// The primary plane's `rotation` mask at enumeration; None when it cannot be read.
#[serde(default)]
pub primary_rotation: Option<u32>,
}
/// Mirrors `scrap::drm_reader::drmtap_dmabuf_desc` except `dma_buf_fd` (never serializes — it rides
/// SCM_RIGHTS ancillary), and adds `buffer_id` (fb_id tagged with a per-connection epoch; no consumer reads it today) and `has_fd`.
#[derive(Debug, Serialize, Deserialize, Clone)]
/// SCM_RIGHTS ancillary), and adds `buffer_id` (fb_id tagged with a per-connection epoch; no consumer reads it today), `has_fd` and `packet`.
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct DmabufDesc {
pub buffer_id: u64,
pub width: u32,
@@ -64,6 +67,10 @@ pub struct DmabufDesc {
/// capture worker; the consumer only acts on a position that held still for several frames.
#[serde(default)]
pub cursor_pos: Option<(i32, i32)>,
/// Non-empty: a libdrmtap 0.6 packet (every lit plane of the CRTC, opaque) that replaces the
/// geometry fields above, and every fd of this message belongs to it, in order.
#[serde(default)]
pub packet: Vec<u8>,
}
pub(crate) fn drm_ipc_path() -> String {
@@ -109,11 +116,8 @@ fn new_drm_listener() -> ResultType<Incoming> {
enum DrmProducerMsg {
/// Enumerated displays, sent once before any frame.
Displays(Vec<DrmDisplayInfo>),
/// Zero-copy path: descriptor + scanout fd; the `OwnedFd` is closed once the send has dup'd it.
Frame {
desc: DmabufDesc,
fd: Option<OwnedFd>,
},
/// Zero-copy path: descriptor + scanout fd(s); the `OwnedFd`s are closed once the send has dup'd them.
Frame { desc: DmabufDesc, fds: Vec<OwnedFd> },
/// CPU-mapped fallback (packed BGRA): consumer has no convert context (`need_cpu`), or ENOTSUP.
FrameCpu {
width: u32,
@@ -167,6 +171,7 @@ mod cursor_pos_tests {
has_fd: false,
plane_rotation: None,
cursor_pos: None,
packet: Vec::new(),
}
}
@@ -189,7 +194,10 @@ mod cursor_pos_tests {
let visible = snapshot(7);
let hidden = snapshot(scrap::drm_reader::HIDDEN_CURSOR_ID);
let mut frame = DrmProducerMsg::Frame { desc: desc(), fd: None };
let mut frame = DrmProducerMsg::Frame {
desc: desc(),
fds: vec![],
};
stamp_cursor_pos(&mut frame, Some(&visible));
assert!(matches!(&frame, DrmProducerMsg::Frame { desc, .. } if desc.cursor_pos == Some((10, 20))));
stamp_cursor_pos(&mut frame, Some(&hidden));
@@ -277,17 +285,22 @@ fn drm_displays_from_reader(
}
true
})
.map(|d| DrmDisplayInfo {
plane_transposed: plane_transposed(device, d.crtc_id),
name: d.name,
crtc_id: d.crtc_id,
x: d.x,
y: d.y,
width: d.width,
height: d.height,
active: d.active,
render_node: render_node.clone(),
device: device.to_owned(),
.map(|d| {
let primary_rotation = primary_rotation(device, d.crtc_id);
DrmDisplayInfo {
plane_transposed: primary_rotation
.is_some_and(|m| m & (DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270) != 0),
primary_rotation,
name: d.name,
crtc_id: d.crtc_id,
x: d.x,
y: d.y,
width: d.width,
height: d.height,
active: d.active,
render_node: render_node.clone(),
device: device.to_owned(),
}
})
.collect();
(displays, undriven)
@@ -298,26 +311,24 @@ const DRM_MODE_ROTATE_270: u32 = 0x8;
/// Through a reader bound to `crtc_id`: the enumerating reader is bound to whichever crtc
/// auto-select picked.
fn plane_transposed(device: &str, crtc_id: u32) -> bool {
fn primary_rotation(device: &str, crtc_id: u32) -> Option<u32> {
let dev = (!device.is_empty()).then_some(device);
let Some(mut r) = scrap::drm_reader::DrmReader::open(dev, crtc_id) else {
return false;
};
let transposed = match r.query_plane_rotation() {
Some(m) => m & (DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270) != 0,
let mut r = scrap::drm_reader::DrmReader::open(dev, crtc_id)?;
let rotation = r.query_plane_rotation();
match rotation {
Some(m) if m & (DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270) != 0 => {
log::trace!("drm: crtc {crtc_id} ({device:?}) is rotated 90/270 by its plane");
}
Some(_) => {}
None => {
hbb_common::throttled_log!(
std::time::Duration::from_secs(600),
debug,
"drm: crtc {crtc_id} ({device:?}): plane rotation unreadable; sized as unrotated"
);
false
}
};
if transposed {
log::trace!("drm: crtc {crtc_id} ({device:?}) is rotated 90/270 by its plane");
}
transposed
rotation
}
/// Active displays of every DRM device + the connected-but-undriven identities, from ONE look.
@@ -887,6 +898,12 @@ async fn handle_drm_conn(stream: Connection) -> ResultType<()> {
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
use std::sync::Arc;
// The producer stays up once started, so with allow-drm-capture off it takes no new consumer. A
// stream already running ends when the service loop restarts every --server on the change.
if !crate::platform::linux::drm_capture_enabled() {
log::trace!("drm: allow-drm-capture is off; dropping this connection");
return Ok(());
}
// World-connectable socket, so the peer MUST be authorized here (this listener bypasses the
// generic `start()` accept loop). On the blocking pool: a cache miss forks `loginctl`.
static DRM_AUTH_IN_FLIGHT: AtomicUsize = AtomicUsize::new(0);
@@ -955,7 +972,7 @@ async fn handle_drm_conn(stream: Connection) -> ResultType<()> {
};
let (frame_tx, mut frame_rx) = tokio::sync::mpsc::channel::<DrmProducerMsg>(2);
let (crtc_tx, crtc_rx) = std::sync::mpsc::channel::<(String, u32, bool)>();
let (crtc_tx, crtc_rx) = std::sync::mpsc::channel::<(String, u32, bool, bool)>();
let stop = Arc::new(AtomicBool::new(false));
let _stop_guard = DrmStopGuard(stop.clone());
let worker_stop = stop.clone();
@@ -986,8 +1003,15 @@ async fn handle_drm_conn(stream: Connection) -> ResultType<()> {
};
conn.send_msg(&Data::DrmDisplayList(displays.clone()), None).await?;
let (display_idx, need_cpu) = match conn.recv_msg_timeout2(10_000).await {
Some(Ok((Data::DrmStart { display, need_cpu }, _fd))) => (display, need_cpu),
let (display_idx, need_cpu, no_packet) = match conn.recv_msg_timeout2(10_000).await {
Some(Ok((
Data::DrmStart {
display,
need_cpu,
no_packet,
},
_fd,
))) => (display, need_cpu, no_packet),
Some(Ok((_, _fd))) => {
log::info!("drm: peer sent something other than DrmStart in the handshake; closing");
return Ok(());
@@ -1007,7 +1031,10 @@ async fn handle_drm_conn(stream: Connection) -> ResultType<()> {
);
return Ok(());
}
if crtc_tx.send((target_device, target_crtc, need_cpu)).is_err() {
if crtc_tx
.send((target_device, target_crtc, need_cpu, no_packet))
.is_err()
{
return Ok(());
}
@@ -1119,18 +1146,18 @@ async fn handle_drm_conn(stream: Connection) -> ResultType<()> {
continue;
}
match latest_frame {
Some(DrmProducerMsg::Frame { mut desc, fd }) => {
Some(DrmProducerMsg::Frame { mut desc, fds }) => {
// Every exported frame carries its fd: the kernel can recycle an fb_id onto another
// buffer with the same geometry/modifier and this side cannot see the dma-buf inode
// that would tell the difference, so eliding it can serve a stale EGLImage. libdrmtap's
// import cache keys on fb_id AND inode, and can only re-import when handed a real fd.
let send_fd = fd.is_some();
desc.has_fd = send_fd;
let borrowed = if send_fd { fd.as_ref().map(|f| f.as_fd()) } else { None };
conn.send_msg(&Data::DrmFrameDmabuf(desc), borrowed).await?;
desc.has_fd = !fds.is_empty();
let raw: Vec<RawFd> = fds.iter().map(|f| f.as_raw_fd()).collect();
let payload = serde_json::to_vec(&Data::DrmFrameDmabuf(desc))?;
drm_send_frame(&conn.stream, &payload, &raw).await?;
credit -= 1; // one frame in flight until the consumer acks it
// `fd` (OwnedFd) is closed here whether or not it was attached (the cmsg dup'd it
// into the peer), which bounds our fd usage to ~1 in flight per frame.
// `fds` (OwnedFd) are closed here whether or not attached (the cmsg dup'd them
// into the peer), which bounds our fd usage to one frame's fds in flight.
}
Some(DrmProducerMsg::FrameCpu {
width,
@@ -1254,7 +1281,7 @@ fn drm_worker_wake(now: std::time::Instant, next_frame: std::time::Instant) -> s
fn drm_capture_worker(
frame_tx: tokio::sync::mpsc::Sender<DrmProducerMsg>,
crtc_rx: std::sync::mpsc::Receiver<(String, u32, bool)>,
crtc_rx: std::sync::mpsc::Receiver<(String, u32, bool, bool)>,
stop: std::sync::Arc<std::sync::atomic::AtomicBool>,
frames_gated: std::sync::Arc<std::sync::atomic::AtomicBool>,
demand_fps: std::sync::Arc<std::sync::atomic::AtomicU8>,
@@ -1281,7 +1308,7 @@ fn drm_capture_worker(
return;
}
let (target_device, target_crtc, need_cpu) = match crtc_rx.recv() {
let (target_device, target_crtc, need_cpu, no_packet) = match crtc_rx.recv() {
Ok(c) => c,
Err(_) => return,
};
@@ -1327,6 +1354,17 @@ fn drm_capture_worker(
// `stalled` is left untouched because the device is healthy -- the task bounds this
// state itself (CREDIT_STALL) since our watchdog cannot advance.
None
} else if use_dmabuf && reader.has_packet() && !no_packet {
// libdrmtap 0.6 on both ends (one deb): the packet also carries a window the compositor
// put on its own plane, which one descriptor cannot.
Some(reader.grab_packet().map(|(packet, fds)| DrmProducerMsg::Frame {
// No plane_rotation: the consumer asks its converting context after the convert.
desc: DmabufDesc {
packet,
..Default::default()
},
fds,
}))
} else if use_dmabuf {
// Read right after the grab: the library answers for the plane that grab read from.
Some(match reader.grab_desc() {
@@ -1346,8 +1384,9 @@ fn drm_capture_worker(
has_fd: true, // every exported frame carries its fd; see the send below
plane_rotation: reader.plane_rotation(),
cursor_pos: None, // stamped below, from the one cursor read of this tick
packet: Vec::new(),
},
fd: Some(fd),
fds: vec![fd],
}),
Err(err) => Err(err),
})
@@ -1385,7 +1424,11 @@ fn drm_capture_worker(
log::debug!(
"drm: first frame for crtc {target_crtc} in {:?} ({} path)",
t_conn.elapsed(),
if use_dmabuf { "dma-buf" } else { "cpu" }
match (use_dmabuf, reader.has_packet() && !no_packet) {
(true, true) => "dma-buf packet",
(true, false) => "dma-buf",
(false, _) => "cpu",
}
);
}
if frame_tx.blocking_send(msg).is_err() {
@@ -1405,7 +1448,7 @@ fn drm_capture_worker(
}
Some(Err(err)) if use_dmabuf && err.kind() == std::io::ErrorKind::Unsupported => {
log::warn!(
"drm: grab_desc unsupported ({err}); switching to CPU-mapped fallback for this connection"
"drm: dma-buf grab unsupported ({err}); switching to CPU-mapped fallback for this connection"
);
use_dmabuf = false;
logged_first = false;
@@ -1498,17 +1541,19 @@ const DRM_BODY_TIMEOUT_MS: u64 = 5_000;
const DRM_SEND_TIMEOUT_MS: u64 = 5_000;
const MAX_DRM_RAW_BYTES: usize = 512 * 1024 * 1024;
/// `CMSG_SPACE(sizeof(int))` is 24 bytes on our targets; 64 gives headroom and the `align(8)`
/// matches `cmsghdr` alignment.
const DRM_CMSG_CAP: usize = 64;
/// Most fds one message carries: the 16 of a libdrmtap packet.
const DRM_MAX_FDS: usize = 16;
/// `CMSG_SPACE` of `DRM_MAX_FDS` ints is 80 bytes on our targets; 128 gives headroom and the
/// `align(8)` matches `cmsghdr` alignment. More fds than fit truncate (MSG_CTRUNC) and are refused.
const DRM_CMSG_CAP: usize = 128;
/// Aligned storage for the SCM_RIGHTS control buffer (`msg_control` must be `cmsghdr`-aligned).
#[repr(align(8))]
struct DrmCmsgBuf([u8; DRM_CMSG_CAP]);
/// One non-blocking `sendmsg`; the cmsg is attached ONLY when a fd is present (-1 fails the call).
/// SAFETY: `fd` a valid open socket fd, `buf` a readable slice, `pass_fd` (if any) a valid open fd.
unsafe fn drm_sendmsg(fd: RawFd, buf: &[u8], pass_fd: Option<RawFd>) -> std::io::Result<usize> {
/// One non-blocking `sendmsg`; the cmsg is attached ONLY when fds are present (-1 fails the call).
/// SAFETY: `fd` a valid open socket fd, `buf` a readable slice, every `pass_fds` entry a valid open fd.
unsafe fn drm_sendmsg(fd: RawFd, buf: &[u8], pass_fds: &[RawFd]) -> std::io::Result<usize> {
use hbb_common::libc;
let mut iov = libc::iovec {
iov_base: buf.as_ptr() as *mut libc::c_void,
@@ -1518,9 +1563,13 @@ unsafe fn drm_sendmsg(fd: RawFd, buf: &[u8], pass_fd: Option<RawFd>) -> std::io:
msg.msg_iov = &mut iov;
msg.msg_iovlen = 1;
let mut cbuf = DrmCmsgBuf([0u8; DRM_CMSG_CAP]);
if let Some(sfd) = pass_fd {
if pass_fds.len() > DRM_MAX_FDS {
return Err(std::io::ErrorKind::InvalidInput.into()); // they would overflow `cbuf`
}
if !pass_fds.is_empty() {
let fds_len = (pass_fds.len() * std::mem::size_of::<libc::c_int>()) as u32;
msg.msg_control = cbuf.0.as_mut_ptr() as *mut libc::c_void;
msg.msg_controllen = libc::CMSG_SPACE(std::mem::size_of::<libc::c_int>() as u32) as _;
msg.msg_controllen = libc::CMSG_SPACE(fds_len) as _;
let cmsg = libc::CMSG_FIRSTHDR(&msg);
if cmsg.is_null() {
return Err(std::io::Error::new(
@@ -1530,12 +1579,11 @@ unsafe fn drm_sendmsg(fd: RawFd, buf: &[u8], pass_fd: Option<RawFd>) -> std::io:
}
(*cmsg).cmsg_level = libc::SOL_SOCKET;
(*cmsg).cmsg_type = libc::SCM_RIGHTS;
(*cmsg).cmsg_len = libc::CMSG_LEN(std::mem::size_of::<libc::c_int>() as u32) as _;
let sfd_c: libc::c_int = sfd;
(*cmsg).cmsg_len = libc::CMSG_LEN(fds_len) as _;
std::ptr::copy_nonoverlapping(
&sfd_c as *const libc::c_int as *const u8,
pass_fds.as_ptr() as *const u8,
libc::CMSG_DATA(cmsg),
std::mem::size_of::<libc::c_int>(),
fds_len as usize,
);
}
let n = libc::sendmsg(fd, &msg, libc::MSG_NOSIGNAL);
@@ -1546,9 +1594,9 @@ unsafe fn drm_sendmsg(fd: RawFd, buf: &[u8], pass_fd: Option<RawFd>) -> std::io:
}
}
/// One non-blocking `recvmsg`: keeps at most one SCM_RIGHTS fd (surplus closed), rejects MSG_CTRUNC.
/// One non-blocking `recvmsg`: keeps the SCM_RIGHTS fds in order, rejects MSG_CTRUNC.
/// SAFETY: `fd` must be a valid open socket fd; `buf` a valid writable slice.
unsafe fn drm_recvmsg(fd: RawFd, buf: &mut [u8]) -> std::io::Result<(usize, Option<OwnedFd>)> {
unsafe fn drm_recvmsg(fd: RawFd, buf: &mut [u8]) -> std::io::Result<(usize, Vec<OwnedFd>)> {
use hbb_common::libc;
let mut iov = libc::iovec {
iov_base: buf.as_mut_ptr() as *mut libc::c_void,
@@ -1564,7 +1612,7 @@ unsafe fn drm_recvmsg(fd: RawFd, buf: &mut [u8]) -> std::io::Result<(usize, Opti
if n < 0 {
return Err(std::io::Error::last_os_error());
}
let mut got: Option<OwnedFd> = None;
let mut got: Vec<OwnedFd> = Vec::new();
let mut cmsg = libc::CMSG_FIRSTHDR(&msg);
while !cmsg.is_null() {
if (*cmsg).cmsg_level == libc::SOL_SOCKET && (*cmsg).cmsg_type == libc::SCM_RIGHTS {
@@ -1580,10 +1628,7 @@ unsafe fn drm_recvmsg(fd: RawFd, buf: &mut [u8]) -> std::io::Result<(usize, Opti
std::mem::size_of::<libc::c_int>(),
);
if rawfd >= 0 {
let owned = OwnedFd::from_raw_fd(rawfd);
if got.is_none() {
got = Some(owned);
} // else: surplus fd, dropped here -> closed
got.push(OwnedFd::from_raw_fd(rawfd));
}
}
}
@@ -1602,7 +1647,7 @@ unsafe fn drm_recvmsg(fd: RawFd, buf: &mut [u8]) -> std::io::Result<(usize, Opti
async fn drm_write_all(
stream: &tokio::net::UnixStream,
mut buf: &[u8],
mut pass_fd: Option<RawFd>,
mut pass_fds: &[RawFd],
) -> ResultType<()> {
// ONE deadline for the whole write: arming it per readiness wait lets a dripping peer re-arm it.
let deadline =
@@ -1617,13 +1662,13 @@ async fn drm_write_all(
}
let raw = stream.as_raw_fd();
let chunk = buf;
let fd_now = pass_fd;
let fds_now = pass_fds;
match stream.try_io(tokio::io::Interest::WRITABLE, || unsafe {
drm_sendmsg(raw, chunk, fd_now)
drm_sendmsg(raw, chunk, fds_now)
}) {
Ok(0) => bail!("drm: socket write returned 0 (peer closed)"),
Ok(n) => {
pass_fd = None; // ancillary delivered with these bytes; do not re-send it
pass_fds = &[]; // ancillary delivered with these bytes; do not re-send it
buf = &buf[n..];
}
Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => continue,
@@ -1636,14 +1681,14 @@ async fn drm_write_all(
async fn drm_send_frame(
stream: &tokio::net::UnixStream,
payload: &[u8],
pass_fd: Option<RawFd>,
pass_fds: &[RawFd],
) -> ResultType<()> {
if payload.len() > u32::MAX as usize {
bail!("drm: frame too large ({} bytes)", payload.len());
}
let prefix = (payload.len() as u32).to_be_bytes();
drm_write_all(stream, &prefix, pass_fd).await?;
drm_write_all(stream, payload, None).await?;
drm_write_all(stream, &prefix, pass_fds).await?;
drm_write_all(stream, payload, &[]).await?;
Ok(())
}
@@ -1652,14 +1697,14 @@ async fn drm_read_full(
buf: &mut [u8],
want_cmsg: bool,
progress: &mut bool,
) -> ResultType<Option<OwnedFd>> {
) -> ResultType<Vec<OwnedFd>> {
use hbb_common::libc;
let mut off = 0usize;
let mut got: Option<OwnedFd> = None;
let mut got: Vec<OwnedFd> = Vec::new();
while off < buf.len() {
stream.readable().await?;
let raw = stream.as_raw_fd();
let use_cmsg = want_cmsg && got.is_none();
let use_cmsg = want_cmsg && got.is_empty();
let n = {
let dst: &mut [u8] = &mut buf[off..];
match stream.try_io(tokio::io::Interest::READABLE, move || unsafe {
@@ -1670,16 +1715,14 @@ async fn drm_read_full(
if m < 0 {
Err(std::io::Error::last_os_error())
} else {
Ok((m as usize, None))
Ok((m as usize, Vec::new()))
}
}
}) {
Ok((0, _fd)) => bail!("drm: socket closed by peer"),
Ok((m, fd)) => {
if let Some(f) = fd {
if got.is_none() {
got = Some(f);
}
Ok((m, fds)) => {
if got.is_empty() {
got = fds;
}
m
}
@@ -1708,7 +1751,7 @@ impl DrmConn {
pub async fn send_msg(&mut self, data: &Data, fd: Option<BorrowedFd<'_>>) -> ResultType<()> {
let payload = serde_json::to_vec(data)?;
let pass_fd = fd.map(|f| f.as_raw_fd());
drm_send_frame(&self.stream, &payload, pass_fd).await
drm_send_frame(&self.stream, &payload, pass_fd.as_slice()).await
}
pub async fn send_frame_ack(&self, demand_fps: u8) -> ResultType<()> {
@@ -1758,7 +1801,7 @@ impl DrmConn {
Ok(())
}
pub async fn recv_msg(&mut self) -> ResultType<(Data, Option<OwnedFd>)> {
pub async fn recv_msg(&mut self) -> ResultType<(Data, Vec<OwnedFd>)> {
self.consumed = false;
let mut prefix = [0u8; 4];
let fd = drm_read_full(&self.stream, &mut prefix, true, &mut self.consumed).await?;
@@ -1779,7 +1822,7 @@ impl DrmConn {
pub async fn recv_msg_timeout2(
&mut self,
ms_timeout: u64,
) -> Option<ResultType<(Data, Option<OwnedFd>)>> {
) -> Option<ResultType<(Data, Vec<OwnedFd>)>> {
let ready = timeout(ms_timeout, self.stream.readable()).await;
match ready {
Err(_) => None, // no frame started: clean boundary, caller re-checks `stop`
@@ -1795,7 +1838,7 @@ impl DrmConn {
}
pub async fn send_raw(&mut self, data: Bytes) -> ResultType<()> {
drm_send_frame(&self.stream, &data, None).await
drm_send_frame(&self.stream, &data, &[]).await
}
pub async fn next_raw_into(&mut self, out: &mut Vec<u8>) -> ResultType<()> {
@@ -1809,9 +1852,9 @@ impl DrmConn {
async fn next_raw_into_unbounded(&mut self, out: &mut Vec<u8>) -> ResultType<()> {
let mut prefix = [0u8; 4];
if drm_read_full(&self.stream, &mut prefix, true, &mut self.consumed)
if !drm_read_full(&self.stream, &mut prefix, true, &mut self.consumed)
.await?
.is_some()
.is_empty()
{
log::warn!("drm: unexpected fd on a raw-body frame; dropping");
}
@@ -1895,7 +1938,10 @@ mod drm_conn_tests {
.await
.unwrap();
let (_data, fd) = rx.recv_msg().await.unwrap();
let recv_fd = fd.expect("an fd was attached, it must be received");
let recv_fd = fd
.into_iter()
.next()
.expect("an fd was attached, it must be received");
let sentinel = [0xABu8];
assert_eq!(
unsafe { libc::write(wr.as_raw_fd(), sentinel.as_ptr() as *const libc::c_void, 1) },
@@ -1909,6 +1955,39 @@ mod drm_conn_tests {
assert_eq!(got[0], 0xAB, "received fd must be the same pipe");
}
#[tokio::test]
async fn a_packet_frame_carries_its_bytes_and_every_fd_in_order() {
let (a, b) = tokio::net::UnixStream::pair().unwrap();
let tx = DrmConn::new(a);
let mut rx = DrmConn::new(b);
let pipes: Vec<(OwnedFd, OwnedFd)> = (0..3).map(|_| pipe()).collect();
let read_ends: Vec<RawFd> = pipes.iter().map(|(r, _)| r.as_raw_fd()).collect();
let desc = DmabufDesc {
packet: vec![1, 2, 3, 250],
..Default::default()
};
let payload = serde_json::to_vec(&Data::DrmFrameDmabuf(desc)).unwrap();
drm_send_frame(&tx.stream, &payload, &read_ends)
.await
.unwrap();
let (data, fds) = rx.recv_msg().await.unwrap();
assert!(matches!(data, Data::DrmFrameDmabuf(d) if d.packet == [1, 2, 3, 250]));
assert_eq!(fds.len(), 3);
for (i, ((_, wr), fd)) in pipes.iter().zip(&fds).enumerate() {
let b = [i as u8];
assert_eq!(
unsafe { libc::write(wr.as_raw_fd(), b.as_ptr() as *const libc::c_void, 1) },
1
);
let mut got = [9u8; 1];
assert_eq!(
unsafe { libc::read(fd.as_raw_fd(), got.as_mut_ptr() as *mut libc::c_void, 1) },
1
);
assert_eq!(got[0], i as u8, "fd {i} must be the pipe sent at index {i}");
}
}
#[tokio::test]
async fn roundtrip_raw_body() {
let (a, b) = tokio::net::UnixStream::pair().unwrap();
+138
View File
@@ -0,0 +1,138 @@
use super::{
connect_with_path, ipc_auth::ensure_peer_executable_matches_current_by_pid_opt, Connection,
};
use hbb_common::{
anyhow::{anyhow, ensure},
config::Config,
ResultType,
};
const IPC_TIMEOUT: u64 = 1_000;
pub(super) async fn verified_main(ms_timeout: u64, target: u32) -> ResultType<Connection> {
let connection = connect_with_path(ms_timeout, &Config::ipc_path_for_uid(target, "")).await?;
verify_main_peer(&connection, target)?;
Ok(connection)
}
fn verify_main_peer(connection: &Connection, target: u32) -> ResultType<()> {
ensure!(
connection.peer_uid() == Some(target),
"Unexpected main IPC server UID"
);
ensure_peer_executable_matches_current_by_pid_opt(connection.peer_pid(), "")
}
// Full service sync delegates credential changes to the actual user main server.
pub(super) async fn verify_sync_client(connection: &Connection) -> ResultType<()> {
let uid = connection
.peer_uid()
.ok_or_else(|| anyhow!("Missing sync client UID"))?;
if uid == 0 {
return Ok(());
}
let pid = connection
.peer_pid()
.ok_or_else(|| anyhow!("Missing sync client PID"))?;
let main = connect_with_path(IPC_TIMEOUT, &Config::ipc_path_for_uid(uid, "")).await?;
ensure!(
main.peer_uid() == Some(uid) && main.peer_pid() == Some(pid),
"Expected the user main IPC server"
);
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
use hbb_common::tokio::{
self,
io::{AsyncReadExt, AsyncWriteExt},
net::UnixListener,
process::{Child, Command},
};
use std::{env, fs, os::unix::fs::DirBuilderExt, path::Path, process::Stdio};
const ROLE: &str = "RUSTDESK_TEST_SYNC_PEER";
const TEST_TIMEOUT_MS: u64 = 10_000;
// libtest also exits successfully when an exact filter selects no tests.
const OWNER_VERIFIED: i32 = 42;
#[tokio::test]
async fn service_sync_requires_main_listener_owner() -> ResultType<()> {
let mut child = Command::new(env::current_exe()?);
child
.arg("--exact")
.arg("ipc::unix_credentials::tests::service_sync_requires_main_listener_owner")
.kill_on_drop(true);
let Some(role) = env::var_os(ROLE) else {
let result =
hbb_common::timeout(TEST_TIMEOUT_MS, child.env(ROLE, "owner").output()).await??;
assert_eq!(
result.status.code(),
Some(OWNER_VERIFIED),
"{}",
String::from_utf8_lossy(&result.stdout)
);
return Ok(());
};
// Start both isolated peers before dropping privileges, even in a root-only build directory.
let other = if role == "owner" {
Some(child.env(ROLE, "sender").stdin(Stdio::piped()).spawn()?)
} else {
None
};
if unsafe { hbb_common::libc::geteuid() } == 0 {
const UNPRIVILEGED_UID: u32 = 65_534;
if unsafe { hbb_common::libc::setuid(UNPRIVILEGED_UID) } != 0 {
return Err(std::io::Error::last_os_error().into());
}
}
if let Some(other) = other {
check_sync_senders(other).await?;
std::process::exit(OWNER_VERIFIED);
}
let mut path = String::new();
tokio::io::stdin().read_to_string(&mut path).await?;
let mut socket = tokio::net::UnixStream::connect(path).await?;
// Keep the sender alive until the verifier closes its side.
assert_eq!(socket.read(&mut [0]).await?, 0);
Ok(())
}
async fn check_sync_senders(mut other: Child) -> ResultType<()> {
*hbb_common::config::APP_NAME.write().unwrap() =
format!("rd-sync-{}", uuid::Uuid::new_v4());
let main_path = Config::ipc_path("");
let directory = Path::new(&main_path).parent().unwrap().to_owned();
fs::DirBuilder::new().mode(0o700).create(&directory)?;
let sync_path = format!("{main_path}.sync");
let _cleanup = crate::SimpleCallOnReturn {
b: true,
f: Box::new(move || fs::remove_dir_all(&directory).unwrap()),
};
let _main = UnixListener::bind(main_path)?;
let mut sync = parity_tokio_ipc::Endpoint::new(sync_path.clone()).incoming()?;
let _owner = tokio::net::UnixStream::connect(&sync_path).await?;
let owner = Connection::new(sync.next().await.unwrap()?);
verify_sync_client(&owner).await?;
other
.stdin
.take()
.unwrap()
.write_all(sync_path.as_bytes())
.await?;
let sender = Connection::new(sync.next().await.unwrap()?);
assert_eq!(sender.peer_uid(), owner.peer_uid());
let result = verify_sync_client(&sender).await;
drop(sender);
assert!(other.wait().await?.success());
assert_eq!(
result.unwrap_err().to_string(),
"Expected the user main IPC server"
);
Ok(())
}
}
+2 -2
View File
@@ -193,7 +193,7 @@ impl Drop for KcpStream {
}
#[cfg(test)]
mod tests {
pub(crate) mod tests {
use super::*;
use std::time::Duration;
@@ -205,7 +205,7 @@ mod tests {
(Arc::new(a), Arc::new(b))
}
async fn establish() -> ((KcpStream, Stream), (KcpStream, Stream)) {
pub(crate) async fn establish() -> ((KcpStream, Stream), (KcpStream, Stream)) {
let (a, b) = connected_pair().await;
let (accept_res, connect_res) = tokio::join!(
KcpStream::accept(b, Duration::from_secs(5), None),
+111
View File
@@ -100,6 +100,8 @@ pub mod client {
#[derive(Default)]
struct GrabOwnerState {
owner: Option<u128>,
#[cfg(windows)]
unicode_packet: UnicodePacket,
last_grab: Option<std::time::Instant>,
/// True while a deferred-release thread is in flight. Prevents
/// spawning redundant threads during the X11 feedback loop.
@@ -206,6 +208,10 @@ pub mod client {
#[cfg(target_os = "linux")]
let had_owner = gs.owner.is_some();
gs.owner = Some(session_id);
#[cfg(windows)]
{
gs.unicode_packet = Default::default();
}
gs.last_grab = Some(std::time::Instant::now());
// Invalidate any in-flight deferred release from the previous
// owner so it cannot suppress a fresh timer for the new owner.
@@ -296,6 +302,10 @@ pub mod client {
KEYBOARD_HOOKED.store(false, Ordering::SeqCst);
gs.owner = None;
#[cfg(windows)]
{
gs.unicode_packet = Default::default();
}
gs.last_grab = None;
gs.deferred_pending = false;
release_after_unlock = Some(take_remote_keys());
@@ -321,6 +331,22 @@ pub mod client {
}
}
#[cfg(windows)]
pub(crate) fn set_unicode_input_enabled(enabled: bool) {
let mut gs = GRAB_STATE.lock().unwrap();
gs.unicode_packet = Default::default();
rdev::set_unicode_packet_enabled(enabled);
}
#[cfg(windows)]
pub(super) fn handle_unicode_packet(event: &Event) -> bool {
let mut gs = GRAB_STATE.lock().unwrap();
if gs.owner.is_none() {
return false;
}
crate::platform::windows::keyboard::handle_unicode_packet(event, &mut gs.unicode_packet)
}
pub fn process_event(keyboard_mode: &str, event: &Event, lock_modes: Option<i32>) {
// Shortcut intercept — must come before any wire encoding.
// A press that fires a shortcut is consumed, and so are its auto repeats
@@ -664,10 +690,25 @@ fn should_block_relative_mouse_shortcut(key: Key, is_press: bool) -> bool {
}
fn start_grab_loop() {
#[cfg(windows)]
client::set_unicode_input_enabled(
crate::get_local_option(base::config::keys::OPTION_ALLOW_UNICODE_INPUT) == "Y",
);
std::env::set_var("KEYBOARD_ONLY", "y");
#[cfg(any(target_os = "windows", target_os = "macos"))]
std::thread::spawn(move || {
let try_handle_keyboard = move |event: Event, key: Key, is_press: bool| -> Option<Event> {
#[cfg(windows)]
if crate::platform::windows::keyboard::is_unicode_packet(&event) {
// Source 2 sends physical keys asynchronously through Flutter.
// Use Source 1 to preserve packet text ordering with Tab/Enter.
#[cfg(feature = "flutter")]
if !IS_RDEV_ENABLED.load(Ordering::SeqCst) {
return Some(event);
}
return (!client::handle_unicode_packet(&event)).then_some(event);
}
// fix #2211:CAPS LOCK don't work
if key == Key::CapsLock || key == Key::NumLock {
return Some(event);
@@ -1697,3 +1738,73 @@ pub mod input_source {
]
}
}
#[cfg(any(windows, test))]
#[derive(Default)]
pub(crate) struct UnicodePacket {
high_surrogate: Option<u16>,
}
#[cfg(any(windows, test))]
impl UnicodePacket {
pub(crate) fn decode(&mut self, code: u32) -> Result<Option<KeyEvent>, &'static str> {
const HIGH_SURROGATES: std::ops::RangeInclusive<u16> = 0xD800..=0xDBFF;
const LOW_SURROGATES: std::ops::RangeInclusive<u16> = 0xDC00..=0xDFFF;
const ERROR_LOG_INTERVAL: std::time::Duration = std::time::Duration::from_secs(1);
let previous = self.high_surrogate.take();
let code = u16::try_from(code).map_err(|_| "Invalid Unicode keyboard packet")?;
if HIGH_SURROGATES.contains(&code) {
self.high_surrogate = Some(code);
return if previous.is_some() {
Err("Unpaired Unicode keyboard surrogate")
} else {
Ok(None)
};
}
let units = match previous {
Some(high) if LOW_SURROGATES.contains(&code) => vec![high, code],
Some(_) => {
hbb_common::throttled_log!(
ERROR_LOG_INTERVAL,
warn,
"Unpaired Unicode keyboard surrogate"
);
vec![code]
}
None => vec![code],
};
let text = String::from_utf16(&units).map_err(|_| "Invalid Unicode keyboard sequence")?;
let mut event = KeyEvent::new();
// Legacy text input already injects Unicode on the peer, including the sign-in screen.
event.set_seq(text);
Ok(Some(event))
}
}
#[cfg(test)]
mod tests {
use super::UnicodePacket;
#[test]
fn unicode_packets_preserve_bmp_and_surrogate_pairs() {
let expected = "a8*6 café Ω Ж 日本語 😀🦀END";
let mut decoder = UnicodePacket::default();
let mut received = String::new();
for unit in expected.encode_utf16() {
if let Some(event) = decoder.decode(u32::from(unit)).unwrap() {
received.push_str(event.seq());
}
}
assert_eq!(received, expected);
}
#[test]
fn unicode_packets_keep_text_after_unpaired_high_surrogate() {
let mut decoder = UnicodePacket::default();
assert!(decoder.decode(0xD83D).unwrap().is_none());
assert_eq!(decoder.decode(u32::from(b'A')).unwrap().unwrap().seq(), "A");
assert_eq!(decoder.decode(u32::from(b'B')).unwrap().unwrap().seq(), "B");
}
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "فتح في نافذة جديدة"),
("Show displays as individual windows", "عرض الشاشات كنافذات منفصلة"),
("Use all my displays for the remote session", "استخدام جميع شاشاتي للجلسة عن بُعد"),
("selinux_tip", "يجب تكوين SELinux بشكل صحيح لضمان التشغيل السلس."),
("Change view", "تغيير العرض"),
("Big tiles", "بلاط كبير"),
("Small tiles", "بلاط صغير"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "طلب الموافقة"),
("Forever", "إلى الأبد"),
("username-login-disabled-oidc-unavailable", "تم تعطيل تسجيل الدخول باسم المستخدم وكلمة المرور، ولا توجد طرق متاحة لتسجيل الدخول عبر OIDC."),
("Use DRM screen capture", "استخدام التقاط الشاشة عبر DRM"),
("drm-capture-tip", "يلتقط الشاشة مباشرة من بطاقة الرسومات عبر خدمة RustDesk، دون طلب مشاركة الشاشة في Wayland، بما في ذلك شاشة تسجيل الدخول. قد لا يعمل على كل الأجهزة؛ إذا استمرت الاتصالات في طلب مشاركة الشاشة، فأوقف هذا الخيار أو استخدم X11. تغيير هذا الخيار يقطع الجلسات الحالية."),
("wayland-drm-tip", "للوصول غير المراقب على Wayland، جرّب التقاط الشاشة عبر DRM، أو استخدم X11 إذا لم يعمل."),
("login-wayland-drm-tip", "للوصول إلى شاشة تسجيل الدخول في Wayland، جرّب التقاط الشاشة عبر DRM أو حوّلها إلى X11."),
("Keyboard mode", "وضع لوحة المفاتيح"),
("Enable Unicode input", "تفعيل إدخال Unicode"),
("unicode-input-tip", "التقاط نص Unicode الذي ترسله أدوات مثل KeePassXC Auto-Type. يتطلب استخدام مصدر الإدخال 1."),
("Remote terminal access requires an active desktop session", "يتطلب الوصول إلى الطرفية عن بُعد جلسة سطح مكتب نشطة"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Yeni pəncərədə aç"),
("Show displays as individual windows", "Ekranları ayrı pəncərələr kimi göstər"),
("Use all my displays for the remote session", "Uzaq sessiya üçün bütün ekranlarımı işlət"),
("selinux_tip", "Cihazınızda SELinux aktivdir, bu, RustDesk-in idarə olunan tərəf kimi düzgün işləməsinə mane ola bilər."),
("Change view", "Görünüşü dəyiş"),
("Big tiles", "Böyük xanalar"),
("Small tiles", "Kiçik xanalar"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Təsdiq istə"),
("Forever", "Həmişəlik"),
("username-login-disabled-oidc-unavailable", "İstifadəçi adı və parol ilə giriş deaktiv edilib və heç bir OIDC giriş üsulu mövcud deyil."),
("Use DRM screen capture", "DRM ekran çəkilişindən istifadə et"),
("drm-capture-tip", "Ekranı RustDesk xidməti vasitəsilə birbaşa qrafik kartdan çəkir, Wayland ekran paylaşımı sorğusu olmadan, giriş ekranı da daxil olmaqla. Hər cihazda işləməyə bilər; bağlantılar hələ də ekranı paylaşmağı tələb edirsə, bunu söndürün və ya X11 işlədin. Bunu dəyişmək cari sessiyaları kəsir."),
("wayland-drm-tip", "Wayland-da nəzarətsiz giriş üçün DRM ekran çəkilişini sınayın, işləməzsə X11 işlədin."),
("login-wayland-drm-tip", "Wayland giriş ekranına daxil olmaq üçün DRM ekran çəkilişini sınayın və ya onu X11-ə keçirin."),
("Keyboard mode", "Klaviatura rejimi"),
("Enable Unicode input", "Unicode girişini aktivləşdir"),
("unicode-input-tip", "KeePassXC Auto-Type kimi alətlərin göndərdiyi Unicode mətnini tutun. Giriş mənbəyi 1 tələb olunur."),
("Remote terminal access requires an active desktop session", "Terminala uzaqdan daxil olmaq üçün aktiv masaüstü sessiyası tələb olunur"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Адкрыць у новым акне"),
("Show displays as individual windows", "Паказваць дысплэі ў асобных вокнах"),
("Use all my displays for the remote session", "Выкарыстоўваць усе мае дысплэі для аддаленага сеанса"),
("selinux_tip", "На вашай прыладзе ўключаны SELinux, што можа ствараць перашкоды ў працы RustDesk на баку абанента."),
("Change view", "Рэжым"),
("Big tiles", "Вялікія пліткі"),
("Small tiles", "Маленькія пліткі"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Запытаць дазвол"),
("Forever", "Назаўсёды"),
("username-login-disabled-oidc-unavailable", "Уваход з імем карыстальніка і паролем адключаны, і няма даступных спосабаў уваходу праз OIDC."),
("Use DRM screen capture", "Выкарыстоўваць захоп экрана праз DRM"),
("drm-capture-tip", "Захоплівае экран непасрэдна з відэакарты праз службу RustDesk, без запыту Wayland на дэманстрацыю экрана, у тым ліку на экране ўваходу. Можа працаваць не на ўсіх прыладах; калі падключэнні ўсё яшчэ патрабуюць дазволу на дэманстрацыю экрана, адключыце гэта або выкарыстоўвайце X11. Змяненне гэтага параметра разрывае бягучыя сеансы."),
("wayland-drm-tip", "Для аўтаматычнага доступу ў Wayland паспрабуйце захоп экрана праз DRM, а калі не працуе — X11."),
("login-wayland-drm-tip", "Для доступу да экрана ўваходу Wayland паспрабуйце захоп экрана праз DRM або пераключыце яго на X11."),
("Keyboard mode", "Рэжым клавіятуры"),
("Enable Unicode input", "Уключыць увод Unicode"),
("unicode-input-tip", "Захопліваць тэкст Unicode, які дасылаюць інструменты накшталт KeePassXC Auto-Type. Патрабуецца крыніца ўводу 1."),
("Remote terminal access requires an active desktop session", "Для аддаленага доступу да тэрмінала патрэбны актыўны сеанс працоўнага стала"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Отваряне в нов прозорец"),
("Show displays as individual windows", "Показване на екраните в отделни прозорци"),
("Use all my displays for the remote session", "Използвай всички мои екрани за отдалечена връзка"),
("selinux_tip", "SELinux е активиран на вашето устройство, което може да попречи на RustDesk да работи правилно като контролирана страна."),
("Change view", "Промяна изглед"),
("Big tiles", "Големи заглавия"),
("Small tiles", "Малки заглавия"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Поискай одобрение"),
("Forever", "Завинаги"),
("username-login-disabled-oidc-unavailable", "Входът с потребителско име и парола е изключен и няма налични методи за вход чрез OIDC."),
("Use DRM screen capture", "Използване на заснемане на екрана чрез DRM"),
("drm-capture-tip", "Заснема екрана директно от видеокартата чрез услугата на RustDesk, без подканата на Wayland за споделяне на екрана, включително на екрана за влизане. Може да не работи на всяко устройство; ако връзките все още искат споделяне на екрана, изключете това или използвайте X11. Промяната прекъсва текущите сесии."),
("wayland-drm-tip", "За безконтролен достъп в Wayland опитайте заснемане чрез DRM или използвайте X11, ако не работи."),
("login-wayland-drm-tip", "За достъп до екрана за влизане с Wayland опитайте заснемане чрез DRM или го превключете на X11."),
("Keyboard mode", "Режим на клавиатурата"),
("Enable Unicode input", "Разрешаване на въвеждане на Unicode"),
("unicode-input-tip", "Прихващане на Unicode текст, изпратен от инструменти като KeePassXC Auto-Type. Изисква източник на въвеждане 1."),
("Remote terminal access requires an active desktop session", "За отдалечен достъп до терминала е необходима активна сесия на работния плот"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Obre en una finestra nova"),
("Show displays as individual windows", "Mostra cada monitor com una finestra individual"),
("Use all my displays for the remote session", "Utilitza tots els meus monitors per a la connexió remota"),
("selinux_tip", "SELinux està activat al vostre dispositiu, la qual cosa evita que el RustDesk funcioni correctament com a equip controlable."),
("Change view", "Canvia la vista"),
("Big tiles", "Mosaic gran"),
("Small tiles", "Mosaic petit"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Sol·licita aprovació"),
("Forever", "Per sempre"),
("username-login-disabled-oidc-unavailable", "L'inici de sessió amb nom d'usuari i contrasenya està desactivat i no hi ha cap mètode d'inici de sessió OIDC disponible."),
("Use DRM screen capture", "Usa la captura de pantalla DRM"),
("drm-capture-tip", "Captura la pantalla directament de la targeta gràfica a través del servei de RustDesk, sense la sol·licitud de compartir pantalla de Wayland, també a la pantalla d'inici de sessió. Pot no funcionar en tots els dispositius; si les connexions encara demanen compartir la pantalla, desactiveu-ho o useu X11. Canviar-ho desconnecta les sessions actuals."),
("wayland-drm-tip", "Per a l'accés desatès a Wayland, proveu la captura de pantalla DRM, o useu X11 si no funciona."),
("login-wayland-drm-tip", "Per accedir a la pantalla d'inici de sessió de Wayland, proveu la captura DRM o canvieu-la a X11."),
("Keyboard mode", "Mode de teclat"),
("Enable Unicode input", "Habilita l'entrada Unicode"),
("unicode-input-tip", "Captura el text Unicode enviat per eines com ara KeePassXC Auto-Type. Requereix la font d'entrada 1."),
("Remote terminal access requires an active desktop session", "Per accedir al terminal de manera remota cal una sessió d’escriptori activa"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "在新的窗口中打开"),
("Show displays as individual windows", "在单个窗口中打开显示器"),
("Use all my displays for the remote session", "将我的所有显示器用于远程会话"),
("selinux_tip", "SELinux 处于启用状态,RustDesk 可能无法作为被控正常运行。"),
("Change view", "更改视图"),
("Big tiles", "大磁贴"),
("Small tiles", "小磁贴"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "请求批准"),
("Forever", "永久"),
("username-login-disabled-oidc-unavailable", "用户名和密码登录已禁用,且没有可用的 OIDC 登录方式。"),
("Use DRM screen capture", "使用 DRM 捕获屏幕"),
("drm-capture-tip", "通过 RustDesk 服务直接从显卡捕获屏幕,不再弹出 Wayland 的屏幕共享确认,登录界面也可以使用。并非所有设备都支持;如果连接时仍然要求确认屏幕共享,请关闭此选项或改用 X11。更改此选项会断开当前会话。"),
("wayland-drm-tip", "如需在 Wayland 上无人值守访问,请尝试 DRM 捕获屏幕;如果不起作用,请使用 X11。"),
("login-wayland-drm-tip", "如需访问 Wayland 登录界面,请尝试 DRM 捕获屏幕,或将其切换到 X11。"),
("Keyboard mode", "键盘模式"),
("Enable Unicode input", "启用 Unicode 输入"),
("unicode-input-tip", "捕获 KeePassXC 自动输入等工具发送的 Unicode 文本。需要使用输入源 1。"),
("Remote terminal access requires an active desktop session", "访问远程终端需要一个活动的桌面会话"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Otevřít v novém okně"),
("Show displays as individual windows", "Zobrazit obrazovky jako jednotlivá okna"),
("Use all my displays for the remote session", "Použít všechny mé obrazovky pro vzdálenou relaci"),
("selinux_tip", "Na vašem zařízení je povolen SELinux, což může bránit správnému běhu RustDesku jako řízené strany."),
("Change view", "Změnit pohled"),
("Big tiles", "Velké dlaždice"),
("Small tiles", "Malé dlaždice"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Požádat o schválení"),
("Forever", "Navždy"),
("username-login-disabled-oidc-unavailable", "Přihlášení uživatelským jménem a heslem je zakázáno a nejsou k dispozici žádné metody přihlášení přes OIDC."),
("Use DRM screen capture", "Použít snímání obrazovky přes DRM"),
("drm-capture-tip", "Snímá obrazovku přímo z grafické karty prostřednictvím služby RustDesk, bez výzvy Waylandu ke sdílení obrazovky, a to i na přihlašovací obrazovce. Nemusí fungovat na všech zařízeních; pokud připojení stále žádají o sdílení obrazovky, vypněte tuto volbu nebo použijte X11. Změna této volby odpojí aktuální relace."),
("wayland-drm-tip", "Pro bezobslužný přístup ve Waylandu zkuste snímání obrazovky přes DRM, nebo použijte X11, pokud nefunguje."),
("login-wayland-drm-tip", "Pro přístup k přihlašovací obrazovce Waylandu zkuste snímání přes DRM nebo ji přepněte na X11."),
("Keyboard mode", "Režim klávesnice"),
("Enable Unicode input", "Povolit vstup Unicode"),
("unicode-input-tip", "Zachytávat text Unicode odesílaný nástroji, jako je KeePassXC Auto-Type. Vyžaduje zdroj vstupu 1."),
("Remote terminal access requires an active desktop session", "Pro vzdálený přístup k terminálu je potřeba aktivní relace pracovní plochy"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Åbn i et nyt vindue"),
("Show displays as individual windows", "Vis skærme som selvstændige vinduer"),
("Use all my displays for the remote session", "Brug alle mine skærme til fjernforbindelsen"),
("selinux_tip", "SELinux er aktiveret på din enhed, hvilket kan forhindre RustDesk i at køre normalt."),
("Change view", "Skift visning"),
("Big tiles", "Store fliser"),
("Small tiles", "Små fliser"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Anmod om godkendelse"),
("Forever", "For evigt"),
("username-login-disabled-oidc-unavailable", "Login med brugernavn og adgangskode er deaktiveret, og ingen OIDC-loginmetoder er tilgængelige."),
("Use DRM screen capture", "Brug DRM-skærmoptagelse"),
("drm-capture-tip", "Optager skærmen direkte fra grafikkortet via RustDesk-tjenesten uden Waylands forespørgsel om skærmdeling, også på login-skærmen. Virker muligvis ikke på alle enheder; hvis forbindelser stadig beder om skærmdeling, så slå dette fra eller brug X11. Ændring afbryder de aktuelle sessioner."),
("wayland-drm-tip", "Prøv DRM-skærmoptagelse for ubemandet adgang under Wayland, eller brug X11, hvis det ikke virker."),
("login-wayland-drm-tip", "Prøv DRM-skærmoptagelse for at få adgang til Waylands login-skærm, eller skift den til X11."),
("Keyboard mode", "Tastaturtilstand"),
("Enable Unicode input", "Aktivér Unicode-input"),
("unicode-input-tip", "Opfang Unicode-tekst sendt af værktøjer som KeePassXC Auto-Type. Kræver inputkilde 1."),
("Remote terminal access requires an active desktop session", "Fjernadgang til terminalen kræver en aktiv skrivebordssession"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "In einem neuen Fenster öffnen"),
("Show displays as individual windows", "Jeden Bildschirm in einem eigenen Fenster anzeigen"),
("Use all my displays for the remote session", "Alle meine Bildschirme für die Fernsitzung verwenden"),
("selinux_tip", "SELinux ist auf Ihrem Gerät aktiviert, was dazu führen kann, dass RustDesk als kontrollierte Seite nicht richtig läuft."),
("Change view", "Ansicht ändern"),
("Big tiles", "Große Kacheln"),
("Small tiles", "Kleine Kacheln"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Genehmigung anfordern"),
("Forever", "Für immer"),
("username-login-disabled-oidc-unavailable", "Die Anmeldung mit Benutzername und Passwort ist deaktiviert, und es sind keine OIDC-Anmeldemethoden verfügbar."),
("Use DRM screen capture", "DRM-Bildschirmaufnahme verwenden"),
("drm-capture-tip", "Nimmt den Bildschirm über den RustDesk-Dienst direkt von der Grafikkarte auf, ohne die Wayland-Abfrage zur Bildschirmfreigabe, auch auf dem Anmeldebildschirm. Funktioniert möglicherweise nicht auf jedem Gerät. Wenn Verbindungen weiterhin eine Bildschirmfreigabe verlangen, deaktivieren Sie dies oder verwenden Sie X11. Eine Änderung trennt die aktuellen Sitzungen."),
("wayland-drm-tip", "Für unbeaufsichtigten Zugriff unter Wayland DRM-Bildschirmaufnahme versuchen, sonst X11 verwenden."),
("login-wayland-drm-tip", "Für den Wayland-Anmeldebildschirm DRM-Bildschirmaufnahme versuchen oder auf X11 umstellen."),
("Keyboard mode", "Tastaturmodus"),
("Enable Unicode input", "Unicode-Eingabe aktivieren"),
("unicode-input-tip", "Unicode-Text erfassen, der von Werkzeugen wie KeePassXC Auto-Type gesendet wird. Erfordert Eingabequelle 1."),
("Remote terminal access requires an active desktop session", "Der Fernzugriff auf das Terminal erfordert eine aktive Desktop-Sitzung"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Άνοιγμα σε νέο παράθυρο"),
("Show displays as individual windows", "Εμφάνιση οθονών σε ξεχωριστά παράθυρα"),
("Use all my displays for the remote session", "Χρήση όλων των οθονών της απομακρυσμένης σύνδεσης"),
("selinux_tip", "Το SELinux είναι ενεργοποιημένο στη συσκευή σας, κάτι που ενδέχεται να εμποδίσει την σωστή λειτουργία του RustDesk ως ελεγχόμενης πλευράς."),
("Change view", "Αλλαγή απεικόνισης"),
("Big tiles", "Μεγάλα εικονίδια"),
("Small tiles", "Μικρά εικονίδια"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Αίτημα έγκρισης"),
("Forever", "Για πάντα"),
("username-login-disabled-oidc-unavailable", "Η σύνδεση με όνομα χρήστη και κωδικό πρόσβασης είναι απενεργοποιημένη και δεν υπάρχουν διαθέσιμες μέθοδοι σύνδεσης OIDC."),
("Use DRM screen capture", "Χρήση καταγραφής οθόνης μέσω DRM"),
("drm-capture-tip", "Καταγράφει την οθόνη απευθείας από την κάρτα γραφικών μέσω της υπηρεσίας RustDesk, χωρίς το αίτημα κοινής χρήσης οθόνης του Wayland, ακόμη και στην οθόνη εισόδου. Ενδέχεται να μη λειτουργεί σε όλες τις συσκευές· αν οι συνδέσεις εξακολουθούν να ζητούν κοινή χρήση οθόνης, απενεργοποιήστε το ή χρησιμοποιήστε X11. Η αλλαγή του αποσυνδέει τις τρέχουσες συνεδρίες."),
("wayland-drm-tip", "Για πρόσβαση χωρίς επίβλεψη στο Wayland, δοκιμάστε την καταγραφή μέσω DRM ή χρησιμοποιήστε X11 αν δεν λειτουργεί."),
("login-wayland-drm-tip", "Για πρόσβαση στην οθόνη εισόδου του Wayland, δοκιμάστε την καταγραφή μέσω DRM ή αλλάξτε την σε X11."),
("Keyboard mode", "Λειτουργία πληκτρολογίου"),
("Enable Unicode input", "Ενεργοποίηση εισαγωγής Unicode"),
("unicode-input-tip", "Λήψη κειμένου Unicode που αποστέλλεται από εργαλεία όπως το KeePassXC Auto-Type. Απαιτείται η πηγή εισόδου 1."),
("Remote terminal access requires an active desktop session", "Η απομακρυσμένη πρόσβαση στο τερματικό απαιτεί ενεργή συνεδρία επιφάνειας εργασίας"),
].iter().cloned().collect();
}
+4 -1
View File
@@ -188,7 +188,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("pull_group_failed_tip", "Failed to refresh group"),
("doc_fix_wayland", "https://rustdesk.com/docs/en/client/linux/#x11-required"),
("display_is_plugged_out_msg", "The display is plugged out, switch to the first display."),
("selinux_tip", "SELinux is enabled on your device, which may prevent RustDesk from running properly as controlled side."),
("id_input_tip", "You can input an ID, a direct IP, or a domain with a port (<domain>:<port>).\nIf you want to access a device on another server, please append the server address (<id>@<server_address>?key=<key_value>), for example,\n9123456234@192.168.16.1:21117?key=5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=.\nIf you want to access a device on a public server, please input \"<id>@public\", the key is not needed for public server.\n\nIf you want to force the use of a relay connection on the first connection, add \"/r\" at the end of the ID, for example, \"9123456234/r\"."),
("privacy_mode_impl_mag_tip", "Mode 1"),
("privacy_mode_impl_virtual_display_tip", "Mode 2"),
@@ -293,5 +292,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("android-logs-folder-tip", "Choose Android → media to store log files."),
("install-directory-not-empty-tip", "The selected folder is not empty. Installation may delete existing data. Consider choosing a different folder."),
("username-login-disabled-oidc-unavailable", "Username and password login is disabled, and no OIDC login methods are available."),
("drm-capture-tip", "Captures the screen directly from the graphics card through the RustDesk service, without the Wayland screen sharing prompt, including at the login screen. It may not work on every device; if connections still ask to share the screen, turn this off or use X11. Changing this disconnects current sessions."),
("wayland-drm-tip", "For unattended access on Wayland, try DRM screen capture, or use X11 if it does not work."),
("login-wayland-drm-tip", "To access the Wayland login screen, try DRM screen capture or switch it to X11."),
("unicode-input-tip", "Capture Unicode text sent by tools such as KeePassXC Auto-Type. Requires input source 1."),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Malfermi en nova fenestro"),
("Show displays as individual windows", "Montri ekranojn kiel apartajn fenestrojn"),
("Use all my displays for the remote session", "Uzi ĉiujn miajn ekranojn por la fora sesio"),
("selinux_tip", "SELinux estas ebligita sur via aparato, kio povas malhelpi RustDesk funkcii ĝuste kiel kontrolata flanko."),
("Change view", "Ŝanĝi rigardon"),
("Big tiles", "Grandaj kaheloj"),
("Small tiles", "Malgrandaj kaheloj"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Peti aprobon"),
("Forever", "Por ĉiam"),
("username-login-disabled-oidc-unavailable", "Ensaluto per uzantnomo kaj pasvorto estas malŝaltita, kaj neniuj OIDC-ensalutmetodoj estas disponeblaj."),
("Use DRM screen capture", "Uzi DRM-ekrankapton"),
("drm-capture-tip", "Kaptas la ekranon rekte de la grafika karto per la servo de RustDesk, sen la peto de Wayland pri ekrankundivido, ankaŭ ĉe la ensaluta ekrano. Eble ne funkcias sur ĉiu aparato; se konektoj ankoraŭ petas kundividi la ekranon, malŝaltu ĉi tion aŭ uzu X11. Ŝanĝo malkonektas la nunajn seancojn."),
("wayland-drm-tip", "Por senĉeesta aliro ĉe Wayland, provu DRM-ekrankapton, aŭ uzu X11 se ĝi ne funkcias."),
("login-wayland-drm-tip", "Por aliri la ensalutan ekranon de Wayland, provu DRM-ekrankapton aŭ ŝanĝu ĝin al X11."),
("Keyboard mode", "Klavara reĝimo"),
("Enable Unicode input", "Ebligi Unicode-enigon"),
("unicode-input-tip", "Kapti Unicode-tekston senditan de iloj kiel KeePassXC Auto-Type. Postulas enigfonton 1."),
("Remote terminal access requires an active desktop session", "Fora aliro al la terminalo postulas aktivan labortablan seancon"),
].iter().cloned().collect();
}
+25 -18
View File
@@ -135,7 +135,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Refresh", "Actualizar"),
("ID does not exist", "La ID no existe"),
("Failed to connect to rendezvous server", "No se pudo conectar al servidor de encuentro"),
("Please try later", "Por favor intente mas tarde"),
("Please try later", "Por favor intente más tarde"),
("Remote desktop is offline", "El escritorio remoto está desconectado"),
("Key mismatch", "La clave no coincide"),
("Timeout", "Tiempo agotado"),
@@ -268,7 +268,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Share screen", "Compartir pantalla"),
("Chat", "Chat"),
("Total", "Total"),
("items", "items"),
("items", "elementos"),
("Selected", "Seleccionado"),
("Screen Capture", "Captura de pantalla"),
("Input Control", "Control de entrada"),
@@ -293,13 +293,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Succeeded", "Logrado"),
("Someone turns on privacy mode, exit", "Alguien active el modo privacidad, salga"),
("Unsupported", "No soportado"),
("Peer denied", "Par denegado"),
("Peer exit", "Par salio"),
("Peer denied", "Conexión rechazada"),
("Peer exit", "Par desconectado"),
("Failed to turn off", "Error al apagar"),
("Turned off", "Apagado"),
("Language", "Idioma"),
("Keep RustDesk background service", "Dejar RustDesk como Servicio en 2do plano"),
("Ignore Battery Optimizations", "Ignorar optimizacioens de bateria"),
("Keep RustDesk background service", "Dejar RustDesk como Servicio en segundo plano"),
("Ignore Battery Optimizations", "Ignorar optimizaciones de batería"),
("android_open_battery_optimizations_tip", "Si deseas deshabilitar esta característica, por favor, ve a la página siguiente de ajustes, busca y entra en [Batería] y desmarca [Sin restricción]"),
("Start on boot", "Iniciar al arrancar"),
("Start the screen sharing service on boot, requires special permissions", "Iniciar el servicio de pantalla compartida al arrancar, requiere permisos especiales"),
@@ -307,14 +307,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Legacy mode", "Modo heredado"),
("Map mode", "Modo mapa"),
("Translate mode", "Modo traducido"),
("Use permanent password", "Usar contraseña permamente"),
("Use permanent password", "Usar contraseña permanente"),
("Use both passwords", "Usar ambas contraseñas"),
("Set permanent password", "Establecer contraseña permamente"),
("Set permanent password", "Establecer contraseña permanente"),
("Enable remote restart", "Habilitar reinicio remoto"),
("Restart remote device", "Reiniciar dispositivo"),
("Are you sure you want to restart", "¿Estás seguro de que deseas reiniciar?"),
("Restarting remote device", "Reiniciando dispositivo remoto"),
("remote_restarting_tip", "El dispositivo remoto se está reiniciando. Por favor cierre este mensaje y vuelva a conectarse con la contraseña peremanente en unos momentos."),
("remote_restarting_tip", "El dispositivo remoto se está reiniciando. Por favor cierre este mensaje y vuelva a conectarse con la contraseña permanente en unos momentos."),
("Copied", "Copiado"),
("Exit Fullscreen", "Salir de pantalla completa"),
("Fullscreen", "Pantalla completa"),
@@ -369,7 +369,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Write a message", "Escribir un mensaje"),
("Prompt", "Solicitud"),
("Please wait for confirmation of UAC...", "Por favor, espera confirmación de UAC"),
("elevated_foreground_window_tip", "La ventana actual del escritorio remoto necesita privilegios elevados para funcionar, así que no puedes usar ratón y teclado temporalmente. Puedes solicitar al usuario remoto que minimize la ventana actual o hacer clic en el botón de elevación de la ventana de gestión de conexión. Para evitar este problema, se recomienda instalar el programa en el dispositivo remto."),
("elevated_foreground_window_tip", "La ventana actual del escritorio remoto necesita privilegios elevados para funcionar, así que no puedes usar ratón y teclado temporalmente. Puedes solicitar al usuario remoto que minimize la ventana actual o hacer clic en el botón de elevación de la ventana de gestión de conexión. Para evitar este problema, se recomienda instalar el programa en el dispositivo remoto."),
("Disconnected", "Desconectado"),
("Other", "Otro"),
("Confirm before closing multiple tabs", "Confirmar antes de cerrar múltiples pestañas"),
@@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Codec", "Códec"),
("Resolution", "Resolución"),
("No transfers in progress", "No hay transferencias en curso"),
("Set one-time password length", "Establecer contraseña de un solo uso"),
("Set one-time password length", "Establecer la longitud de la contraseña de un solo uso"),
("RDP Settings", "Ajustes RDP"),
("Sort by", "Ordenar por"),
("New Connection", "Nueva conexión"),
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Abrir en una nueva ventana"),
("Show displays as individual windows", "Mostrar pantallas como ventanas individuales"),
("Use all my displays for the remote session", "Usar todas mis pantallas para la sesión remota"),
("selinux_tip", "SELinux está activado en tu dispositivo, lo que puede hacer que RustDesk no se ejecute correctamente como lado controlado."),
("Change view", "Cambiar vista"),
("Big tiles", "Mosaicos grandes"),
("Small tiles", "Mosaicos pequeños"),
@@ -558,7 +557,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("wrong-2fa-code", "No se puede verificar el código. Comprueba que el código y los ajustes de hora local son correctos"),
("enter-2fa-title", "Autenticación en dos pasos"),
("Email verification code must be 6 characters.", "El código de verificación por mail debe tener 6 caracteres"),
("2FA code must be 6 digits.", "El cóidigo 2FA debe tener 6 dígitos"),
("2FA code must be 6 digits.", "El código 2FA debe tener 6 dígitos"),
("Multiple Windows sessions found", "Encontradas sesiones de múltiples ventanas"),
("Please select the session you want to connect to", "Por favor, seleccione la sesión a la que se desea conectar"),
("powered_by_me", "Con tecnología de RustDesk"),
@@ -581,7 +580,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Follow remote cursor", "Seguir cursor remoto"),
("Follow remote window focus", "Seguir ventana remota activa"),
("default_proxy_tip", "El protocolo y puerto predeterminados es Socks5 y 1080"),
("no_audio_input_device_tip", "No se ha encontrado ningún dispositivo de entrada de autio."),
("no_audio_input_device_tip", "No se ha encontrado ningún dispositivo de entrada de audio."),
("Incoming", "Entrante"),
("Outgoing", "Saliente"),
("Clear Wayland screen selection", "Borrar la selección de pantalla Wayland"),
@@ -609,7 +608,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("cancel-bot-confirm-tip", "¿Seguro que quieres cancelar el bot de Telegram?"),
("About RustDesk", "Acerca de RustDesk"),
("Send clipboard keystrokes", "Enviar pulsaciones de teclas"),
("network_error_tip", "Por fvor, comprueba tu conexión de red e inténtalo de nuevo."),
("network_error_tip", "Por favor, comprueba tu conexión de red e inténtalo de nuevo."),
("Unlock with PIN", "Desbloquear con PIN"),
("Requires at least {} characters", "Se necesitan al menos {} caracteres"),
("Wrong PIN", "PIN erróneo"),
@@ -631,7 +630,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Upload files", "Subir archivos"),
("Clipboard is synchronized", "Portapapeles sincronizado"),
("Update client clipboard", "Actualizar portapapeles del cliente"),
("Untagged", "Sin itiquetar"),
("Untagged", "Sin etiquetar"),
("new-version-of-{}-tip", "Hay una nueva versión de {} disponible"),
("Accessible devices", "Dispositivos accesibles"),
("upgrade_remote_rustdesk_client_to_{}_tip", "Por favor, actualiza el cliente RustDesk a la versión {} o superior en el lado remoto"),
@@ -686,14 +685,14 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("New tab", "Nueva pestaña"),
("Keep terminal sessions on disconnect", "Mantener sesiones de terminal al desconectar"),
("Terminal (Run as administrator)", "Terminal (Ejecutar como administrador)"),
("terminal-admin-login-tip", "Por favor, introduzca el usuario y la contrasseña del administrador en el lado controlado."),
("terminal-admin-login-tip", "Por favor, introduzca el usuario y la contraseña del administrador en el lado controlado."),
("Failed to get user token.", "No se ha podido obtener el token de usuario"),
("Incorrect username or password.", "Nombre y contraseña incorrectos"),
("The user is not an administrator.", "El usuario no es un administrador."),
("Failed to check if the user is an administrator.", "No se ha podido comprobar si el usuario es un administrador."),
("Supported only in the installed version.", "Soportado solo en la versión instalada."),
("elevation_username_tip", "Introduzca el nombre de usuario o dominio\\NombreDeUsuario"),
("Preparing for installation ...", "Preparando instlación..."),
("Preparing for installation ...", "Preparando instalación..."),
("Show my cursor", "Mostrar mi cursor"),
("Scale custom", "Escala personalizada"),
("Custom scale slider", "Control deslizante de escala personalizada"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Solicitar aprobación"),
("Forever", "Para siempre"),
("username-login-disabled-oidc-unavailable", "El inicio de sesión con nombre de usuario y contraseña está deshabilitado y no hay métodos de inicio de sesión OIDC disponibles."),
("Use DRM screen capture", "Usar captura de pantalla DRM"),
("drm-capture-tip", "Captura la pantalla directamente desde la tarjeta gráfica a través del servicio de RustDesk, sin la solicitud de compartir pantalla de Wayland, incluso en la pantalla de inicio de sesión. Puede no funcionar en todos los dispositivos; si las conexiones siguen pidiendo compartir la pantalla, desactívelo o use X11. Cambiarlo desconecta las sesiones actuales."),
("wayland-drm-tip", "Para acceso desatendido en Wayland, pruebe la captura de pantalla DRM o use X11 si no funciona."),
("login-wayland-drm-tip", "Para acceder a la pantalla de inicio de sesión de Wayland, pruebe la captura DRM o cámbiela a X11."),
("Keyboard mode", "Modo de teclado"),
("Enable Unicode input", "Habilitar la entrada Unicode"),
("unicode-input-tip", "Captura texto Unicode enviado por herramientas como KeePassXC Auto-Type. Requiere la fuente de entrada 1."),
("Remote terminal access requires an active desktop session", "Para acceder al terminal de forma remota se necesita una sesión de escritorio activa"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Ava uues aknas"),
("Show displays as individual windows", "Kuva kuvarid eraldi akendena"),
("Use all my displays for the remote session", "Kasuta kõiki minu kuvarid kaugseansi jaoks"),
("selinux_tip", "SELinux on su seadmes lubatud, mis võib RustDeskil takistada juhitud poolel toimimist."),
("Change view", "Muuda vaadet"),
("Big tiles", "Suured plaadid"),
("Small tiles", "Väikesed plaadid"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Küsi heakskiitu"),
("Forever", "Igavesti"),
("username-login-disabled-oidc-unavailable", "Kasutajanime ja parooliga sisselogimine on keelatud ja ühtegi OIDC sisselogimisviisi pole saadaval."),
("Use DRM screen capture", "Kasuta DRM-ekraanihõivet"),
("drm-capture-tip", "Hõivab ekraani RustDeski teenuse kaudu otse graafikakaardilt, ilma Waylandi ekraani jagamise päringuta, ka sisselogimisekraanil. Ei pruugi töötada igas seadmes; kui ühendused küsivad endiselt ekraani jagamist, lülita see välja või kasuta X11. Muutmine katkestab praegused seansid."),
("wayland-drm-tip", "Järelvalveta juurdepääsuks Waylandis proovi DRM-ekraanihõivet või kasuta X11, kui see ei tööta."),
("login-wayland-drm-tip", "Waylandi sisselogimisekraanile juurdepääsuks proovi DRM-ekraanihõivet või lülita see X11 peale."),
("Keyboard mode", "Klaviatuurirežiim"),
("Enable Unicode input", "Luba Unicode'i sisestus"),
("unicode-input-tip", "Püüa kinni selliste tööriistade nagu KeePassXC Auto-Type saadetud Unicode'i tekst. Nõuab sisendallikat 1."),
("Remote terminal access requires an active desktop session", "Kaugjuurdepääs terminalile nõuab aktiivset töölauaseanssi"),
].iter().cloned().collect();
}
+8 -1
View File
@@ -532,7 +532,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Open in new window", "Ireki leiho berrian"),
("Show displays as individual windows", "Erakutsi pantailak banakako leiho gisa"),
("Use all my displays for the remote session", "Erabili nire pantaila guztiak urruneko saiorako"),
("selinux_tip", "SELinux zure gailuan gaituta dago. Honek RustDesk kontrolatutako alde gisa dagoenean behar bezala ez exekutatzea ekarri dezake."),
("Change view", "Aldatu ikuspegia"),
("Big tiles", "Baldosa handiak"),
("Small tiles", "Baldosa txikiak"),
@@ -827,5 +826,13 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Request approval", "Eskatu onespena"),
("Forever", "Betiko"),
("username-login-disabled-oidc-unavailable", "Erabiltzaile-izenarekin eta pasahitzarekin saioa hastea desgaituta dago, eta ez dago OIDC saioa hasteko metodorik erabilgarri."),
("Use DRM screen capture", "Erabili DRM pantaila-kaptura"),
("drm-capture-tip", "Pantaila zuzenean txartel grafikotik kapturatzen du RustDesk zerbitzuaren bidez, Wayland-en pantaila partekatzeko eskaerarik gabe, saio-hasierako pantailan ere bai. Baliteke gailu guztietan ez ibiltzea; konexioek pantaila partekatzeko eskatzen jarraitzen badute, desaktibatu hau edo erabili X11. Aldatzeak uneko saioak deskonektatzen ditu."),
("wayland-drm-tip", "Wayland-en arretarik gabeko sarrerarako, probatu DRM pantaila-kaptura, edo erabili X11 ez badabil."),
("login-wayland-drm-tip", "Wayland-en saio-hasierako pantailara sartzeko, probatu DRM pantaila-kaptura edo aldatu X11-ra."),
("Keyboard mode", "Teklatuaren modua"),
("Enable Unicode input", "Gaitu Unicode sarrera"),
("unicode-input-tip", "Atzeman KeePassXC Auto-Type bezalako tresnek bidalitako Unicode testua. 1. sarrera-iturria behar du."),
("Remote terminal access requires an active desktop session", "Terminalera urrunetik sartzeko, mahaigaineko saio aktibo bat behar da"),
].iter().cloned().collect();
}
Loaded 100 of 162 files, more files were not shown because too many files have changed in this diff. Show more