Compare commits

...
Author SHA1 Message Date
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
131 changed files with 4171 additions and 591 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,6 +24,15 @@
# 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
@@ -86,6 +95,11 @@ validate_patch_inputs() {
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() {
has_exact_count "$THEME_MATCHES" 'dialogTheme: DialogThemeData(' flutter/lib/common.dart &&
has_exact_count "$THEME_MATCHES" 'tabBarTheme: const TabBarThemeData(' flutter/lib/common.dart &&
@@ -127,7 +141,7 @@ 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
@@ -139,6 +153,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
@@ -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"
+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: |
+4
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
File diff suppressed because it is too large. Load diff
+3
View File
@@ -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
Generated
+6 -6
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",
@@ -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",
@@ -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",
@@ -8209,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",
@@ -8249,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",
+17 -16
View File
@@ -24,18 +24,16 @@ AppDir:
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
+16 -13
View File
@@ -24,17 +24,19 @@ AppDir:
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-----
+9 -6
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):
@@ -376,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
@@ -628,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):
+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 {
+18
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";
@@ -161,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";
@@ -207,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";
@@ -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(
@@ -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);
}
});
+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);
+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"
+1 -1
View File
@@ -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);
});
}
+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

+26
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";
@@ -126,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";
@@ -163,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";
@@ -188,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,
@@ -211,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,
@@ -358,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,
@@ -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
@@ -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
+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"
);
}
}
+4
View File
@@ -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);
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 122 KiB

+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::*;
+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() {
+187 -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) => {
@@ -1159,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())))
@@ -1568,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;
@@ -1713,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??)
}
@@ -1774,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")]
@@ -1785,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")]
@@ -2020,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())
@@ -2059,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;
@@ -2080,8 +2162,10 @@ 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(())
}
@@ -2147,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)> {
@@ -2182,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")]
@@ -2221,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")]
@@ -2287,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(()) => {
@@ -2332,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")]
@@ -2442,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(())
}
+162 -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.
@@ -961,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();
@@ -992,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(());
@@ -1013,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(());
}
@@ -1125,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,
@@ -1260,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>,
@@ -1287,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,
};
@@ -1333,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() {
@@ -1352,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),
})
@@ -1391,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() {
@@ -1411,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;
@@ -1504,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,
@@ -1524,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(
@@ -1536,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);
@@ -1552,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,
@@ -1570,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 {
@@ -1586,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));
}
}
}
@@ -1608,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 =
@@ -1623,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,
@@ -1642,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(())
}
@@ -1658,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 {
@@ -1676,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
}
@@ -1714,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<()> {
@@ -1764,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?;
@@ -1785,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`
@@ -1801,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<()> {
@@ -1815,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");
}
@@ -1901,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) },
@@ -1915,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(())
}
}
+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");
}
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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。"),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+1
View File
@@ -295,5 +295,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+20 -17
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"),
@@ -557,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"),
@@ -580,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"),
@@ -608,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"),
@@ -630,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"),
@@ -685,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"),
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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 نیاز دارد."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Kaappaa näytön suoraan näytönohjaimelta RustDesk-palvelun kautta ilman Waylandin näytön jakamisen kehotetta, myös kirjautumisnäytössä. Ei välttämättä toimi kaikilla laitteilla; jos yhteydet pyytävät yhä näytön jakamista, poista tämä käytöstä tai käytä X11:tä. Muutos katkaisee nykyiset istunnot."),
("wayland-drm-tip", "Kokeile valvomattomaan käyttöön Waylandissa DRM-näytönkaappausta, tai käytä X11:tä, jos se ei toimi."),
("login-wayland-drm-tip", "Kokeile Waylandin kirjautumisnäyttöön DRM-näytönkaappausta tai vaihda se X11:een."),
("Keyboard mode", "Näppäimistötila"),
("Enable Unicode input", "Ota Unicode-syöte käyttöön"),
("unicode-input-tip", "Sieppaa työkalujen (esimerkiksi KeePassXC Auto-Type) lähettämää Unicode-tekstiä. Vaatii syötelähteen 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Capture l’écran directement depuis la carte graphique via le service RustDesk, sans la demande de partage d’écran de Wayland, y compris sur l’écran de connexion. Peut ne pas fonctionner sur tous les appareils ; si les connexions demandent toujours de partager l’écran, désactivez cette option ou utilisez X11. La modifier déconnecte les sessions en cours."),
("wayland-drm-tip", "Pour un accès non assisté sous Wayland, essayez la capture d’écran DRM, ou utilisez X11 si elle ne fonctionne pas."),
("login-wayland-drm-tip", "Pour accéder à l’écran de connexion Wayland, essayez la capture d’écran DRM ou passez-le sous X11."),
("Keyboard mode", "Mode du clavier"),
("Enable Unicode input", "Activer la saisie Unicode"),
("unicode-input-tip", "Capturer le texte Unicode envoyé par des outils tels que KeePassXC Auto-Type. Nécessite la source d'entrée 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Captura a pantalla directamente da tarxeta gráfica a través do servizo de RustDesk, sen a solicitude de compartir pantalla de Wayland, tamén na pantalla de inicio de sesión. Pode non funcionar en todos os dispositivos; se as conexións seguen pedindo compartir a pantalla, desactívao ou usa X11. Cambialo desconecta as sesións actuais."),
("wayland-drm-tip", "Para acceso desatendido en Wayland, proba a captura de pantalla DRM ou usa X11 se non funciona."),
("login-wayland-drm-tip", "Para acceder á pantalla de inicio de sesión de Wayland, proba a captura DRM ou cámbiaa a X11."),
("Keyboard mode", "Modo de teclado"),
("Enable Unicode input", "Activar a entrada Unicode"),
("unicode-input-tip", "Capturar o texto Unicode enviado por ferramentas como KeePassXC Auto-Type. Require a fonte de entrada 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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 Auto-Type જેવા સાધનો દ્વારા મોકલાયેલ Unicode લખાણ કૅપ્ચર કરો. ઇનપુટ સ્રોત 1 જરૂરી છે."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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 Auto-Type जैसे टूल द्वारा भेजे गए Unicode पाठ को कैप्चर करें। इसके लिए इनपुट स्रोत 1 आवश्यक है।"),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Snima zaslon izravno s grafičke kartice putem usluge RustDesk, bez Waylandova upita za dijeljenje zaslona, uključujući zaslon za prijavu. Možda neće raditi na svakom uređaju; ako veze i dalje traže dijeljenje zaslona, isključite ovo ili koristite X11. Promjena prekida trenutne sesije."),
("wayland-drm-tip", "Za pristup bez nadzora na Waylandu isprobajte DRM snimanje zaslona ili koristite X11 ako ne radi."),
("login-wayland-drm-tip", "Za pristup Waylandovu zaslonu za prijavu isprobajte DRM snimanje zaslona ili ga prebacite na X11."),
("Keyboard mode", "Način rada tipkovnice"),
("Enable Unicode input", "Omogući Unicode unos"),
("unicode-input-tip", "Hvatanje Unicode teksta koji šalju alati poput KeePassXC Auto-Type. Potreban je izvor unosa 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "A RustDesk szolgáltatáson keresztül közvetlenül a videokártyáról rögzíti a képernyőt, a Wayland képernyőmegosztási kérése nélkül, a bejelentkezési képernyőn is. Nem biztos, hogy minden eszközön működik; ha a kapcsolatok továbbra is képernyőmegosztást kérnek, kapcsolja ki ezt, vagy használja az X11-et. A módosítás bontja az aktuális munkameneteket."),
("wayland-drm-tip", "Felügyelet nélküli hozzáféréshez Waylanden próbálja ki a DRM-képernyőrögzítést, vagy használja az X11-et."),
("login-wayland-drm-tip", "A Wayland bejelentkezési képernyőjéhez próbálja ki a DRM-képernyőrögzítést, vagy váltson X11-re."),
("Keyboard mode", "Billentyűzetmód"),
("Enable Unicode input", "Unicode-bevitel engedélyezése"),
("unicode-input-tip", "Az olyan eszközök által küldött Unicode-szöveg rögzítése, mint a KeePassXC Auto-Type. Az 1. bemeneti forrást igényli."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Menangkap layar langsung dari kartu grafis melalui layanan RustDesk, tanpa permintaan berbagi layar Wayland, termasuk di layar login. Mungkin tidak berfungsi di semua perangkat; jika koneksi masih meminta berbagi layar, matikan opsi ini atau gunakan X11. Mengubahnya akan memutus sesi saat ini."),
("wayland-drm-tip", "Untuk akses tanpa pengawasan di Wayland, coba tangkapan layar DRM, atau gunakan X11 jika tidak berfungsi."),
("login-wayland-drm-tip", "Untuk mengakses layar login Wayland, coba tangkapan layar DRM atau ubah ke X11."),
("Keyboard mode", "Mode papan ketik"),
("Enable Unicode input", "Aktifkan input Unicode"),
("unicode-input-tip", "Tangkap teks Unicode yang dikirim oleh alat seperti KeePassXC Auto-Type. Memerlukan sumber input 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Cattura lo schermo direttamente dalla scheda grafica tramite il servizio RustDesk, senza il prompt di condivisione dello schermo Wayland, anche al login schermo. Potrebbe non funzionare con tutti i dispositivi; se le connessioni chiedono ancora di condividere lo schermo, disabilita questa opzione o usa X11. La modifica di questa opzione disconnetterà le sessioni attuali."),
("wayland-drm-tip", "Per l'accesso non presidiato in Wayland, prova 'Cattura schermo DRM', o se non funziona usa X11."),
("login-wayland-drm-tip", "Per accedere alla schermata di accesso Wayland, prova 'Cattura schermo DRM' o passa a X11."),
("Keyboard mode", ""),
("Enable Unicode input", ""),
("unicode-input-tip", ""),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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 Auto-Type などのツールが送信する Unicode テキストを取り込みます。入力ソース 1 が必要です。"),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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 Auto-Type 같은 도구가 보내는 Unicode 텍스트를 캡처합니다. 입력 소스 1이 필요합니다."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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 Auto-Type сияқты құралдар жіберген Unicode мәтінін қабылдау. Енгізу көзі 1 қажет."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Fiksuoja ekraną tiesiai iš vaizdo plokštės per RustDesk paslaugą, be Wayland ekrano bendrinimo užklausos, taip pat ir prisijungimo ekrane. Gali veikti ne visuose įrenginiuose; jei ryšiai vis dar prašo bendrinti ekraną, išjunkite šią parinktį arba naudokite X11. Pakeitus nutraukiami esami seansai."),
("wayland-drm-tip", "Neprižiūrimai prieigai Wayland aplinkoje išbandykite DRM ekrano fiksavimą arba naudokite X11, jei neveikia."),
("login-wayland-drm-tip", "Norėdami pasiekti Wayland prisijungimo ekraną, išbandykite DRM fiksavimą arba perjunkite jį į X11."),
("Keyboard mode", "Klaviatūros režimas"),
("Enable Unicode input", "Įgalinti Unicode įvestį"),
("unicode-input-tip", "Perimti Unicode tekstą, kurį siunčia tokie įrankiai kaip KeePassXC Auto-Type. Reikalingas įvesties šaltinis 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Tver ekrānu tieši no videokartes, izmantojot RustDesk pakalpojumu, bez Wayland ekrāna kopīgošanas pieprasījuma, arī pieteikšanās ekrānā. Var nedarboties visās ierīcēs; ja savienojumi joprojām pieprasa kopīgot ekrānu, izslēdziet šo vai izmantojiet X11. Mainot šo iestatījumu, pašreizējās sesijas tiek atvienotas."),
("wayland-drm-tip", "Neuzraudzītai piekļuvei Wayland vidē izmēģiniet DRM ekrāna tveršanu vai izmantojiet X11, ja tā nedarbojas."),
("login-wayland-drm-tip", "Lai piekļūtu Wayland pieteikšanās ekrānam, izmēģiniet DRM ekrāna tveršanu vai pārslēdziet to uz X11."),
("Keyboard mode", "Tastatūras režīms"),
("Enable Unicode input", "Iespējot Unicode ievadi"),
("unicode-input-tip", "Pārtvert Unicode tekstu, ko nosūta tādi rīki kā KeePassXC Auto-Type. Nepieciešams ievades avots 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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 Auto-Type പോലുള്ള ഉപകരണങ്ങൾ അയയ്ക്കുന്ന Unicode ടെക്സ്റ്റ് ക്യാപ്‌ചർ ചെയ്യുക. ഇൻപുട്ട് ഉറവിടം 1 ആവശ്യമാണ്."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Tar opp skjermen direkte fra grafikkortet via RustDesk-tjenesten, uten Waylands forespørsel om skjermdeling, også på påloggingsskjermen. Fungerer kanskje ikke på alle enheter; hvis tilkoblinger fortsatt ber om skjermdeling, slå dette av eller bruk X11. Endring kobler fra gjeldende økter."),
("wayland-drm-tip", "Prøv DRM-skjermopptak for uovervåket tilgang på Wayland, eller bruk X11 hvis det ikke virker."),
("login-wayland-drm-tip", "Prøv DRM-skjermopptak for å nå Waylands påloggingsskjerm, eller bytt den til X11."),
("Keyboard mode", "Tastaturmodus"),
("Enable Unicode input", "Aktiver Unicode-inndata"),
("unicode-input-tip", "Fang opp Unicode-tekst som sendes av verktøy som KeePassXC Auto-Type. Krever inndatakilde 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Neemt het scherm via de RustDesk-service rechtstreeks van de grafische kaart op, zonder de Wayland-vraag om het scherm te delen, ook op het aanmeldingsscherm. Werkt mogelijk niet op elk apparaat; als verbindingen nog steeds vragen om het scherm te delen, schakel dit dan uit of gebruik X11. Wijzigen verbreekt de huidige sessies."),
("wayland-drm-tip", "Probeer voor onbeheerde toegang onder Wayland DRM-schermopname, of gebruik X11 als dat niet werkt."),
("login-wayland-drm-tip", "Probeer voor het Wayland-aanmeldingsscherm DRM-schermopname of zet het om naar X11."),
("Keyboard mode", "Toetsenbordmodus"),
("Enable Unicode input", "Unicode-invoer inschakelen"),
("unicode-input-tip", "Unicode-tekst opvangen die wordt verzonden door hulpmiddelen zoals KeePassXC Auto-Type. Vereist invoerbron 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Przechwytuje ekran bezpośrednio z karty graficznej przez usługę RustDesk, bez pytania Wayland o udostępnienie ekranu, również na ekranie logowania. Może nie działać na każdym urządzeniu; jeśli połączenia nadal proszą o udostępnienie ekranu, wyłącz tę opcję lub użyj X11. Zmiana tej opcji rozłącza bieżące sesje."),
("wayland-drm-tip", "Dla dostępu nienadzorowanego w Wayland wypróbuj przechwytywanie przez DRM lub użyj X11, jeśli nie działa."),
("login-wayland-drm-tip", "Aby uzyskać dostęp do ekranu logowania Wayland, wypróbuj przechwytywanie przez DRM lub przełącz go na X11."),
("Keyboard mode", "Tryb klawiatury"),
("Enable Unicode input", "Włącz wprowadzanie Unicode"),
("unicode-input-tip", "Przechwytuj tekst Unicode wysyłany przez narzędzia takie jak KeePassXC Auto-Type. Wymaga źródła wejścia 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Captura a tela diretamente da placa de vídeo pelo serviço do RustDesk, sem o pedido de compartilhamento de tela do Wayland, inclusive na tela de login. Pode não funcionar em todos os dispositivos; se as conexões continuarem pedindo para compartilhar a tela, desative isto ou use o X11. Alterar isto desconecta as sessões atuais."),
("wayland-drm-tip", "Para acesso autônomo no Wayland, experimente a captura de tela DRM ou use o X11 se não funcionar."),
("login-wayland-drm-tip", "Para acessar a tela de login do Wayland, experimente a captura de tela DRM ou mude-a para o X11."),
("Keyboard mode", "Modo do teclado"),
("Enable Unicode input", "Habilitar entrada Unicode"),
("unicode-input-tip", "Captura texto Unicode enviado por ferramentas como o KeePassXC Auto-Type. Requer a fonte de entrada 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Captura o ecrã diretamente da placa gráfica através do serviço do RustDesk, sem o pedido de partilha de ecrã do Wayland, incluindo no ecrã de início de sessão. Pode não funcionar em todos os dispositivos; se as ligações continuarem a pedir a partilha do ecrã, desative isto ou utilize o X11. Alterar isto desliga as sessões atuais."),
("wayland-drm-tip", "Para acesso não assistido no Wayland, experimente a captura de ecrã DRM ou utilize o X11 se não funcionar."),
("login-wayland-drm-tip", "Para aceder ao ecrã de início de sessão do Wayland, experimente a captura DRM ou mude-o para X11."),
("Keyboard mode", "Modo do teclado"),
("Enable Unicode input", "Ativar entrada Unicode"),
("unicode-input-tip", "Captura texto Unicode enviado por ferramentas como o KeePassXC Auto-Type. Requer a fonte de entrada 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", "Capturează ecranul direct de pe placa grafică prin serviciul RustDesk, fără solicitarea Wayland de partajare a ecranului, inclusiv pe ecranul de conectare. Este posibil să nu funcționeze pe toate dispozitivele; dacă conexiunile cer în continuare partajarea ecranului, dezactivează această opțiune sau folosește X11. Modificarea ei deconectează sesiunile curente."),
("wayland-drm-tip", "Pentru acces nesupravegheat pe Wayland, încearcă captura de ecran DRM sau folosește X11 dacă nu funcționează."),
("login-wayland-drm-tip", "Pentru a accesa ecranul de conectare Wayland, încearcă captura DRM sau comută-l pe X11."),
("Keyboard mode", "Mod tastatură"),
("Enable Unicode input", "Activează introducerea Unicode"),
("unicode-input-tip", "Capturează textul Unicode trimis de instrumente precum KeePassXC Auto-Type. Necesită sursa de intrare 1."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("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."),
].iter().cloned().collect();
}
+3
View File
@@ -830,5 +830,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("drm-capture-tip", ""),
("wayland-drm-tip", ""),
("login-wayland-drm-tip", ""),
("Keyboard mode", "Modalidade de tecladu"),
("Enable Unicode input", "Abìlita s'intrada Unicode"),
("unicode-input-tip", "Catura su testu Unicode imbiadu dae ainas comente KeePassXC Auto-Type. Bisòngiat sa mitza de intrada 1."),
].iter().cloned().collect();
}
Loaded 100 of 131 files, more files were not shown because too many files have changed in this diff. Show more