mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-10 14:31:02 +03:00
Compare commits
30 Commits
temporary-
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91c9fccbb0 | ||
|
|
c4221469d8 | ||
|
|
978e2e28b9 | ||
|
|
5cfe136fb0 | ||
|
|
14a5ed45d9 | ||
|
|
435fe24a81 | ||
|
|
3ffee7c1ff | ||
|
|
97190f715b | ||
|
|
aa232a9dfa | ||
|
|
65edf214b9 | ||
|
|
bac8323e5d | ||
|
|
f164c9a9df | ||
|
|
080211ff36 | ||
|
|
01dbb76499 | ||
|
|
68359a2dd2 | ||
|
|
5228f91982 | ||
|
|
691830fe89 | ||
|
|
22b1ed169a | ||
|
|
0f0205d336 | ||
|
|
e5d473407e | ||
|
|
59fdda3835 | ||
|
|
b50fde6910 | ||
|
|
e8eead5715 | ||
|
|
92d787b885 | ||
|
|
692113c87e | ||
|
|
dc04b911a1 | ||
|
|
254d98129d | ||
|
|
942810d432 | ||
|
|
ae6af2de43 | ||
|
|
3fc11c0f81 |
42
.github/scripts/sign-macos-app.sh
vendored
Normal file
42
.github/scripts/sign-macos-app.sh
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
app_path=$1
|
||||
identity=$2
|
||||
entitlements=$3
|
||||
|
||||
sign_args=(--force --options runtime --sign "$identity")
|
||||
if [[ "$identity" != "-" ]]; then
|
||||
sign_args+=(--timestamp)
|
||||
fi
|
||||
|
||||
frameworks_path="$app_path/Contents/Frameworks"
|
||||
if [[ -d "$frameworks_path" ]]; then
|
||||
while IFS= read -r -d '' code; do
|
||||
if file -b "$code" | grep -q 'Mach-O'; then
|
||||
codesign "${sign_args[@]}" "$code"
|
||||
fi
|
||||
done < <(find "$frameworks_path" -type f -print0)
|
||||
|
||||
while IFS= read -r -d '' framework; do
|
||||
codesign "${sign_args[@]}" "$framework"
|
||||
done < <(find "$frameworks_path" -depth -type d -name '*.framework' -print0)
|
||||
fi
|
||||
|
||||
service_path="$app_path/Contents/MacOS/service"
|
||||
if [[ -f "$service_path" ]]; then
|
||||
codesign "${sign_args[@]}" "$service_path"
|
||||
fi
|
||||
|
||||
codesign "${sign_args[@]}" --generate-entitlement-der \
|
||||
--entitlements "$entitlements" "$app_path"
|
||||
codesign --verify --deep --strict --verbose=2 "$app_path"
|
||||
|
||||
actual_entitlements=$(codesign -d --entitlements :- "$app_path" 2>/dev/null)
|
||||
audio_input=$(plutil -extract 'com\.apple\.security\.device\.audio-input' raw - \
|
||||
<<<"$actual_entitlements")
|
||||
if [[ "$audio_input" != "true" ]]; then
|
||||
echo "Missing com.apple.security.device.audio-input entitlement" >&2
|
||||
exit 1
|
||||
fi
|
||||
16
.github/workflows/flutter-build.yml
vendored
16
.github/workflows/flutter-build.yml
vendored
@@ -926,7 +926,11 @@ jobs:
|
||||
security unlock-keychain -p ${{ secrets.MACOS_P12_PASSWORD }} rustdesk.keychain
|
||||
# start sign the rustdesk.app and dmg
|
||||
rm -rf *.dmg || true
|
||||
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict ./flutter/build/macos/Build/Products/Release/RustDesk.app -vvv
|
||||
# the identity secret carries its own shell quoting, so expand it inline like the dmg codesign below
|
||||
bash ./.github/scripts/sign-macos-app.sh \
|
||||
./flutter/build/macos/Build/Products/Release/RustDesk.app \
|
||||
${{ secrets.MACOS_CODESIGN_IDENTITY }} \
|
||||
./flutter/macos/Runner/Release.entitlements
|
||||
create-dmg --icon "RustDesk.app" 200 190 --hide-extension "RustDesk.app" --window-size 800 400 --app-drop-link 600 185 rustdesk-${{ env.VERSION }}.dmg ./flutter/build/macos/Build/Products/Release/RustDesk.app
|
||||
codesign --force --options runtime -s ${{ secrets.MACOS_CODESIGN_IDENTITY }} --deep --strict rustdesk-${{ env.VERSION }}.dmg -vvv
|
||||
# notarize the rustdesk-${{ env.VERSION }}.dmg
|
||||
@@ -2300,6 +2304,16 @@ jobs:
|
||||
# build rustdesk
|
||||
python3 ./res/inline-sciter.py
|
||||
export CARGO_INCREMENTAL=0
|
||||
# armv7 is the only 32-bit target in this job that links the whole binary, and the
|
||||
# release profile uses fat LTO with codegen-units=1. LLVM then merges every module
|
||||
# into a single unit and runs past the ~3GB address space a 32-bit process gets,
|
||||
# aborting rustc with "Rust cannot catch foreign exceptions" (a C++ bad_alloc from
|
||||
# LLVM unwinding into rustc's Rust frames). Thin LTO keeps peak memory bounded and
|
||||
# still allows cross-crate inlining; 64-bit targets keep fat LTO untouched.
|
||||
if [ "${{ matrix.job.arch }}" = "armv7" ]; then
|
||||
export CARGO_PROFILE_RELEASE_LTO=thin
|
||||
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16
|
||||
fi
|
||||
cargo build --locked --features inline${{ matrix.job.extra_features }} --release --bins --jobs 1
|
||||
# make debian package
|
||||
mkdir -p ./Release
|
||||
|
||||
43
AGENTS.md
43
AGENTS.md
@@ -8,18 +8,24 @@
|
||||
* `src/platform/` platform-specific code
|
||||
* `src/ui/` legacy Sciter UI (deprecated)
|
||||
* `flutter/` current UI
|
||||
* `libs/hbb_common/` config / proto / shared utils
|
||||
* `libs/hbb_common/` shared with the server: rendezvous proto, sockets, `Config` core
|
||||
* `libs/base/` (crate `base`) client-only: option keys, message proto, file transfer, platform code
|
||||
* `libs/scrap/` screen capture
|
||||
* `libs/enigo/` input control
|
||||
* `libs/clipboard/` clipboard
|
||||
* `libs/hbb_common/src/config.rs` all options
|
||||
* `libs/base/src/config/keys.rs` the single import path for all options
|
||||
|
||||
### Key Components
|
||||
- **Remote Desktop Protocol**: Custom protocol implemented in `src/rendezvous_mediator.rs` for communicating with rustdesk-server
|
||||
- **Screen Capture**: Platform-specific screen capture in `libs/scrap/`
|
||||
- **Input Handling**: Cross-platform input simulation in `libs/enigo/`
|
||||
- **Audio/Video Services**: Real-time audio/video streaming in `src/server/`
|
||||
- **File Transfer**: Secure file transfer implementation in `libs/hbb_common/`
|
||||
- **File Transfer**: Secure file transfer implementation in `libs/base/src/fs.rs`
|
||||
|
||||
`hbb_common` is a git submodule shared with the server, so changing it costs a
|
||||
round-trip. Put client-only code in `libs/base` instead; it is a normal
|
||||
workspace member. `base::config::keys` re-exports the handful of keys
|
||||
`hbb_common` still reads, so callers get the whole set from that one path.
|
||||
|
||||
### UI Architecture
|
||||
- **Legacy UI**: Sciter-based (deprecated) - files in `src/ui/`
|
||||
@@ -61,6 +67,34 @@
|
||||
* Do not make formatting-only changes.
|
||||
* Keep naming/style consistent with nearby code.
|
||||
|
||||
### Imports
|
||||
|
||||
* One `use` per crate. Everything a file takes from the same crate goes in a
|
||||
single braced block, not one statement per item:
|
||||
|
||||
```rust
|
||||
// no
|
||||
use base::fs;
|
||||
use base::message_proto::*;
|
||||
|
||||
// yes
|
||||
use base::{fs, message_proto::*};
|
||||
```
|
||||
|
||||
* The only reason to split is a `#[cfg(...)]` that does not apply to the whole
|
||||
block -- an attribute binds to one item, so a differently-gated import has to
|
||||
stand on its own. A `pub use` re-export likewise cannot join a plain `use`.
|
||||
|
||||
```rust
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
use base::fs;
|
||||
use base::message_proto::*;
|
||||
```
|
||||
|
||||
* When splitting an existing `use` because some of its items moved to another
|
||||
crate, fold each side into that crate's existing block rather than leaving a
|
||||
second statement behind.
|
||||
|
||||
### Comments
|
||||
|
||||
* Avoid comments unless they explain a non-obvious reason, constraint, or workaround.
|
||||
@@ -107,6 +141,7 @@ Each file is a `HashMap<key, translation>`. Layout:
|
||||
* `template.rs` is the master list of every key. **Never edit it** as part of translation work.
|
||||
* `en.rs` holds only the keys whose English display text differs from the key itself.
|
||||
* Every other file (`de.rs`, `fr.rs`, …) carries the full key set; an untranslated entry has an empty value: `("key", "")`.
|
||||
* `it.rs` is maintained by hand by its translator. Never fill or change its entries; when adding new keys, append them to it with `""` and leave the translation to the maintainer.
|
||||
|
||||
### Finding the English source for a key
|
||||
|
||||
@@ -128,4 +163,4 @@ Then translate that source into the file's target language (infer the language f
|
||||
|
||||
* New English-text keys use sentence case, not Title Case: `Use ID whitelisting`, **not** `Use ID Whitelisting`. Acronyms (ID, IP, 2FA…) stay uppercase. Legacy Title-Case keys (e.g. `Use IP Whitelisting`) stay as-is — do not rename them.
|
||||
* Since the key itself is the English display text, a sentence-case key usually needs **no** `en.rs` entry; add one only when the display text must differ from the key (e.g. `*_tip` keys).
|
||||
* Append each new key to `template.rs` (with `""`) and to every `src/lang/*.rs` file (translated, or `""` if unsure), at the end of the list.
|
||||
* Append each new key to `template.rs` (with `""`) and to every `src/lang/*.rs` file (translated, or `""` if unsure; always `""` for `it.rs`), at the end of the list.
|
||||
|
||||
350
Cargo.lock
generated
350
Cargo.lock
generated
@@ -648,6 +648,30 @@ dependencies = [
|
||||
"rustc-demangle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"backtrace",
|
||||
"bytes",
|
||||
"filetime",
|
||||
"hbb_common",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"osascript",
|
||||
"protobuf",
|
||||
"protobuf-codegen",
|
||||
"serde 1.0.228",
|
||||
"serde_derive",
|
||||
"serde_json 1.0.118",
|
||||
"smithay-client-toolkit 0.20.0",
|
||||
"tokio",
|
||||
"users",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "base16ct"
|
||||
version = "0.2.0"
|
||||
@@ -753,24 +777,6 @@ dependencies = [
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.71.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3"
|
||||
dependencies = [
|
||||
"bitflags 2.9.1",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"itertools 0.12.1",
|
||||
"proc-macro2 1.0.93",
|
||||
"quote 1.0.36",
|
||||
"regex",
|
||||
"rustc-hash 2.1.1",
|
||||
"shlex",
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.72.1"
|
||||
@@ -979,9 +985,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||
|
||||
[[package]]
|
||||
name = "bytes"
|
||||
version = "1.10.1"
|
||||
version = "1.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
||||
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
||||
dependencies = [
|
||||
"serde 1.0.228",
|
||||
]
|
||||
@@ -1161,30 +1167,6 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
|
||||
|
||||
[[package]]
|
||||
name = "chacha20"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"cipher",
|
||||
"cpufeatures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chacha20poly1305"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
|
||||
dependencies = [
|
||||
"aead",
|
||||
"chacha20",
|
||||
"cipher",
|
||||
"poly1305",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.41"
|
||||
@@ -1234,7 +1216,6 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
|
||||
dependencies = [
|
||||
"crypto-common",
|
||||
"inout",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1294,6 +1275,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
||||
name = "clipboard"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"base",
|
||||
"cacao",
|
||||
"cc",
|
||||
"dashmap 5.5.3",
|
||||
@@ -1735,7 +1717,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "cpal"
|
||||
version = "0.15.3"
|
||||
source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#6b374bcaed076750ca8fce6da518ab39b882e14a"
|
||||
source = "git+https://github.com/rustdesk-org/cpal?branch=osx-screencapturekit#69ad2578adc9200093fc81cdfbdad63dbc4274f9"
|
||||
dependencies = [
|
||||
"alsa",
|
||||
"cidre",
|
||||
@@ -1809,9 +1791,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.9.18"
|
||||
version = "0.9.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
||||
checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
|
||||
dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
@@ -2324,7 +2306,7 @@ version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412"
|
||||
dependencies = [
|
||||
"libloading 0.8.4",
|
||||
"libloading 0.7.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2442,42 +2424,6 @@ dependencies = [
|
||||
"linux-raw-sys 0.6.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtls"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f531dd7c181beaf3cebab3716afa4d0d41ab888be85232583f56bbaf07ca208a"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"aes-gcm",
|
||||
"async-trait",
|
||||
"bincode",
|
||||
"byteorder",
|
||||
"cbc",
|
||||
"ccm",
|
||||
"chacha20poly1305",
|
||||
"der-parser",
|
||||
"hmac",
|
||||
"log",
|
||||
"p256",
|
||||
"p384",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand_core 0.6.4",
|
||||
"rcgen",
|
||||
"ring",
|
||||
"rustls",
|
||||
"sec1",
|
||||
"serde 1.0.228",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"thiserror 1.0.61",
|
||||
"tokio",
|
||||
"webrtc-util",
|
||||
"x25519-dalek",
|
||||
"x509-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.8"
|
||||
@@ -2556,6 +2502,7 @@ dependencies = [
|
||||
name = "enigo"
|
||||
version = "0.0.14"
|
||||
dependencies = [
|
||||
"base",
|
||||
"core-graphics 0.22.3",
|
||||
"hbb_common",
|
||||
"libxdo-sys",
|
||||
@@ -2863,7 +2810,7 @@ dependencies = [
|
||||
"is-terminal",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"nu-ansi-term 0.49.0",
|
||||
"nu-ansi-term",
|
||||
"regex",
|
||||
"thiserror 1.0.61",
|
||||
]
|
||||
@@ -3743,7 +3690,6 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
"backtrace",
|
||||
"base64 0.22.1",
|
||||
"bytes",
|
||||
"chrono",
|
||||
@@ -3754,7 +3700,6 @@ dependencies = [
|
||||
"dirs-next",
|
||||
"dlopen",
|
||||
"env_logger 0.11.6",
|
||||
"filetime",
|
||||
"flexi_logger",
|
||||
"futures",
|
||||
"futures-util",
|
||||
@@ -3765,7 +3710,7 @@ dependencies = [
|
||||
"log",
|
||||
"mac_address",
|
||||
"machine-uid",
|
||||
"osascript",
|
||||
"percent-encoding",
|
||||
"protobuf",
|
||||
"protobuf-codegen",
|
||||
"rand 0.8.5",
|
||||
@@ -3777,7 +3722,6 @@ dependencies = [
|
||||
"serde_derive",
|
||||
"serde_json 1.0.118",
|
||||
"sha2",
|
||||
"smithay-client-toolkit 0.20.0",
|
||||
"socket2 0.3.19",
|
||||
"sodiumoxide",
|
||||
"sysinfo",
|
||||
@@ -3796,7 +3740,6 @@ dependencies = [
|
||||
"webpki-roots 1.0.9",
|
||||
"webrtc",
|
||||
"whoami",
|
||||
"winapi 0.3.9",
|
||||
"x11 2.21.0",
|
||||
"zstd",
|
||||
]
|
||||
@@ -4177,16 +4120,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "interceptor"
|
||||
version = "0.15.0"
|
||||
version = "0.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea51375727680dc15f06e8ad90fa31df75d79dd030100e8ad60eef1c27fe2c98"
|
||||
checksum = "1ac0781c825d602095113772e389ef0607afcb869ae0e68a590d8e0799cdcef8"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes",
|
||||
"futures",
|
||||
"log",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"rtcp",
|
||||
"rtp",
|
||||
"thiserror 1.0.61",
|
||||
@@ -4338,11 +4280,11 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "kcp-sys"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/rustdesk-org/kcp-sys#32a6c09fc6223f54aea83981a6aa8995931d29be"
|
||||
source = "git+https://github.com/rustdesk-org/kcp-sys?branch=rustdesk-patches#938eda3e5e9757a612385503af7a6cb1189b2cdd"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"auto_impl",
|
||||
"bindgen 0.71.1",
|
||||
"bindgen 0.72.1",
|
||||
"bitflags 2.9.1",
|
||||
"bytes",
|
||||
"cc",
|
||||
@@ -4353,8 +4295,6 @@ dependencies = [
|
||||
"thiserror 2.0.17",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"zerocopy 0.7.34",
|
||||
]
|
||||
|
||||
@@ -4488,7 +4428,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"windows-targets 0.52.6",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5210,16 +5150,6 @@ dependencies = [
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.46.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
|
||||
dependencies = [
|
||||
"overload",
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.49.0"
|
||||
@@ -5883,12 +5813,6 @@ dependencies = [
|
||||
"serde_json 1.0.118",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "overload"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||
|
||||
[[package]]
|
||||
name = "owned_ttf_parser"
|
||||
version = "0.25.1"
|
||||
@@ -6277,17 +6201,6 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "poly1305"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
|
||||
dependencies = [
|
||||
"cpufeatures",
|
||||
"opaque-debug",
|
||||
"universal-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polyval"
|
||||
version = "0.6.2"
|
||||
@@ -6583,9 +6496,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quinn-proto"
|
||||
version = "0.11.13"
|
||||
version = "0.11.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31"
|
||||
checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"getrandom 0.3.2",
|
||||
@@ -7094,9 +7007,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rtcp"
|
||||
version = "0.14.0"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81d30d1c4091644431c22acf9f8be6191b56805e0e977f15ca7104b4a6d6eaec"
|
||||
checksum = "e9689528bf3a9eb311fd938d05516dd546412f9ce4fffc8acfc1db27cc3dbf72"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"thiserror 1.0.61",
|
||||
@@ -7105,14 +7018,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rtp"
|
||||
version = "0.14.0"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f126f38ea84c02480e32e547c1459a939052f74fb92117ac3eef23fdac6b023"
|
||||
checksum = "c54733451a67d76caf9caa07a7a2cec6871ea9dda92a7847f98063d459200f4b"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"memchr",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"serde 1.0.228",
|
||||
"thiserror 1.0.61",
|
||||
"webrtc-util",
|
||||
@@ -7184,6 +7097,7 @@ dependencies = [
|
||||
"arboard",
|
||||
"async-process",
|
||||
"async-trait",
|
||||
"base",
|
||||
"bytemuck",
|
||||
"bytes",
|
||||
"cc",
|
||||
@@ -7225,6 +7139,7 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"libpulse-binding",
|
||||
"libpulse-simple-binding",
|
||||
"libsamplerate-sys",
|
||||
"libxdo-sys",
|
||||
"mac_address",
|
||||
"magnum-opus",
|
||||
@@ -7267,6 +7182,7 @@ dependencies = [
|
||||
"terminfo",
|
||||
"termios 0.3.3",
|
||||
"tiny-skia",
|
||||
"tokio",
|
||||
"totp-rs",
|
||||
"tray-icon",
|
||||
"ttf-parser",
|
||||
@@ -7503,6 +7419,7 @@ name = "scrap"
|
||||
version = "0.5.0"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"base",
|
||||
"bindgen 0.72.1",
|
||||
"block",
|
||||
"cfg-if 1.0.0",
|
||||
@@ -7547,11 +7464,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sdp"
|
||||
version = "0.10.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32c374dceda16965d541c8800ce9cc4e1c14acfd661ddf7952feeedc3411e5c6"
|
||||
checksum = "4cd277015eada44a0bb810a4b84d3bf6e810573fa62fb442f457edf6a1087a69"
|
||||
dependencies = [
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"substring",
|
||||
"thiserror 1.0.61",
|
||||
"url",
|
||||
@@ -7781,15 +7698,6 @@ dependencies = [
|
||||
"tzdb 0.5.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sharded-slab"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shared_library"
|
||||
version = "0.1.9"
|
||||
@@ -8129,15 +8037,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "stun"
|
||||
version = "0.9.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a512c5d501e3e3b5a4bb3e8e31462d56d54a66b95a28b8596e14422bf21c32b"
|
||||
checksum = "7dbc2bab375524093c143dc362a03fb6a1fb79e938391cdb21665688f88a088a"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"crc",
|
||||
"lazy_static",
|
||||
"md-5",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"ring",
|
||||
"subtle",
|
||||
"thiserror 1.0.61",
|
||||
@@ -8519,16 +8427,6 @@ dependencies = [
|
||||
"syn 2.0.98",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "threadpool"
|
||||
version = "1.8.1"
|
||||
@@ -8908,32 +8806,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"valuable",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
|
||||
dependencies = [
|
||||
"nu-ansi-term 0.46.0",
|
||||
"sharded-slab",
|
||||
"smallvec",
|
||||
"thread_local",
|
||||
"tracing-core",
|
||||
"tracing-log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -9048,9 +8920,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "turn"
|
||||
version = "0.11.0"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ed995882f66ab94238de77c62e5e778389698ab700afa4696f4754da8f457cb"
|
||||
checksum = "3f5aea1116456e1da71c45586b87c72e3b43164fbf435eb93ff6aa475416a9a4"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64 0.22.1",
|
||||
@@ -9058,7 +8930,7 @@ dependencies = [
|
||||
"log",
|
||||
"md-5",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"ring",
|
||||
"stun",
|
||||
"thiserror 1.0.61",
|
||||
@@ -9184,12 +9056,6 @@ dependencies = [
|
||||
"unic-common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicase"
|
||||
version = "2.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-bidi"
|
||||
version = "0.3.15"
|
||||
@@ -9335,12 +9201,6 @@ dependencies = [
|
||||
"bindgen 0.65.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.15"
|
||||
@@ -9724,25 +9584,26 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webrtc"
|
||||
version = "0.14.0"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08fd686c0920ac08f3a57eacc48e31f0e4ca1ffefba4478784606f78c14e83ad"
|
||||
checksum = "24bab7195998d605c862772f90a452ba655b90a2f463c850ac032038890e367a"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"async-trait",
|
||||
"bytes",
|
||||
"dtls",
|
||||
"cfg-if 1.0.0",
|
||||
"hex",
|
||||
"interceptor",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"rcgen",
|
||||
"regex",
|
||||
"ring",
|
||||
"rtcp",
|
||||
"rtp",
|
||||
"rustls",
|
||||
"sdp",
|
||||
"serde 1.0.228",
|
||||
"serde_json 1.0.118",
|
||||
@@ -9750,12 +9611,13 @@ dependencies = [
|
||||
"smol_str",
|
||||
"stun",
|
||||
"thiserror 1.0.61",
|
||||
"time 0.3.36",
|
||||
"tokio",
|
||||
"turn",
|
||||
"unicase",
|
||||
"url",
|
||||
"waitgroup",
|
||||
"webrtc-data",
|
||||
"webrtc-dtls",
|
||||
"webrtc-ice",
|
||||
"webrtc-mdns",
|
||||
"webrtc-media",
|
||||
@@ -9766,9 +9628,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-data"
|
||||
version = "0.12.0"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "062a5438d63bb0756a221693d76cc0dd6119affee1dfdfe57abe3a2a8c8b3eea"
|
||||
checksum = "4e97b932854da633a767eff0cc805425a2222fc6481e96f463e57b015d949d1d"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"log",
|
||||
@@ -9780,17 +9642,54 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-ice"
|
||||
version = "0.14.0"
|
||||
name = "webrtc-dtls"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69cb13fd1a373e68addc4bba0c8ca058627518e54342583d024bdcbb8ae5d97d"
|
||||
checksum = "5ccbe4d9049390ab52695c3646c1395c877e16c15fb05d3bda8eee0c7351711c"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"aes-gcm",
|
||||
"async-trait",
|
||||
"bincode",
|
||||
"byteorder",
|
||||
"cbc",
|
||||
"ccm",
|
||||
"der-parser",
|
||||
"hkdf",
|
||||
"hmac",
|
||||
"log",
|
||||
"p256",
|
||||
"p384",
|
||||
"portable-atomic",
|
||||
"rand 0.8.5",
|
||||
"rand_core 0.6.4",
|
||||
"rcgen",
|
||||
"ring",
|
||||
"rustls",
|
||||
"sec1",
|
||||
"serde 1.0.228",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"subtle",
|
||||
"thiserror 1.0.61",
|
||||
"tokio",
|
||||
"webrtc-util",
|
||||
"x25519-dalek",
|
||||
"x509-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-ice"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb51bde0d790f109a15bfe4d04f1b56fb51d567da231643cb3f21bb74d678997"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"async-trait",
|
||||
"crc",
|
||||
"log",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"serde 1.0.228",
|
||||
"serde_json 1.0.118",
|
||||
"stun",
|
||||
@@ -9806,9 +9705,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-mdns"
|
||||
version = "0.10.0"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a17279a067e75df72ce923fdeb7f04cd808f6f5aa4910dc6bcb4fbe66b396ace"
|
||||
checksum = "979cc85259c53b7b620803509d10d35e2546fa505d228850cbe3f08765ea6ea8"
|
||||
dependencies = [
|
||||
"log",
|
||||
"socket2 0.5.10",
|
||||
@@ -9819,22 +9718,21 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-media"
|
||||
version = "0.11.0"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94a84c910fec0848fd5a0d8a5651e0ddbdedaf25a7d3ae3f0b15f71ac73a1773"
|
||||
checksum = "80041211deccda758a3e19aa93d6b10bc1d37c9183b519054b40a83691d13810"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"bytes",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"rtp",
|
||||
"thiserror 1.0.61",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-sctp"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f985465467d8910c1f8ac4382cd64f83b1f6a1a75021a82b221546f6fb3b856f"
|
||||
version = "0.12.0"
|
||||
source = "git+https://github.com/rustdesk-org/webrtc?rev=db3b07a9dd8f195916c89c2e62a8911402b11d27#db3b07a9dd8f195916c89c2e62a8911402b11d27"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"async-trait",
|
||||
@@ -9842,7 +9740,7 @@ dependencies = [
|
||||
"crc",
|
||||
"log",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"thiserror 1.0.61",
|
||||
"tokio",
|
||||
"webrtc-util",
|
||||
@@ -9850,9 +9748,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-srtp"
|
||||
version = "0.16.0"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66d8cdc33413f1d0192670a80ce93d17cb78d57fe3a2414be30d6f6dff121123"
|
||||
checksum = "01e773f79b09b057ffbda6b03fe7b43403b012a240cf8d05d630674c3723b5bb"
|
||||
dependencies = [
|
||||
"aead",
|
||||
"aes",
|
||||
@@ -9873,19 +9771,19 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "webrtc-util"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1c0c7e0c8f280f2bbfae442701465777ac07adaf46ce0c5863cd58e13fe472a"
|
||||
version = "0.11.0"
|
||||
source = "git+https://github.com/rustdesk-org/webrtc?rev=db3b07a9dd8f195916c89c2e62a8911402b11d27#db3b07a9dd8f195916c89c2e62a8911402b11d27"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bitflags 1.3.2",
|
||||
"bytes",
|
||||
"ipnet",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"log",
|
||||
"nix 0.26.4",
|
||||
"portable-atomic",
|
||||
"rand 0.9.2",
|
||||
"rand 0.8.5",
|
||||
"thiserror 1.0.61",
|
||||
"tokio",
|
||||
"winapi 0.3.9",
|
||||
|
||||
27
Cargo.toml
27
Cargo.toml
@@ -22,7 +22,7 @@ path = "src/service.rs"
|
||||
|
||||
[features]
|
||||
inline = []
|
||||
use_samplerate = ["samplerate"]
|
||||
use_samplerate = ["samplerate", "libsamplerate-sys"]
|
||||
use_rubato = ["rubato"]
|
||||
use_dasp = ["dasp"]
|
||||
flutter = ["flutter_rust_bridge"]
|
||||
@@ -52,7 +52,8 @@ screencapturekit = ["cpal/screencapturekit"]
|
||||
[dependencies]
|
||||
async-trait = "0.1"
|
||||
scrap = { path = "libs/scrap", features = ["wayland"] }
|
||||
hbb_common = { path = "libs/hbb_common" }
|
||||
hbb_common = { path = "libs/hbb_common", features = ["webrtc"] }
|
||||
base = { path = "libs/base" }
|
||||
serde_derive = "1.0"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
@@ -66,6 +67,7 @@ magnum-opus = { git = "https://github.com/rustdesk-org/magnum-opus" }
|
||||
dasp = { version = "0.11", features = ["signal", "interpolate-linear", "interpolate"], optional = true }
|
||||
rubato = { version = "0.12", optional = true }
|
||||
samplerate = { version = "0.2", optional = true }
|
||||
libsamplerate-sys = { version = "0.1.12", optional = true }
|
||||
uuid = { version = "1.3", features = ["v4"] }
|
||||
num_cpus = "1.15"
|
||||
bytes = { version = "1.4", features = ["serde"] }
|
||||
@@ -83,7 +85,7 @@ fon = "0.6"
|
||||
shutdown_hooks = "0.1"
|
||||
totp-rs = { version = "5.4", default-features = false, features = ["gen_secret", "otpauth"] }
|
||||
stunclient = "0.4"
|
||||
kcp-sys= { git = "https://github.com/rustdesk-org/kcp-sys"}
|
||||
kcp-sys= { git = "https://github.com/rustdesk-org/kcp-sys", branch = "rustdesk-patches" }
|
||||
reqwest = { version = "0.12", features = ["blocking", "socks", "json", "native-tls", "rustls-tls", "rustls-tls-native-roots", "gzip", "zstd"], default-features=false }
|
||||
|
||||
[target.'cfg(not(target_os = "linux"))'.dependencies]
|
||||
@@ -208,13 +210,29 @@ jni = "0.21"
|
||||
android-wakelock = { git = "https://github.com/rustdesk-org/android-wakelock" }
|
||||
|
||||
[workspace]
|
||||
members = ["libs/scrap", "libs/hbb_common", "libs/enigo", "libs/clipboard", "libs/virtual_display", "libs/virtual_display/dylib", "libs/portable", "libs/remote_printer"]
|
||||
members = ["libs/scrap", "libs/hbb_common", "libs/base", "libs/enigo", "libs/clipboard", "libs/virtual_display", "libs/virtual_display/dylib", "libs/portable", "libs/remote_printer"]
|
||||
exclude = ["vdi/host"]
|
||||
|
||||
# Patch libxdo-sys to use a stub implementation that doesn't require libxdo
|
||||
# This allows building and running on systems without libxdo installed (e.g., Wayland-only)
|
||||
[patch.crates-io]
|
||||
libxdo-sys = { path = "libs/libxdo-sys-stub" }
|
||||
# One branch off upstream v0.13.0, the tag whose crate versions match this stack.
|
||||
# webrtc-util: reads the Windows adapter list's IPv6 addresses as host-order u16 groups, so every
|
||||
# one comes out byte-swapped, fails to bind, and ICE gathers no IPv6 host candidate on Windows.
|
||||
# webrtc-sctp: RFC 4960's 1s RTO floor makes a single loss cost 1-3s on a link whose RTT is 24-64ms,
|
||||
# and fast retransmit cannot cover a request/response exchange; INITIAL_MTU 1228 also fragments on
|
||||
# IPv6; and its AIMD pins a lossy long-haul link to MSS/(RTT*sqrt(p)), so a switch sends without
|
||||
# a congestion window, as KCP does - on by default, `allow-webrtc-congestion-control` opts back in.
|
||||
# Sending that way, a reordering window keeps a chunk that is merely late from being resent on a
|
||||
# path that jitters, every DATA chunk asks for its SACK at once so a lost tail is back within an
|
||||
# RTT at KCP's RTO floors, and bundles of small chunks stay within the MTU. A T3-rtx resends
|
||||
# everything outstanding when it packs into four packets and otherwise probes with one and lets
|
||||
# the SACK settle the rest (F-RTO), timed from the latest send, so a stall no longer resends the
|
||||
# whole backlog behind itself while a short lost tail still comes back at once.
|
||||
# Pinned by rev, not branch: a fork branch can be rewritten out from under the lockfile.
|
||||
webrtc-util = { git = "https://github.com/rustdesk-org/webrtc", rev = "db3b07a9dd8f195916c89c2e62a8911402b11d27" }
|
||||
webrtc-sctp = { git = "https://github.com/rustdesk-org/webrtc", rev = "db3b07a9dd8f195916c89c2e62a8911402b11d27" }
|
||||
|
||||
[package.metadata.winres]
|
||||
LegalCopyright = "Copyright © 2026 Purslane Tech Pte. Ltd. All rights reserved."
|
||||
@@ -234,6 +252,7 @@ os-version = "0.2"
|
||||
[dev-dependencies]
|
||||
hound = "3.5"
|
||||
docopt = "1.1"
|
||||
tokio = { version = "1.44", features = ["test-util"] }
|
||||
|
||||
[package.metadata.bundle]
|
||||
name = "RustDesk"
|
||||
|
||||
@@ -158,7 +158,8 @@ Please ensure that you run these commands from the root of the RustDesk reposito
|
||||
|
||||
## File Structure
|
||||
|
||||
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, protobuf, fs functions for file transfer, and some other utility functions
|
||||
- **[libs/hbb_common](https://github.com/rustdesk/rustdesk/tree/master/libs/hbb_common)**: video codec, config, tcp/udp wrapper, and some other utility functions shared with the server
|
||||
- **[libs/base](https://github.com/rustdesk/rustdesk/tree/master/libs/base)**: protobuf, fs functions for file transfer, keyboard and platform code used only by this app
|
||||
- **[libs/scrap](https://github.com/rustdesk/rustdesk/tree/master/libs/scrap)**: screen capture
|
||||
- **[libs/enigo](https://github.com/rustdesk/rustdesk/tree/master/libs/enigo)**: platform specific keyboard/mouse control
|
||||
- **[libs/clipboard](https://github.com/rustdesk/rustdesk/tree/master/libs/clipboard)**: file copy and paste implementation for Windows, Linux, macOS.
|
||||
|
||||
12
build.rs
12
build.rs
@@ -43,6 +43,15 @@ fn build_manifest() {
|
||||
}
|
||||
}
|
||||
|
||||
// bionic only exports getifaddrs()/freeifaddrs() from API 24, while the jniLibs
|
||||
// are built against the API 21 sysroot (flutter/ndk_*.sh). webrtc-util calls
|
||||
// them, so without this the android link fails on undefined symbols.
|
||||
fn build_android_ifaddrs() {
|
||||
let file = "src/platform/android_ifaddrs.c";
|
||||
cc::Build::new().file(file).compile("android_ifaddrs");
|
||||
println!("cargo:rerun-if-changed={}", file);
|
||||
}
|
||||
|
||||
fn install_android_deps() {
|
||||
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
if target_os != "android" {
|
||||
@@ -89,5 +98,8 @@ fn main() {
|
||||
build_mac();
|
||||
println!("cargo:rustc-link-lib=framework=ApplicationServices");
|
||||
}
|
||||
if target_os == "android" {
|
||||
build_android_ifaddrs();
|
||||
}
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
}
|
||||
|
||||
11
fastlane/metadata/android/es-ES/full_description.txt
Normal file
11
fastlane/metadata/android/es-ES/full_description.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Aplicación de escritorio remoto de código abierto, la alternativa open source a TeamViewer.
|
||||
Código fuente: https://github.com/rustdesk/rustdesk
|
||||
Documentación: https://rustdesk.com/docs/en/manual/mobile/
|
||||
|
||||
Para que un dispositivo remoto controle tu Android mediante el ratón o el tacto, debes permitir que RustDesk utilice el servicio de "Accesibilidad". RustDesk utiliza la API AccessibilityService para implementar el control remoto en Android.
|
||||
|
||||
Además del control remoto, también puedes transferir archivos fácilmente entre dispositivos Android y ordenadores mediante RustDesk.
|
||||
|
||||
Tienes control total de tus datos, sin preocupaciones de seguridad. Puedes utilizar nuestro servidor rendezvous/relay, optar por el autoalojamiento o escribir tu propio servidor rendezvous/relay. El servidor autoalojado es gratuito y de código abierto: https://github.com/rustdesk/rustdesk-server
|
||||
|
||||
Descarga e instala la versión de escritorio desde: https://rustdesk.com — entonces podrás acceder y controlar tu ordenador desde tu teléfono, o controlar tu teléfono desde tu ordenador.
|
||||
1
fastlane/metadata/android/es-ES/short_description.txt
Normal file
1
fastlane/metadata/android/es-ES/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Aplicación de acceso remoto de código abierto, alternativa a TeamViewer.
|
||||
11
fastlane/metadata/android/pt-BR/full_description.txt
Normal file
11
fastlane/metadata/android/pt-BR/full_description.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Aplicativo de desktop remoto de código aberto, a alternativa open source ao TeamViewer.
|
||||
Código-fonte: https://github.com/rustdesk/rustdesk
|
||||
Documentação: https://rustdesk.com/docs/pt/client/android/
|
||||
|
||||
Para que um dispositivo remoto controle seu Android via mouse ou toque, você precisa permitir que o RustDesk utilize o serviço de "Acessibilidade". O RustDesk usa a API AccessibilityService para implementar o controle remoto no Android.
|
||||
|
||||
Além do controle remoto, você também pode transferir arquivos entre dispositivos Android e PCs com facilidade usando o RustDesk.
|
||||
|
||||
Você tem controle total dos seus dados, sem preocupações com a segurança. Você pode usar nosso servidor rendezvous/relay, optar pela auto-hospedagem ou criar seu próprio servidor de rendezvous/relay. O servidor auto-hospedado é gratuito e open source: https://github.com/rustdesk/rustdesk-server
|
||||
|
||||
Baixe e instale a versão para desktop em: https://rustdesk.com — então você poderá acessar e controlar seu computador pelo celular ou controlar seu celular pelo computador.
|
||||
1
fastlane/metadata/android/pt-BR/short_description.txt
Normal file
1
fastlane/metadata/android/pt-BR/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Aplicativo de acesso remoto open source, alternativa ao TeamViewer.
|
||||
@@ -87,7 +87,7 @@ android {
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
|
||||
main.proto.srcDirs += '../../../libs/hbb_common/protos'
|
||||
main.proto.srcDirs += '../../../libs/base/protos'
|
||||
main.proto.includes += "message.proto"
|
||||
}
|
||||
|
||||
|
||||
@@ -1633,7 +1633,8 @@ String bool2option(String option, bool b) {
|
||||
String res;
|
||||
if (option.startsWith('enable-') &&
|
||||
option != kOptionEnableUdpPunch &&
|
||||
option != kOptionEnableIpv6Punch) {
|
||||
option != kOptionEnableIpv6Punch &&
|
||||
option != kOptionEnableWebrtc) {
|
||||
res = b ? defaultOptionYes : 'N';
|
||||
} else if (option.startsWith('allow-') ||
|
||||
option == kOptionStopService ||
|
||||
|
||||
@@ -606,6 +606,9 @@ class QualityMonitor extends StatelessWidget {
|
||||
_row(
|
||||
"Codec", qualityMonitorModel.data.codecFormat ?? '-'),
|
||||
_row("Chroma", qualityMonitorModel.data.chroma ?? '-'),
|
||||
if (qualityMonitorModel.webrtcTransport != null)
|
||||
_row("Transport",
|
||||
qualityMonitorModel.webrtcTransport!),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -164,6 +164,7 @@ const String kOptionPeerTabVisible = "peer-tab-visible";
|
||||
const String kOptionPeerCardUiType = "peer-card-ui-type";
|
||||
const String kOptionCurrentAbName = "current-ab-name";
|
||||
const String kOptionEnableConfirmClosingTabs = "enable-confirm-closing-tabs";
|
||||
const String kOptionEnablePortForwardMux = "enable-port-forward-mux";
|
||||
const String kOptionAllowAlwaysSoftwareRender = "allow-always-software-render";
|
||||
const String kOptionEnableCheckUpdate = "enable-check-update";
|
||||
const String kOptionAllowAutoUpdate = "allow-auto-update";
|
||||
@@ -171,10 +172,12 @@ const String kOptionAllowRemoveWallpaper = "allow-remove-wallpaper";
|
||||
const String kOptionStopService = "stop-service";
|
||||
const String kOptionDirectxCapture = "enable-directx-capture";
|
||||
const String kOptionAllowRemoteCmModification = "allow-remote-cm-modification";
|
||||
const String kOptionEnableTcpPunch = "enable-tcp-punch";
|
||||
const String kOptionEnableUdpPunch = "enable-udp-punch";
|
||||
const String kOptionEnableIpv6Punch = "enable-ipv6-punch";
|
||||
const String kOptionAllowSyncClipboardBetweenSessions =
|
||||
"allow-sync-clipboard-between-sessions";
|
||||
const String kOptionEnableWebrtc = "enable-webrtc";
|
||||
const String kOptionEnableTrustedDevices = "enable-trusted-devices";
|
||||
const String kOptionShowVirtualMouse = "show-virtual-mouse";
|
||||
const String kOptionVirtualMouseScale = "virtual-mouse-scale";
|
||||
|
||||
@@ -509,6 +509,15 @@ class _GeneralState extends State<_General> {
|
||||
kOptionOpenNewConnInTabs,
|
||||
isServer: false,
|
||||
),
|
||||
Tooltip(
|
||||
message: translate('port-forward-mux-tip'),
|
||||
child: _OptionCheckBox(
|
||||
context,
|
||||
'Reuse one connection for port forwarding',
|
||||
kOptionEnablePortForwardMux,
|
||||
isServer: false,
|
||||
),
|
||||
),
|
||||
// though this is related to GUI, but opengl problem affects all users, so put in config rather than local
|
||||
if (isLinux)
|
||||
Tooltip(
|
||||
@@ -563,6 +572,12 @@ class _GeneralState extends State<_General> {
|
||||
kOptionDirectxCapture,
|
||||
),
|
||||
if (!isWeb && !incomingOnly) ...[
|
||||
_OptionCheckBox(
|
||||
context,
|
||||
'Enable TCP hole punching',
|
||||
kOptionEnableTcpPunch,
|
||||
isServer: false,
|
||||
),
|
||||
_OptionCheckBox(
|
||||
context,
|
||||
'Enable UDP hole punching',
|
||||
@@ -575,6 +590,15 @@ class _GeneralState extends State<_General> {
|
||||
kOptionEnableIpv6Punch,
|
||||
isServer: false,
|
||||
),
|
||||
],
|
||||
if (!incomingOnly)
|
||||
_OptionCheckBox(
|
||||
context,
|
||||
'Enable WebRTC P2P connection',
|
||||
kOptionEnableWebrtc,
|
||||
isServer: false,
|
||||
),
|
||||
if (!isWeb && !incomingOnly)
|
||||
Tooltip(
|
||||
message: translate('sync-clipboard-between-sessions-tip'),
|
||||
child: _OptionCheckBox(
|
||||
@@ -584,7 +608,6 @@ class _GeneralState extends State<_General> {
|
||||
isServer: false,
|
||||
),
|
||||
),
|
||||
],
|
||||
];
|
||||
|
||||
// Add client-side wakelock option for desktop platforms
|
||||
|
||||
@@ -97,10 +97,12 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
var _hideNetwork = false;
|
||||
var _hideWebSocket = false;
|
||||
var _enableTrustedDevices = false;
|
||||
var _enableTcpPunch = false;
|
||||
var _enableUdpPunch = false;
|
||||
var _allowInsecureTlsFallback = false;
|
||||
var _disableUdp = false;
|
||||
var _enableIpv6Punch = false;
|
||||
var _enableWebrtc = false;
|
||||
var _isUsingPublicServer = false;
|
||||
var _allowAskForNoteAtEndOfConnection = false;
|
||||
var _preventSleepWhileConnected = true;
|
||||
@@ -141,8 +143,10 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
bind.mainGetBuildinOption(key: kOptionHideWebSocketSetting) == 'Y' ||
|
||||
isWeb;
|
||||
_enableTrustedDevices = mainGetBoolOptionSync(kOptionEnableTrustedDevices);
|
||||
_enableTcpPunch = mainGetLocalBoolOptionSync(kOptionEnableTcpPunch);
|
||||
_enableUdpPunch = mainGetLocalBoolOptionSync(kOptionEnableUdpPunch);
|
||||
_enableIpv6Punch = mainGetLocalBoolOptionSync(kOptionEnableIpv6Punch);
|
||||
_enableWebrtc = mainGetLocalBoolOptionSync(kOptionEnableWebrtc);
|
||||
_allowAskForNoteAtEndOfConnection =
|
||||
mainGetLocalBoolOptionSync(kOptionAllowAskForNoteAtEndOfConnection);
|
||||
_preventSleepWhileConnected =
|
||||
@@ -815,31 +819,65 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
});
|
||||
},
|
||||
),
|
||||
if (!incomingOnly)
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('Enable TCP hole punching')),
|
||||
initialValue: _enableTcpPunch,
|
||||
onToggle: isOptionFixed(kOptionEnableTcpPunch)
|
||||
? null
|
||||
: (v) async {
|
||||
await mainSetLocalBoolOption(kOptionEnableTcpPunch, v);
|
||||
final newValue =
|
||||
mainGetLocalBoolOptionSync(kOptionEnableTcpPunch);
|
||||
setState(() {
|
||||
_enableTcpPunch = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
if (!incomingOnly)
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('Enable UDP hole punching')),
|
||||
initialValue: _enableUdpPunch,
|
||||
onToggle: (v) async {
|
||||
await mainSetLocalBoolOption(kOptionEnableUdpPunch, v);
|
||||
final newValue =
|
||||
mainGetLocalBoolOptionSync(kOptionEnableUdpPunch);
|
||||
setState(() {
|
||||
_enableUdpPunch = newValue;
|
||||
});
|
||||
},
|
||||
onToggle: isOptionFixed(kOptionEnableUdpPunch)
|
||||
? null
|
||||
: (v) async {
|
||||
await mainSetLocalBoolOption(kOptionEnableUdpPunch, v);
|
||||
final newValue =
|
||||
mainGetLocalBoolOptionSync(kOptionEnableUdpPunch);
|
||||
setState(() {
|
||||
_enableUdpPunch = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
if (!incomingOnly)
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('Enable IPv6 P2P connection')),
|
||||
initialValue: _enableIpv6Punch,
|
||||
onToggle: (v) async {
|
||||
await mainSetLocalBoolOption(kOptionEnableIpv6Punch, v);
|
||||
final newValue =
|
||||
mainGetLocalBoolOptionSync(kOptionEnableIpv6Punch);
|
||||
setState(() {
|
||||
_enableIpv6Punch = newValue;
|
||||
});
|
||||
},
|
||||
onToggle: isOptionFixed(kOptionEnableIpv6Punch)
|
||||
? null
|
||||
: (v) async {
|
||||
await mainSetLocalBoolOption(kOptionEnableIpv6Punch, v);
|
||||
final newValue =
|
||||
mainGetLocalBoolOptionSync(kOptionEnableIpv6Punch);
|
||||
setState(() {
|
||||
_enableIpv6Punch = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
if (!incomingOnly)
|
||||
SettingsTile.switchTile(
|
||||
title: Text(translate('Enable WebRTC P2P connection')),
|
||||
initialValue: _enableWebrtc,
|
||||
onToggle: isOptionFixed(kOptionEnableWebrtc)
|
||||
? null
|
||||
: (v) async {
|
||||
await mainSetLocalBoolOption(kOptionEnableWebrtc, v);
|
||||
final newValue =
|
||||
mainGetLocalBoolOptionSync(kOptionEnableWebrtc);
|
||||
setState(() {
|
||||
_enableWebrtc = newValue;
|
||||
});
|
||||
},
|
||||
),
|
||||
SettingsTile(
|
||||
title: Text(translate('Language')),
|
||||
|
||||
@@ -896,9 +896,13 @@ class FfiModel with ChangeNotifier {
|
||||
final text = evt['text'];
|
||||
final link = evt['link'];
|
||||
|
||||
// The peer-gone detector reconnects under `restarting-show` rather than an error title, so
|
||||
// it needs naming here too. By its own title, not the type: an explicitly restarted remote
|
||||
// device reaches the same type from a path this change does not touch.
|
||||
if (isAndroid &&
|
||||
_androidDocumentPickerActive &&
|
||||
title == 'Connection Error') {
|
||||
(title == 'Connection Error' ||
|
||||
(type == 'restarting-show' && title == 'Connecting...'))) {
|
||||
_androidDocumentPickerInterruptedConnection = true;
|
||||
return;
|
||||
}
|
||||
@@ -3597,6 +3601,16 @@ class QualityMonitorModel with ChangeNotifier {
|
||||
bool get show => _show;
|
||||
QualityMonitorData get data => _data;
|
||||
|
||||
// Only a WebRTC session names its transport here: web has no session tab
|
||||
// to show it on, and WebRTC is the one path that can be direct or TURN.
|
||||
String? get webrtcTransport {
|
||||
final ffiModel = parent.target?.ffiModel;
|
||||
if (ffiModel == null) return null;
|
||||
final streamType = ffiModel.cachedPeerData.streamType;
|
||||
if (!streamType.startsWith('WebRTC')) return null;
|
||||
return ffiModel.direct == false ? '$streamType (TURN)' : streamType;
|
||||
}
|
||||
|
||||
checkShowQualityMonitor(SessionID sessionId) async {
|
||||
final show = await bind.sessionGetToggleOption(
|
||||
sessionId: sessionId, arg: 'show-quality-monitor') ==
|
||||
|
||||
@@ -306,7 +306,7 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: HEAD
|
||||
ref: bd6b5b41254e57c5bcece202ebfb234de63e6487
|
||||
resolved-ref: bd6b5b41254e57c5bcece202ebfb234de63e6487
|
||||
url: "https://github.com/rustdesk-org/Dash-Chat-2"
|
||||
source: git
|
||||
@@ -339,8 +339,8 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: HEAD
|
||||
resolved-ref: 8b774a66671cbb9bcb2631af6ac28f9bdd469ce3
|
||||
ref: "8b774a66671cbb9bcb2631af6ac28f9bdd469ce3"
|
||||
resolved-ref: "8b774a66671cbb9bcb2631af6ac28f9bdd469ce3"
|
||||
url: "https://github.com/rustdesk-org/rustdesk_desktop_multi_window"
|
||||
source: git
|
||||
version: "0.1.0"
|
||||
@@ -1581,7 +1581,7 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: HEAD
|
||||
ref: cf4aef0512092fad9344a27ffe1c47ad83269dfc
|
||||
resolved-ref: cf4aef0512092fad9344a27ffe1c47ad83269dfc
|
||||
url: "https://github.com/rustdesk-org/window_manager"
|
||||
source: git
|
||||
|
||||
@@ -40,6 +40,7 @@ dependencies:
|
||||
dash_chat_2:
|
||||
git:
|
||||
url: https://github.com/rustdesk-org/Dash-Chat-2
|
||||
ref: bd6b5b41254e57c5bcece202ebfb234de63e6487
|
||||
draggable_float_widget: ^0.1.0
|
||||
settings_ui: ^2.0.2
|
||||
flutter_breadcrumb: ^1.0.1
|
||||
@@ -53,9 +54,11 @@ dependencies:
|
||||
window_manager:
|
||||
git:
|
||||
url: https://github.com/rustdesk-org/window_manager
|
||||
ref: cf4aef0512092fad9344a27ffe1c47ad83269dfc
|
||||
desktop_multi_window:
|
||||
git:
|
||||
url: https://github.com/rustdesk-org/rustdesk_desktop_multi_window
|
||||
ref: 8b774a66671cbb9bcb2631af6ac28f9bdd469ce3
|
||||
freezed_annotation: ^2.0.3
|
||||
flutter_custom_cursor:
|
||||
git:
|
||||
|
||||
57
libs/base/Cargo.toml
Normal file
57
libs/base/Cargo.toml
Normal file
@@ -0,0 +1,57 @@
|
||||
[package]
|
||||
name = "base"
|
||||
version = "0.1.0"
|
||||
authors = ["rustdesk <info@rustdesk.com>"]
|
||||
edition = "2018"
|
||||
|
||||
# Code that only RustDesk itself uses. `hbb_common` stays the crate shared with
|
||||
# the server, so anything the server never touches belongs here instead.
|
||||
|
||||
[features]
|
||||
default = []
|
||||
# The isolated Wayland socket-probe fallback (src/platform/linux/wayland_probe.rs).
|
||||
# Off by default so the base Wayland enumeration is untouched; the DRM login-screen
|
||||
# build (scrap/drm) turns it on.
|
||||
wayland_probe = []
|
||||
|
||||
[dependencies]
|
||||
hbb_common = { path = "../hbb_common" }
|
||||
protobuf = { version = "3.7", features = ["with-bytes"] }
|
||||
# the generated protobuf code refers to `::bytes::Bytes` (tokio_bytes codegen)
|
||||
bytes = { version = "1.10", features = ["serde"] }
|
||||
tokio = { version = "1.44", features = ["full"] }
|
||||
serde_derive = "1.0"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
filetime = "0.2"
|
||||
libc = "0.2"
|
||||
backtrace = "0.3"
|
||||
log = "0.4"
|
||||
lazy_static = "1.5"
|
||||
anyhow = "1.0"
|
||||
|
||||
[build-dependencies]
|
||||
protobuf-codegen = { version = "3.7" }
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
# Every module the moved sources name, spelled out rather than left to feature
|
||||
# unification with the root crate.
|
||||
winapi = { version = "0.3", features = [
|
||||
"fileapi",
|
||||
"handleapi",
|
||||
"minwindef",
|
||||
"pdh",
|
||||
"synchapi",
|
||||
"sysinfoapi",
|
||||
"winbase",
|
||||
"winnt",
|
||||
] }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
osascript = "0.3"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
sctk = { package = "smithay-client-toolkit", version = "0.20.0", default-features = false, features = [
|
||||
"calloop",
|
||||
] }
|
||||
users = { version = "0.11" }
|
||||
14
libs/base/build.rs
Normal file
14
libs/base/build.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
fn main() {
|
||||
let out_dir = format!("{}/protos", std::env::var("OUT_DIR").unwrap());
|
||||
|
||||
std::fs::create_dir_all(&out_dir).unwrap();
|
||||
|
||||
protobuf_codegen::Codegen::new()
|
||||
.pure()
|
||||
.out_dir(out_dir)
|
||||
.inputs(["protos/message.proto"])
|
||||
.include("protos")
|
||||
.customize(protobuf_codegen::Customize::default().tokio_bytes(true))
|
||||
.run()
|
||||
.expect("Codegen failed.");
|
||||
}
|
||||
20
libs/base/examples/system_message.rs
Normal file
20
libs/base/examples/system_message.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
extern crate base;
|
||||
#[cfg(target_os = "linux")]
|
||||
use base::platform::linux;
|
||||
#[cfg(target_os = "macos")]
|
||||
use base::platform::macos;
|
||||
|
||||
fn main() {
|
||||
#[cfg(target_os = "linux")]
|
||||
let res = linux::system_message("test title", "test message", true);
|
||||
#[cfg(target_os = "macos")]
|
||||
let res = macos::alert(
|
||||
"System Preferences".to_owned(),
|
||||
"warning".to_owned(),
|
||||
"test title".to_owned(),
|
||||
"test message".to_owned(),
|
||||
["Ok".to_owned()].to_vec(),
|
||||
);
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
println!("result {:?}", &res);
|
||||
}
|
||||
1023
libs/base/protos/message.proto
Normal file
1023
libs/base/protos/message.proto
Normal file
File diff suppressed because it is too large
Load Diff
403
libs/base/src/config/keys.rs
Normal file
403
libs/base/src/config/keys.rs
Normal file
@@ -0,0 +1,403 @@
|
||||
//! Option keys shared across the app.
|
||||
//!
|
||||
//! The handful that `hbb_common` itself reads stay defined there and are
|
||||
//! re-exported here, so callers always use this one path.
|
||||
|
||||
pub use hbb_common::config::keys::*;
|
||||
|
||||
pub const OPTION_VIEW_ONLY: &str = "view_only";
|
||||
pub const OPTION_SHOW_MONITORS_TOOLBAR: &str = "show_monitors_toolbar";
|
||||
pub const OPTION_SHOW_REMOTE_CURSOR: &str = "show_remote_cursor";
|
||||
pub const OPTION_FOLLOW_REMOTE_CURSOR: &str = "follow_remote_cursor";
|
||||
pub const OPTION_FOLLOW_REMOTE_WINDOW: &str = "follow_remote_window";
|
||||
pub const OPTION_SHOW_QUALITY_MONITOR: &str = "show_quality_monitor";
|
||||
pub const OPTION_DISABLE_AUDIO: &str = "disable_audio";
|
||||
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_TOUCH_MODE: &str = "touch-mode";
|
||||
pub const OPTION_SYNC_INIT_CLIPBOARD: &str = "sync-init-clipboard";
|
||||
pub const OPTION_THEME: &str = "theme";
|
||||
pub const OPTION_REMOTE_MENUBAR_DRAG_LEFT: &str = "remote-menubar-drag-left";
|
||||
pub const OPTION_REMOTE_MENUBAR_DRAG_RIGHT: &str = "remote-menubar-drag-right";
|
||||
pub const OPTION_HIDE_AB_TAGS_PANEL: &str = "hideAbTagsPanel";
|
||||
pub const OPTION_ENABLE_CONFIRM_CLOSING_TABS: &str = "enable-confirm-closing-tabs";
|
||||
pub const OPTION_ENABLE_OPEN_NEW_CONNECTIONS_IN_TABS: &str = "enable-open-new-connections-in-tabs";
|
||||
pub const OPTION_TEXTURE_RENDER: &str = "use-texture-render";
|
||||
// Internal health record written by the texture-render watchdog/probe;
|
||||
// "failed-*" flips the texture-render default to opt-in on this machine.
|
||||
pub const OPTION_TEXTURE_RENDER_HEALTH: &str = "texture-render-health";
|
||||
pub const OPTION_ALLOW_D3D_RENDER: &str = "allow-d3d-render";
|
||||
pub const OPTION_ENABLE_CHECK_UPDATE: &str = "enable-check-update";
|
||||
pub const OPTION_ALLOW_AUTO_UPDATE: &str = "allow-auto-update";
|
||||
pub const OPTION_SYNC_AB_WITH_RECENT_SESSIONS: &str = "sync-ab-with-recent-sessions";
|
||||
pub const OPTION_SYNC_AB_TAGS: &str = "sync-ab-tags";
|
||||
pub const OPTION_FILTER_AB_BY_INTERSECTION: &str = "filter-ab-by-intersection";
|
||||
pub const OPTION_ACCESS_MODE: &str = "access-mode";
|
||||
pub const OPTION_ENABLE_KEYBOARD: &str = "enable-keyboard";
|
||||
pub const OPTION_ENABLE_CLIPBOARD: &str = "enable-clipboard";
|
||||
pub const OPTION_ENABLE_FILE_TRANSFER: &str = "enable-file-transfer";
|
||||
pub const OPTION_ENABLE_CAMERA: &str = "enable-camera";
|
||||
pub const OPTION_ENABLE_TERMINAL: &str = "enable-terminal";
|
||||
pub const OPTION_TERMINAL_PERSISTENT: &str = "terminal-persistent";
|
||||
pub const OPTION_ENABLE_AUDIO: &str = "enable-audio";
|
||||
pub const OPTION_ENABLE_TUNNEL: &str = "enable-tunnel";
|
||||
pub const OPTION_ENABLE_REMOTE_RESTART: &str = "enable-remote-restart";
|
||||
pub const OPTION_ENABLE_RECORD_SESSION: &str = "enable-record-session";
|
||||
pub const OPTION_ENABLE_BLOCK_INPUT: &str = "enable-block-input";
|
||||
pub const OPTION_ENABLE_PRIVACY_MODE: &str = "enable-privacy-mode";
|
||||
pub const OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW: &str = "enable-perm-change-in-accept-window";
|
||||
pub const OPTION_ALLOW_SCOPE_VIOLATION_CLOSE: &str = "allow-scope-violation-close";
|
||||
pub const OPTION_ALLOW_SCOPE_VIOLATION_ALARM: &str = "allow-scope-violation-alarm";
|
||||
pub const OPTION_ALLOW_REMOTE_CONFIG_MODIFICATION: &str = "allow-remote-config-modification";
|
||||
pub const OPTION_ENABLE_LAN_DISCOVERY: &str = "enable-lan-discovery";
|
||||
pub const OPTION_DIRECT_ACCESS_PORT: &str = "direct-access-port";
|
||||
pub const OPTION_WHITELIST: &str = "whitelist";
|
||||
pub const OPTION_ID_WHITELIST: &str = "id-whitelist";
|
||||
pub const OPTION_ALLOW_AUTO_DISCONNECT: &str = "allow-auto-disconnect";
|
||||
pub const OPTION_AUTO_DISCONNECT_TIMEOUT: &str = "auto-disconnect-timeout";
|
||||
pub const OPTION_ALLOW_ONLY_CONN_WINDOW_OPEN: &str = "allow-only-conn-window-open";
|
||||
pub const OPTION_ALLOW_AUTO_RECORD_INCOMING: &str = "allow-auto-record-incoming";
|
||||
pub const OPTION_ALLOW_AUTO_RECORD_OUTGOING: &str = "allow-auto-record-outgoing";
|
||||
pub const OPTION_HIDE_RECORDING_BUTTON: &str = "hide-recording-button";
|
||||
pub const OPTION_WINDOWS_SERVICE_VIDEO_SAVE_DIRECTORY: &str =
|
||||
"windows-service-video-save-directory";
|
||||
pub const OPTION_VIDEO_SAVE_DIRECTORY: &str = "video-save-directory";
|
||||
pub const OPTION_ENABLE_ABR: &str = "enable-abr";
|
||||
pub const OPTION_ALLOW_REMOVE_WALLPAPER: &str = "allow-remove-wallpaper";
|
||||
pub const OPTION_ALLOW_ALWAYS_SOFTWARE_RENDER: &str = "allow-always-software-render";
|
||||
pub const OPTION_ENABLE_HWCODEC: &str = "enable-hwcodec";
|
||||
pub const OPTION_APPROVE_MODE: &str = "approve-mode";
|
||||
pub const OPTION_VERIFICATION_METHOD: &str = "verification-method";
|
||||
pub const OPTION_TEMPORARY_PASSWORD_LENGTH: &str = "temporary-password-length";
|
||||
pub const OPTION_CUSTOM_RENDEZVOUS_SERVER: &str = "custom-rendezvous-server";
|
||||
pub const OPTION_API_SERVER: &str = "api-server";
|
||||
pub const OPTION_KEY: &str = "key";
|
||||
pub const OPTION_PRESET_ADDRESS_BOOK_NAME: &str = "preset-address-book-name";
|
||||
pub const OPTION_PRESET_ADDRESS_BOOK_TAG: &str = "preset-address-book-tag";
|
||||
pub const OPTION_PRESET_ADDRESS_BOOK_ALIAS: &str = "preset-address-book-alias";
|
||||
pub const OPTION_PRESET_ADDRESS_BOOK_PASSWORD: &str = "preset-address-book-password";
|
||||
pub const OPTION_PRESET_ADDRESS_BOOK_NOTE: &str = "preset-address-book-note";
|
||||
pub const OPTION_PRESET_DEVICE_USERNAME: &str = "preset-device-username";
|
||||
pub const OPTION_PRESET_DEVICE_NAME: &str = "preset-device-name";
|
||||
pub const OPTION_PRESET_NOTE: &str = "preset-note";
|
||||
pub const OPTION_ENABLE_DIRECTX_CAPTURE: &str = "enable-directx-capture";
|
||||
pub const OPTION_ENABLE_ANDROID_SOFTWARE_ENCODING_HALF_SCALE: &str =
|
||||
"enable-android-software-encoding-half-scale";
|
||||
pub const OPTION_ENABLE_TRUSTED_DEVICES: &str = "enable-trusted-devices";
|
||||
pub const OPTION_AV1_TEST: &str = "av1-test";
|
||||
/// Maximum number of files allowed during a single file transfer request.
|
||||
///
|
||||
/// Key: `file-transfer-max-files`.
|
||||
/// Unit: number of files (not bytes).
|
||||
///
|
||||
/// Behaviour:
|
||||
/// - If set to a positive integer N, at most N files are allowed.
|
||||
/// - If set to 0, a safe built-in default is used (see DEFAULT_MAX_VALIDATED_FILES).
|
||||
/// - If unset, negative, or non-integer, no explicit limit is enforced for backward compatibility.
|
||||
pub const OPTION_FILE_TRANSFER_MAX_FILES: &str = "file-transfer-max-files";
|
||||
pub const OPTION_DISABLE_UDP: &str = "disable-udp";
|
||||
pub const OPTION_SHOW_VIRTUAL_MOUSE: &str = "show-virtual-mouse";
|
||||
// joystick is the virtual mouse.
|
||||
// So `OPTION_SHOW_VIRTUAL_MOUSE` should also be set if `OPTION_SHOW_VIRTUAL_JOYSTICK` is set.
|
||||
pub const OPTION_SHOW_VIRTUAL_JOYSTICK: &str = "show-virtual-joystick";
|
||||
pub const OPTION_ENABLE_FLUTTER_HTTP_ON_RUST: &str = "enable-flutter-http-on-rust";
|
||||
pub const OPTION_ALLOW_ASK_FOR_NOTE: &str = "allow-ask-for-note";
|
||||
|
||||
// built-in options
|
||||
pub const OPTION_DISPLAY_NAME: &str = "display-name";
|
||||
pub const OPTION_AVATAR: &str = "avatar";
|
||||
pub const OPTION_PRESET_DEVICE_GROUP_NAME: &str = "preset-device-group-name";
|
||||
pub const OPTION_PRESET_USERNAME: &str = "preset-user-name";
|
||||
pub const OPTION_PRESET_STRATEGY_NAME: &str = "preset-strategy-name";
|
||||
pub const OPTION_REMOVE_PRESET_PASSWORD_WARNING: &str = "remove-preset-password-warning";
|
||||
pub const OPTION_HIDE_GENERAL_SETTINGS: &str = "hide-general-settings";
|
||||
pub const OPTION_HIDE_SECURITY_SETTINGS: &str = "hide-security-settings";
|
||||
pub const OPTION_HIDE_NETWORK_SETTINGS: &str = "hide-network-settings";
|
||||
pub const OPTION_HIDE_SERVER_SETTINGS: &str = "hide-server-settings";
|
||||
pub const OPTION_HIDE_PROXY_SETTINGS: &str = "hide-proxy-settings";
|
||||
pub const OPTION_HIDE_REMOTE_PRINTER_SETTINGS: &str = "hide-remote-printer-settings";
|
||||
pub const OPTION_HIDE_WEBSOCKET_SETTINGS: &str = "hide-websocket-settings";
|
||||
pub const OPTION_HIDE_STOP_SERVICE: &str = "hide-stop-service";
|
||||
pub const OPTION_ALLOW_COMMAND_LINE_SETTINGS_WHEN_SETTINGS_DISABLED: &str =
|
||||
"allow-command-line-settings-when-settings-disabled";
|
||||
|
||||
// Connection punch-through / port-forward options
|
||||
pub const OPTION_ENABLE_TCP_PUNCH: &str = "enable-tcp-punch";
|
||||
pub const OPTION_ENABLE_UDP_PUNCH: &str = "enable-udp-punch";
|
||||
pub const OPTION_ENABLE_IPV6_PUNCH: &str = "enable-ipv6-punch";
|
||||
pub const OPTION_ENABLE_PORT_FORWARD_MUX: &str = "enable-port-forward-mux";
|
||||
pub const OPTION_ENABLE_WEBRTC: &str = "enable-webrtc";
|
||||
pub const OPTION_ALLOW_KCP_CC: &str = "allow-kcp-congestion-control";
|
||||
pub const OPTION_HIDE_USERNAME_ON_CARD: &str = "hide-username-on-card";
|
||||
pub const OPTION_HIDE_HELP_CARDS: &str = "hide-help-cards";
|
||||
pub const OPTION_DEFAULT_CONNECT_PASSWORD: &str = "default-connect-password";
|
||||
pub const OPTION_HIDE_TRAY: &str = "hide-tray";
|
||||
pub const OPTION_ONE_WAY_CLIPBOARD_REDIRECTION: &str = "one-way-clipboard-redirection";
|
||||
pub const OPTION_ALLOW_LOGON_SCREEN_PASSWORD: &str = "allow-logon-screen-password";
|
||||
pub const OPTION_ALLOW_DEEP_LINK_PASSWORD: &str = "allow-deep-link-password";
|
||||
pub const OPTION_ALLOW_DEEP_LINK_SERVER_SETTINGS: &str = "allow-deep-link-server-settings";
|
||||
pub const OPTION_ONE_WAY_FILE_TRANSFER: &str = "one-way-file-transfer";
|
||||
pub const OPTION_ALLOW_HTTPS_21114: &str = "allow-https-21114";
|
||||
pub const OPTION_USE_RAW_TCP_FOR_API: &str = "use-raw-tcp-for-api";
|
||||
pub const OPTION_HIDE_POWERED_BY_ME: &str = "hide-powered-by-me";
|
||||
pub const OPTION_MAIN_WINDOW_ALWAYS_ON_TOP: &str = "main-window-always-on-top";
|
||||
|
||||
// flutter local options
|
||||
pub const OPTION_FLUTTER_REMOTE_MENUBAR_STATE: &str = "remoteMenubarState";
|
||||
pub const OPTION_FLUTTER_PEER_SORTING: &str = "peer-sorting";
|
||||
pub const OPTION_FLUTTER_PEER_TAB_INDEX: &str = "peer-tab-index";
|
||||
pub const OPTION_FLUTTER_PEER_TAB_ORDER: &str = "peer-tab-order";
|
||||
pub const OPTION_FLUTTER_PEER_TAB_VISIBLE: &str = "peer-tab-visible";
|
||||
pub const OPTION_FLUTTER_PEER_CARD_UI_TYLE: &str = "peer-card-ui-type";
|
||||
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_PRINTER_INCOMING_JOB_ACTION: &str = "printer-incomming-job-action";
|
||||
pub const OPTION_PRINTER_ALLOW_AUTO_PRINT: &str = "allow-printer-auto-print";
|
||||
pub const OPTION_PRINTER_SELECTED_NAME: &str = "printer-selected-name";
|
||||
|
||||
// android floating window options
|
||||
pub const OPTION_DISABLE_FLOATING_WINDOW: &str = "disable-floating-window";
|
||||
pub const OPTION_FLOATING_WINDOW_SIZE: &str = "floating-window-size";
|
||||
pub const OPTION_FLOATING_WINDOW_UNTOUCHABLE: &str = "floating-window-untouchable";
|
||||
pub const OPTION_FLOATING_WINDOW_TRANSPARENCY: &str = "floating-window-transparency";
|
||||
pub const OPTION_FLOATING_WINDOW_SVG: &str = "floating-window-svg";
|
||||
|
||||
// android keep screen on
|
||||
pub const OPTION_KEEP_SCREEN_ON: &str = "keep-screen-on";
|
||||
|
||||
// Server-side: keep host system awake during incoming sessions (Security setting)
|
||||
pub const OPTION_KEEP_AWAKE_DURING_INCOMING_SESSIONS: &str = "keep-awake-during-incoming-sessions";
|
||||
|
||||
// Client-side: keep client system awake during outgoing sessions (General setting)
|
||||
pub const OPTION_KEEP_AWAKE_DURING_OUTGOING_SESSIONS: &str = "keep-awake-during-outgoing-sessions";
|
||||
|
||||
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";
|
||||
|
||||
// DEFAULT_DISPLAY_SETTINGS, OVERWRITE_DISPLAY_SETTINGS
|
||||
pub const KEYS_DISPLAY_SETTINGS: &[&str] = &[
|
||||
OPTION_VIEW_ONLY,
|
||||
OPTION_SHOW_MONITORS_TOOLBAR,
|
||||
OPTION_COLLAPSE_TOOLBAR,
|
||||
OPTION_SHOW_REMOTE_CURSOR,
|
||||
OPTION_FOLLOW_REMOTE_CURSOR,
|
||||
OPTION_FOLLOW_REMOTE_WINDOW,
|
||||
OPTION_ZOOM_CURSOR,
|
||||
OPTION_SHOW_QUALITY_MONITOR,
|
||||
OPTION_DISABLE_AUDIO,
|
||||
OPTION_ENABLE_FILE_COPY_PASTE,
|
||||
OPTION_DISABLE_CLIPBOARD,
|
||||
OPTION_LOCK_AFTER_SESSION_END,
|
||||
OPTION_PRIVACY_MODE,
|
||||
OPTION_TOUCH_MODE,
|
||||
OPTION_I444,
|
||||
OPTION_REVERSE_MOUSE_WHEEL,
|
||||
OPTION_SWAP_LEFT_RIGHT_MOUSE,
|
||||
OPTION_DISPLAYS_AS_INDIVIDUAL_WINDOWS,
|
||||
OPTION_USE_ALL_MY_DISPLAYS_FOR_THE_REMOTE_SESSION,
|
||||
OPTION_VIEW_STYLE,
|
||||
OPTION_TERMINAL_PERSISTENT,
|
||||
OPTION_SCROLL_STYLE,
|
||||
OPTION_EDGE_SCROLL_EDGE_THICKNESS,
|
||||
OPTION_IMAGE_QUALITY,
|
||||
OPTION_CUSTOM_IMAGE_QUALITY,
|
||||
OPTION_CUSTOM_FPS,
|
||||
OPTION_CODEC_PREFERENCE,
|
||||
OPTION_SYNC_INIT_CLIPBOARD,
|
||||
OPTION_TRACKPAD_SPEED,
|
||||
];
|
||||
// DEFAULT_LOCAL_SETTINGS, OVERWRITE_LOCAL_SETTINGS
|
||||
pub const KEYS_LOCAL_SETTINGS: &[&str] = &[
|
||||
OPTION_THEME,
|
||||
OPTION_LANGUAGE,
|
||||
OPTION_ENABLE_CONFIRM_CLOSING_TABS,
|
||||
OPTION_ENABLE_OPEN_NEW_CONNECTIONS_IN_TABS,
|
||||
OPTION_TEXTURE_RENDER,
|
||||
OPTION_ALLOW_D3D_RENDER,
|
||||
OPTION_SYNC_AB_WITH_RECENT_SESSIONS,
|
||||
OPTION_SYNC_AB_TAGS,
|
||||
OPTION_FILTER_AB_BY_INTERSECTION,
|
||||
OPTION_REMOTE_MENUBAR_DRAG_LEFT,
|
||||
OPTION_REMOTE_MENUBAR_DRAG_RIGHT,
|
||||
OPTION_HIDE_AB_TAGS_PANEL,
|
||||
OPTION_FLUTTER_REMOTE_MENUBAR_STATE,
|
||||
OPTION_FLUTTER_PEER_SORTING,
|
||||
OPTION_FLUTTER_PEER_TAB_INDEX,
|
||||
OPTION_FLUTTER_PEER_TAB_ORDER,
|
||||
OPTION_FLUTTER_PEER_TAB_VISIBLE,
|
||||
OPTION_FLUTTER_PEER_CARD_UI_TYLE,
|
||||
OPTION_FLUTTER_CURRENT_AB_NAME,
|
||||
OPTION_DISABLE_FLOATING_WINDOW,
|
||||
OPTION_FLOATING_WINDOW_SIZE,
|
||||
OPTION_FLOATING_WINDOW_UNTOUCHABLE,
|
||||
OPTION_FLOATING_WINDOW_TRANSPARENCY,
|
||||
OPTION_FLOATING_WINDOW_SVG,
|
||||
OPTION_KEEP_SCREEN_ON,
|
||||
// Client-side: keep client system awake during outgoing sessions (General setting)
|
||||
OPTION_KEEP_AWAKE_DURING_OUTGOING_SESSIONS,
|
||||
OPTION_DISABLE_GROUP_PANEL,
|
||||
OPTION_DISABLE_DISCOVERY_PANEL,
|
||||
OPTION_PRE_ELEVATE_SERVICE,
|
||||
OPTION_ALLOW_REMOTE_CM_MODIFICATION,
|
||||
OPTION_ALLOW_SYNC_CLIPBOARD_BETWEEN_SESSIONS,
|
||||
OPTION_ENABLE_CHECK_UPDATE,
|
||||
OPTION_PRINTER_INCOMING_JOB_ACTION,
|
||||
OPTION_PRINTER_ALLOW_AUTO_PRINT,
|
||||
OPTION_PRINTER_SELECTED_NAME,
|
||||
OPTION_ALLOW_AUTO_RECORD_OUTGOING,
|
||||
OPTION_HIDE_RECORDING_BUTTON,
|
||||
OPTION_VIDEO_SAVE_DIRECTORY,
|
||||
OPTION_ENABLE_TCP_PUNCH,
|
||||
OPTION_ENABLE_UDP_PUNCH,
|
||||
OPTION_ENABLE_IPV6_PUNCH,
|
||||
OPTION_ENABLE_PORT_FORWARD_MUX,
|
||||
OPTION_ENABLE_WEBRTC,
|
||||
OPTION_TOUCH_MODE,
|
||||
OPTION_SHOW_VIRTUAL_MOUSE,
|
||||
OPTION_SHOW_VIRTUAL_JOYSTICK,
|
||||
OPTION_ENABLE_FLUTTER_HTTP_ON_RUST,
|
||||
OPTION_ALLOW_ASK_FOR_NOTE,
|
||||
];
|
||||
// DEFAULT_SETTINGS, OVERWRITE_SETTINGS
|
||||
pub const KEYS_SETTINGS: &[&str] = &[
|
||||
OPTION_ACCESS_MODE,
|
||||
OPTION_ENABLE_KEYBOARD,
|
||||
OPTION_ENABLE_CLIPBOARD,
|
||||
OPTION_ENABLE_FILE_TRANSFER,
|
||||
OPTION_ENABLE_CAMERA,
|
||||
OPTION_ENABLE_TERMINAL,
|
||||
OPTION_ENABLE_REMOTE_PRINTER,
|
||||
OPTION_ENABLE_AUDIO,
|
||||
OPTION_ENABLE_TUNNEL,
|
||||
OPTION_ENABLE_REMOTE_RESTART,
|
||||
OPTION_ENABLE_RECORD_SESSION,
|
||||
OPTION_ENABLE_BLOCK_INPUT,
|
||||
OPTION_ENABLE_PRIVACY_MODE,
|
||||
OPTION_ALLOW_SCOPE_VIOLATION_CLOSE,
|
||||
OPTION_ALLOW_SCOPE_VIOLATION_ALARM,
|
||||
OPTION_ALLOW_REMOTE_CONFIG_MODIFICATION,
|
||||
OPTION_ALLOW_NUMERNIC_ONE_TIME_PASSWORD,
|
||||
OPTION_ENABLE_LAN_DISCOVERY,
|
||||
OPTION_DIRECT_SERVER,
|
||||
OPTION_DIRECT_ACCESS_PORT,
|
||||
OPTION_WHITELIST,
|
||||
OPTION_ID_WHITELIST,
|
||||
OPTION_ALLOW_AUTO_DISCONNECT,
|
||||
OPTION_AUTO_DISCONNECT_TIMEOUT,
|
||||
OPTION_ALLOW_ONLY_CONN_WINDOW_OPEN,
|
||||
OPTION_ALLOW_AUTO_RECORD_INCOMING,
|
||||
OPTION_WINDOWS_SERVICE_VIDEO_SAVE_DIRECTORY,
|
||||
OPTION_ENABLE_ABR,
|
||||
OPTION_ALLOW_REMOVE_WALLPAPER,
|
||||
OPTION_ALLOW_ALWAYS_SOFTWARE_RENDER,
|
||||
OPTION_ENABLE_HWCODEC,
|
||||
OPTION_APPROVE_MODE,
|
||||
OPTION_VERIFICATION_METHOD,
|
||||
OPTION_TEMPORARY_PASSWORD_LENGTH,
|
||||
OPTION_PROXY_URL,
|
||||
OPTION_PROXY_USERNAME,
|
||||
OPTION_PROXY_PASSWORD,
|
||||
OPTION_CUSTOM_RENDEZVOUS_SERVER,
|
||||
OPTION_API_SERVER,
|
||||
OPTION_KEY,
|
||||
OPTION_ALLOW_WEBSOCKET,
|
||||
OPTION_PRESET_ADDRESS_BOOK_NAME,
|
||||
OPTION_PRESET_ADDRESS_BOOK_TAG,
|
||||
OPTION_PRESET_ADDRESS_BOOK_ALIAS,
|
||||
OPTION_PRESET_ADDRESS_BOOK_PASSWORD,
|
||||
OPTION_PRESET_ADDRESS_BOOK_NOTE,
|
||||
OPTION_PRESET_DEVICE_USERNAME,
|
||||
OPTION_PRESET_DEVICE_NAME,
|
||||
OPTION_PRESET_NOTE,
|
||||
OPTION_ENABLE_DIRECTX_CAPTURE,
|
||||
OPTION_ENABLE_ANDROID_SOFTWARE_ENCODING_HALF_SCALE,
|
||||
OPTION_ENABLE_TRUSTED_DEVICES,
|
||||
OPTION_RELAY_SERVER,
|
||||
OPTION_ICE_SERVERS,
|
||||
OPTION_DISABLE_UDP,
|
||||
OPTION_ALLOW_INSECURE_TLS_FALLBACK,
|
||||
OPTION_KEEP_AWAKE_DURING_INCOMING_SESSIONS,
|
||||
OPTION_ALLOW_AUTO_UPDATE,
|
||||
OPTION_ALLOW_KCP_CC,
|
||||
OPTION_ALLOW_WEBRTC_CC,
|
||||
];
|
||||
|
||||
// BUILDIN_SETTINGS
|
||||
pub const KEYS_BUILDIN_SETTINGS: &[&str] = &[
|
||||
OPTION_DISPLAY_NAME,
|
||||
OPTION_AVATAR,
|
||||
OPTION_PRESET_DEVICE_GROUP_NAME,
|
||||
OPTION_PRESET_USERNAME,
|
||||
OPTION_PRESET_STRATEGY_NAME,
|
||||
OPTION_REMOVE_PRESET_PASSWORD_WARNING,
|
||||
OPTION_HIDE_GENERAL_SETTINGS,
|
||||
OPTION_HIDE_SECURITY_SETTINGS,
|
||||
OPTION_HIDE_NETWORK_SETTINGS,
|
||||
OPTION_HIDE_SERVER_SETTINGS,
|
||||
OPTION_HIDE_PROXY_SETTINGS,
|
||||
OPTION_HIDE_REMOTE_PRINTER_SETTINGS,
|
||||
OPTION_HIDE_WEBSOCKET_SETTINGS,
|
||||
OPTION_HIDE_STOP_SERVICE,
|
||||
OPTION_HIDE_USERNAME_ON_CARD,
|
||||
OPTION_HIDE_HELP_CARDS,
|
||||
OPTION_DEFAULT_CONNECT_PASSWORD,
|
||||
OPTION_HIDE_TRAY,
|
||||
OPTION_ONE_WAY_CLIPBOARD_REDIRECTION,
|
||||
OPTION_ALLOW_LOGON_SCREEN_PASSWORD,
|
||||
OPTION_ALLOW_DEEP_LINK_PASSWORD,
|
||||
OPTION_ALLOW_DEEP_LINK_SERVER_SETTINGS,
|
||||
OPTION_ONE_WAY_FILE_TRANSFER,
|
||||
OPTION_ALLOW_HTTPS_21114,
|
||||
OPTION_ALLOW_HOSTNAME_AS_ID,
|
||||
OPTION_REGISTER_DEVICE,
|
||||
OPTION_HIDE_POWERED_BY_ME,
|
||||
OPTION_MAIN_WINDOW_ALWAYS_ON_TOP,
|
||||
OPTION_FILE_TRANSFER_MAX_FILES,
|
||||
OPTION_DISABLE_CHANGE_PERMANENT_PASSWORD,
|
||||
OPTION_DISABLE_CHANGE_ID,
|
||||
OPTION_DISABLE_UNLOCK_PIN,
|
||||
OPTION_USE_RAW_TCP_FOR_API,
|
||||
OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW,
|
||||
OPTION_ALLOW_COMMAND_LINE_SETTINGS_WHEN_SETTINGS_DISABLED,
|
||||
];
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
/// The glob above and the constants below share one namespace, and Rust
|
||||
/// silently prefers the explicit item over a glob import. A key defined on
|
||||
/// both sides would therefore compile, with the client and the server
|
||||
/// disagreeing about its string value and nothing to signal it. Keep the
|
||||
/// two sets apart.
|
||||
#[test]
|
||||
fn key_names_do_not_collide_with_hbb_common() {
|
||||
fn names(src: &str) -> Vec<&str> {
|
||||
src.lines()
|
||||
.filter_map(|l| l.trim().strip_prefix("pub const "))
|
||||
.filter_map(|l| l.split(':').next())
|
||||
.map(str::trim)
|
||||
.filter(|n| n.starts_with("OPTION_") || n.starts_with("KEYS_"))
|
||||
.collect()
|
||||
}
|
||||
|
||||
let here = names(include_str!("keys.rs"));
|
||||
let there = names(include_str!("../../../hbb_common/src/config.rs"));
|
||||
assert!(
|
||||
!here.is_empty() && !there.is_empty(),
|
||||
"key parsing found nothing"
|
||||
);
|
||||
|
||||
let both: Vec<_> = here.iter().filter(|n| there.contains(n)).collect();
|
||||
assert!(
|
||||
both.is_empty(),
|
||||
"defined in both crates, so the local one shadows hbb_common's \
|
||||
with no diagnostic: {:?}",
|
||||
both
|
||||
);
|
||||
}
|
||||
}
|
||||
1
libs/base/src/config/mod.rs
Normal file
1
libs/base/src/config/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod keys;
|
||||
1813
libs/base/src/fs.rs
Normal file
1813
libs/base/src/fs.rs
Normal file
File diff suppressed because it is too large
Load Diff
39
libs/base/src/keyboard.rs
Normal file
39
libs/base/src/keyboard.rs
Normal file
@@ -0,0 +1,39 @@
|
||||
use std::{fmt, slice::Iter, str::FromStr};
|
||||
|
||||
use crate::protos::message::KeyboardMode;
|
||||
|
||||
impl fmt::Display for KeyboardMode {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
KeyboardMode::Legacy => write!(f, "legacy"),
|
||||
KeyboardMode::Map => write!(f, "map"),
|
||||
KeyboardMode::Translate => write!(f, "translate"),
|
||||
KeyboardMode::Auto => write!(f, "auto"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for KeyboardMode {
|
||||
type Err = ();
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
match s {
|
||||
"legacy" => Ok(KeyboardMode::Legacy),
|
||||
"map" => Ok(KeyboardMode::Map),
|
||||
"translate" => Ok(KeyboardMode::Translate),
|
||||
"auto" => Ok(KeyboardMode::Auto),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl KeyboardMode {
|
||||
pub fn iter() -> Iter<'static, KeyboardMode> {
|
||||
static KEYBOARD_MODES: [KeyboardMode; 4] = [
|
||||
KeyboardMode::Legacy,
|
||||
KeyboardMode::Map,
|
||||
KeyboardMode::Translate,
|
||||
KeyboardMode::Auto,
|
||||
];
|
||||
KEYBOARD_MODES.iter()
|
||||
}
|
||||
}
|
||||
7
libs/base/src/lib.rs
Normal file
7
libs/base/src/lib.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
pub mod config;
|
||||
pub mod fs;
|
||||
pub mod keyboard;
|
||||
pub mod platform;
|
||||
pub mod protos;
|
||||
|
||||
pub use protos::message as message_proto;
|
||||
618
libs/base/src/platform/linux.rs
Normal file
618
libs/base/src/platform/linux.rs
Normal file
@@ -0,0 +1,618 @@
|
||||
use hbb_common::ResultType;
|
||||
// Kept in hbb_common because `config::patch()` needs the shell lookup; re-exported
|
||||
// here so the long-standing `platform::linux::CMD_SH` paths are unchanged.
|
||||
pub use hbb_common::sh::{run_cmds_trim_newline, CMD_LOGINCTL, CMD_PS, CMD_SH};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
path::{Path, PathBuf},
|
||||
process::Command,
|
||||
};
|
||||
use users::{get_current_uid, get_user_by_uid, os::unix::UserExt};
|
||||
|
||||
use sctk::{
|
||||
output::OutputData,
|
||||
output::{OutputHandler, OutputState},
|
||||
reexports::client::protocol::wl_output::WlOutput,
|
||||
reexports::client::{globals, Proxy},
|
||||
reexports::client::{Connection, QueueHandle},
|
||||
registry::{ProvidesRegistryState, RegistryState},
|
||||
};
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref DISTRO: Distro = Distro::new();
|
||||
}
|
||||
|
||||
pub const DISPLAY_SERVER_WAYLAND: &str = "wayland";
|
||||
pub const DISPLAY_SERVER_X11: &str = "x11";
|
||||
pub const DISPLAY_DESKTOP_KDE: &str = "KDE";
|
||||
|
||||
pub const XDG_CURRENT_DESKTOP: &str = "XDG_CURRENT_DESKTOP";
|
||||
|
||||
pub struct Distro {
|
||||
pub name: String,
|
||||
pub version_id: String,
|
||||
}
|
||||
|
||||
impl Distro {
|
||||
fn new() -> Self {
|
||||
let name = run_cmds("awk -F'=' '/^NAME=/ {print $2}' /etc/os-release")
|
||||
.unwrap_or_default()
|
||||
.trim()
|
||||
.trim_matches('"')
|
||||
.to_string();
|
||||
let version_id = run_cmds("awk -F'=' '/^VERSION_ID=/ {print $2}' /etc/os-release")
|
||||
.unwrap_or_default()
|
||||
.trim()
|
||||
.trim_matches('"')
|
||||
.to_string();
|
||||
Self { name, version_id }
|
||||
}
|
||||
}
|
||||
|
||||
// Deprecated. Use `base::platform::linux::is_kde_session()` instead for now.
|
||||
// Or we need to set the correct environment variable in the server process.
|
||||
#[inline]
|
||||
pub fn is_kde() -> bool {
|
||||
if let Ok(env) = std::env::var(XDG_CURRENT_DESKTOP) {
|
||||
env == DISPLAY_DESKTOP_KDE
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
// Don't use `base::platform::linux::is_kde()` here.
|
||||
// It's not correct in the server process.
|
||||
pub fn is_kde_session() -> bool {
|
||||
std::process::Command::new(CMD_SH.as_str())
|
||||
.arg("-c")
|
||||
.arg("pgrep -f kded[0-9]+")
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.output()
|
||||
.map(|o| !o.stdout.is_empty())
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_gdm_user(username: &str) -> bool {
|
||||
username == "gdm" || username == "sddm"
|
||||
// || username == "lightgdm"
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_desktop_wayland() -> bool {
|
||||
get_display_server() == DISPLAY_SERVER_WAYLAND
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_x11_or_headless() -> bool {
|
||||
!is_desktop_wayland()
|
||||
}
|
||||
|
||||
// -1
|
||||
const INVALID_SESSION: &str = "4294967295";
|
||||
|
||||
pub fn get_display_server() -> String {
|
||||
// Check for forced display server environment variable first
|
||||
if let Ok(forced_display) = std::env::var("RUSTDESK_FORCED_DISPLAY_SERVER") {
|
||||
return forced_display;
|
||||
}
|
||||
|
||||
// Check if `loginctl` can be called successfully
|
||||
if run_loginctl(None).is_err() {
|
||||
return DISPLAY_SERVER_X11.to_owned();
|
||||
}
|
||||
|
||||
let mut session = get_values_of_seat0(&[0])[0].clone();
|
||||
if session.is_empty() {
|
||||
// loginctl has not given the expected output. try something else.
|
||||
if let Ok(sid) = std::env::var("XDG_SESSION_ID") {
|
||||
// could also execute "cat /proc/self/sessionid"
|
||||
session = sid;
|
||||
}
|
||||
if session.is_empty() {
|
||||
session = run_cmds("cat /proc/self/sessionid").unwrap_or_default();
|
||||
if session == INVALID_SESSION {
|
||||
session = "".to_owned();
|
||||
}
|
||||
}
|
||||
}
|
||||
if session.is_empty() {
|
||||
std::env::var("XDG_SESSION_TYPE").unwrap_or("x11".to_owned())
|
||||
} else {
|
||||
get_display_server_of_session(&session)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_display_server_of_session(session: &str) -> String {
|
||||
let mut display_server = if let Ok(output) =
|
||||
run_loginctl(Some(vec!["show-session", "-p", "Type", session]))
|
||||
// Check session type of the session
|
||||
{
|
||||
String::from_utf8_lossy(&output.stdout)
|
||||
.replace("Type=", "")
|
||||
.trim_end()
|
||||
.into()
|
||||
} else {
|
||||
"".to_owned()
|
||||
};
|
||||
if display_server.is_empty() || display_server == "tty" || display_server == "unspecified" {
|
||||
if let Ok(sestype) = std::env::var("XDG_SESSION_TYPE") {
|
||||
if !sestype.is_empty() {
|
||||
return sestype.to_lowercase();
|
||||
}
|
||||
}
|
||||
display_server = "x11".to_owned();
|
||||
}
|
||||
display_server.to_lowercase()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn line_values(indices: &[usize], line: &str) -> Vec<String> {
|
||||
indices
|
||||
.into_iter()
|
||||
.map(|idx| line.split_whitespace().nth(*idx).unwrap_or("").to_owned())
|
||||
.collect::<Vec<String>>()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_values_of_seat0(indices: &[usize]) -> Vec<String> {
|
||||
_get_values_of_seat0(indices, true)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_values_of_seat0_with_gdm_wayland(indices: &[usize]) -> Vec<String> {
|
||||
_get_values_of_seat0(indices, false)
|
||||
}
|
||||
|
||||
// Ignore "3 sessions listed."
|
||||
fn ignore_loginctl_line(line: &str) -> bool {
|
||||
line.contains("sessions") || line.split(" ").count() < 4
|
||||
}
|
||||
|
||||
fn _get_values_of_seat0(indices: &[usize], ignore_gdm_wayland: bool) -> Vec<String> {
|
||||
if let Ok(output) = run_loginctl(None) {
|
||||
for line in String::from_utf8_lossy(&output.stdout).lines() {
|
||||
if ignore_loginctl_line(line) {
|
||||
continue;
|
||||
}
|
||||
if line.contains("seat0") {
|
||||
if let Some(sid) = line.split_whitespace().next() {
|
||||
if is_active(sid) {
|
||||
if ignore_gdm_wayland {
|
||||
if is_gdm_user(line.split_whitespace().nth(2).unwrap_or(""))
|
||||
&& get_display_server_of_session(sid) == DISPLAY_SERVER_WAYLAND
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return line_values(indices, line);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// some case, there is no seat0 https://github.com/rustdesk/rustdesk/issues/73
|
||||
for line in String::from_utf8_lossy(&output.stdout).lines() {
|
||||
if ignore_loginctl_line(line) {
|
||||
continue;
|
||||
}
|
||||
if let Some(sid) = line.split_whitespace().next() {
|
||||
if is_active(sid) {
|
||||
let d = get_display_server_of_session(sid);
|
||||
if ignore_gdm_wayland {
|
||||
if is_gdm_user(line.split_whitespace().nth(2).unwrap_or(""))
|
||||
&& d == DISPLAY_SERVER_WAYLAND
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if d == "tty" || d == "unspecified" {
|
||||
continue;
|
||||
}
|
||||
return line_values(indices, line);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
line_values(indices, "")
|
||||
}
|
||||
|
||||
pub fn is_active(sid: &str) -> bool {
|
||||
if let Ok(output) = run_loginctl(Some(vec!["show-session", "-p", "State", sid])) {
|
||||
String::from_utf8_lossy(&output.stdout).contains("active")
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_active_and_seat0(sid: &str) -> bool {
|
||||
if let Ok(output) = run_loginctl(Some(vec!["show-session", sid])) {
|
||||
String::from_utf8_lossy(&output.stdout).contains("State=active")
|
||||
&& String::from_utf8_lossy(&output.stdout).contains("Seat=seat0")
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
// Check both "Lock" and "Switch user"
|
||||
pub fn is_session_locked(sid: &str) -> bool {
|
||||
if let Ok(output) = run_loginctl(Some(vec!["show-session", sid, "--property=LockedHint"])) {
|
||||
String::from_utf8_lossy(&output.stdout).contains("LockedHint=yes")
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
// **Note** that the return value here, the last character is '\n'.
|
||||
// Use `run_cmds_trim_newline()` if you want to remove '\n' at the end.
|
||||
pub fn run_cmds(cmds: &str) -> ResultType<String> {
|
||||
let output = std::process::Command::new(CMD_SH.as_str())
|
||||
.args(vec!["-c", cmds])
|
||||
.output()?;
|
||||
Ok(String::from_utf8_lossy(&output.stdout).to_string())
|
||||
}
|
||||
|
||||
fn run_loginctl(args: Option<Vec<&str>>) -> std::io::Result<std::process::Output> {
|
||||
if std::env::var("FLATPAK_ID").is_ok() {
|
||||
let mut l_args = CMD_LOGINCTL.to_string();
|
||||
if let Some(a) = args.as_ref() {
|
||||
l_args = format!("{} {}", l_args, a.join(" "));
|
||||
}
|
||||
let res = std::process::Command::new("flatpak-spawn")
|
||||
.args(vec![String::from("--host"), l_args])
|
||||
.output();
|
||||
if res.is_ok() {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
let mut cmd = std::process::Command::new(CMD_LOGINCTL.as_str());
|
||||
if let Some(a) = args {
|
||||
return cmd.args(a).output();
|
||||
}
|
||||
cmd.output()
|
||||
}
|
||||
|
||||
/// forever: may not work
|
||||
#[cfg(target_os = "linux")]
|
||||
pub fn system_message(title: &str, msg: &str, forever: bool) -> ResultType<()> {
|
||||
let cmds: HashMap<&str, Vec<&str>> = HashMap::from([
|
||||
("notify-send", [title, msg].to_vec()),
|
||||
(
|
||||
"zenity",
|
||||
[
|
||||
"--info",
|
||||
"--timeout",
|
||||
if forever { "0" } else { "3" },
|
||||
"--title",
|
||||
title,
|
||||
"--text",
|
||||
msg,
|
||||
]
|
||||
.to_vec(),
|
||||
),
|
||||
("kdialog", ["--title", title, "--msgbox", msg].to_vec()),
|
||||
(
|
||||
"xmessage",
|
||||
[
|
||||
"-center",
|
||||
"-timeout",
|
||||
if forever { "0" } else { "3" },
|
||||
title,
|
||||
msg,
|
||||
]
|
||||
.to_vec(),
|
||||
),
|
||||
]);
|
||||
for (k, v) in cmds {
|
||||
if Command::new(k).args(v).spawn().is_ok() {
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
hbb_common::bail!("failed to post system message");
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde_derive::Serialize, serde_derive::Deserialize)]
|
||||
pub struct WaylandDisplayInfo {
|
||||
pub name: String,
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
pub width: i32,
|
||||
pub height: i32,
|
||||
pub logical_size: Option<(i32, i32)>,
|
||||
pub refresh_rate: i32,
|
||||
/// Output rotation in degrees (0/90/180/270), from `wl_output.geometry`. The mode keeps its
|
||||
/// unrotated dimensions and `logical_size` arrives already swapped, so without this field a
|
||||
/// rotated output is indistinguishable from a scaled one. Flipped variants map to their
|
||||
/// rotation. Defaulted so a serialized snapshot from an older probe child still deserializes.
|
||||
#[serde(default)]
|
||||
pub transform: i32,
|
||||
}
|
||||
|
||||
/// The isolated socket-probe fallback, in its own file and behind the `wayland_probe` feature so
|
||||
/// the base Wayland path never compiles it. The DRM login-screen build turns it on.
|
||||
#[cfg(feature = "wayland_probe")]
|
||||
pub mod wayland_probe;
|
||||
#[cfg(feature = "wayland_probe")]
|
||||
pub use wayland_probe::{wayland_display_probe_child_main, WAYLAND_DISPLAY_PROBE_ARG};
|
||||
|
||||
// Retrieves information about all connected displays via the Wayland protocol.
|
||||
pub fn get_wayland_displays() -> ResultType<Vec<WaylandDisplayInfo>> {
|
||||
// Read before connecting: `connect_to_env` consumes `WAYLAND_SOCKET`. Only the probe fallback
|
||||
// needs this, so it is computed only when that feature is compiled in.
|
||||
#[cfg(feature = "wayland_probe")]
|
||||
let named_endpoint = wayland_probe::env_names_wayland_endpoint();
|
||||
match Connection::connect_to_env() {
|
||||
Ok(conn) => collect_wayland_displays(&conn),
|
||||
// Without the feature, the connect error is final, exactly as before this fallback existed.
|
||||
#[cfg(not(feature = "wayland_probe"))]
|
||||
Err(err) => Err(err.into()),
|
||||
#[cfg(feature = "wayland_probe")]
|
||||
Err(err) => wayland_probe::wayland_displays_from_runtime_dir(named_endpoint)
|
||||
.map_err(|fallback_err| anyhow::anyhow!("{err}; {fallback_err}")),
|
||||
}
|
||||
}
|
||||
|
||||
/// `wl_output::Transform` as degrees. Flipped variants report their rotation ONLY: wayland
|
||||
/// defines them as a vertical-axis mirror followed by the rotation, and the mirror half is
|
||||
/// dropped here - a consumer correcting frames by this value serves a flipped output mirrored.
|
||||
/// Said once in the log rather than silently, because no compositor of ours produces a flipped
|
||||
/// output to measure the mirror half against; carrying it must wait for a measured producer.
|
||||
fn transform_degrees(t: sctk::reexports::client::protocol::wl_output::Transform) -> i32 {
|
||||
use sctk::reexports::client::protocol::wl_output::Transform;
|
||||
match t {
|
||||
Transform::Normal => 0,
|
||||
Transform::_90 => 90,
|
||||
Transform::_180 => 180,
|
||||
Transform::_270 => 270,
|
||||
Transform::Flipped | Transform::Flipped90 | Transform::Flipped180
|
||||
| Transform::Flipped270 => {
|
||||
static FLIPPED_WARNED: std::sync::atomic::AtomicBool =
|
||||
std::sync::atomic::AtomicBool::new(false);
|
||||
if !FLIPPED_WARNED.swap(true, std::sync::atomic::Ordering::Relaxed) {
|
||||
log::warn!(
|
||||
"an output reports a flipped transform ({t:?}); only its rotation is \
|
||||
corrected, the mirror is not"
|
||||
);
|
||||
}
|
||||
match t {
|
||||
Transform::Flipped90 => 90,
|
||||
Transform::Flipped180 => 180,
|
||||
Transform::Flipped270 => 270,
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
|
||||
fn collect_wayland_displays(conn: &Connection) -> ResultType<Vec<WaylandDisplayInfo>> {
|
||||
struct WaylandEnv {
|
||||
registry_state: RegistryState,
|
||||
output_state: OutputState,
|
||||
}
|
||||
|
||||
impl OutputHandler for WaylandEnv {
|
||||
fn output_state(&mut self) -> &mut OutputState {
|
||||
&mut self.output_state
|
||||
}
|
||||
|
||||
fn new_output(&mut self, _: &Connection, _: &QueueHandle<Self>, _: WlOutput) {}
|
||||
fn update_output(&mut self, _: &Connection, _: &QueueHandle<Self>, _: WlOutput) {}
|
||||
fn output_destroyed(&mut self, _: &Connection, _: &QueueHandle<Self>, _: WlOutput) {}
|
||||
}
|
||||
|
||||
impl ProvidesRegistryState for WaylandEnv {
|
||||
fn registry(&mut self) -> &mut RegistryState {
|
||||
&mut self.registry_state
|
||||
}
|
||||
|
||||
sctk::registry_handlers![OutputState];
|
||||
}
|
||||
|
||||
sctk::delegate_output!(WaylandEnv);
|
||||
sctk::delegate_registry!(WaylandEnv);
|
||||
|
||||
let (globals, mut event_queue) = globals::registry_queue_init(conn)?;
|
||||
let queue_handle = event_queue.handle();
|
||||
|
||||
let registry_state = RegistryState::new(&globals);
|
||||
let output_state = OutputState::new(&globals, &queue_handle);
|
||||
|
||||
let mut environment = WaylandEnv {
|
||||
registry_state,
|
||||
output_state,
|
||||
};
|
||||
|
||||
event_queue.roundtrip(&mut environment)?;
|
||||
|
||||
let outputs: Vec<_> = environment.output_state.outputs().collect();
|
||||
let mut display_infos = Vec::new();
|
||||
|
||||
for output in outputs {
|
||||
if let Some(output_data) = output.data::<OutputData>() {
|
||||
output_data.with_output_info(|info| {
|
||||
if let Some(mode) = info.modes.iter().find(|m| m.current) {
|
||||
// wlroots compositors leave wl_output.geometry at (0, 0) for every output and
|
||||
// publish the real layout only through xdg-output, so taking `location` there
|
||||
// stacks the whole desktop on the origin. Mutter fills both, so this stays a
|
||||
// no-op on GNOME.
|
||||
let (x, y) = info.logical_position.unwrap_or(info.location);
|
||||
let (width, height) = mode.dimensions;
|
||||
let refresh_rate = mode.refresh_rate;
|
||||
let name = info.name.clone().unwrap_or_default();
|
||||
let logical_size = info.logical_size;
|
||||
let transform = transform_degrees(info.transform);
|
||||
display_infos.push(WaylandDisplayInfo {
|
||||
name,
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
logical_size,
|
||||
refresh_rate,
|
||||
transform,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Ok(display_infos)
|
||||
}
|
||||
|
||||
/// Escape a string for safe use in shell commands by wrapping in single quotes.
|
||||
///
|
||||
/// This function handles the edge case of single quotes within the string by:
|
||||
/// 1. Ending the current single-quoted section
|
||||
/// 2. Adding an escaped single quote
|
||||
/// 3. Starting a new single-quoted section
|
||||
///
|
||||
/// Example: "it's here" -> "'it'\''s here'"
|
||||
#[inline]
|
||||
pub fn shell_quote(s: &str) -> String {
|
||||
format!("'{}'", s.replace("'", "'\\''"))
|
||||
}
|
||||
|
||||
/// Get the current user's home directory via getpwuid (trusted source).
|
||||
///
|
||||
/// This function uses the system's password database (via `getpwuid`) to retrieve
|
||||
/// the home directory, avoiding the security risk of relying on the `HOME`
|
||||
/// environment variable which can be manipulated by untrusted input.
|
||||
///
|
||||
/// # Returns
|
||||
/// - `Some(PathBuf)` if the home directory was found and exists
|
||||
/// - `None` if the user lookup failed or the directory doesn't exist
|
||||
///
|
||||
/// # Security
|
||||
/// This function is designed to be safe against confused-deputy attacks where
|
||||
/// an attacker might manipulate environment variables to influence privileged
|
||||
/// operations.
|
||||
pub fn get_home_dir_trusted() -> Option<PathBuf> {
|
||||
let uid = get_current_uid();
|
||||
match get_user_by_uid(uid) {
|
||||
Some(user) => {
|
||||
let home = user.home_dir();
|
||||
if Path::is_dir(home) {
|
||||
Some(PathBuf::from(home))
|
||||
} else {
|
||||
log::warn!(
|
||||
"Home directory for uid {} does not exist or is not a directory: {:?}",
|
||||
uid,
|
||||
home
|
||||
);
|
||||
None
|
||||
}
|
||||
}
|
||||
None => {
|
||||
log::warn!("Failed to get user info for uid {}", uid);
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_transform_degrees_maps_all_eight_variants() {
|
||||
use sctk::reexports::client::protocol::wl_output::Transform;
|
||||
// Flipped variants report their rotation: the frame still needs that turn to read
|
||||
// upright, and the mirror half has no producer among desktop compositors to test.
|
||||
for (t, deg) in [
|
||||
(Transform::Normal, 0),
|
||||
(Transform::_90, 90),
|
||||
(Transform::_180, 180),
|
||||
(Transform::_270, 270),
|
||||
(Transform::Flipped, 0),
|
||||
(Transform::Flipped90, 90),
|
||||
(Transform::Flipped180, 180),
|
||||
(Transform::Flipped270, 270),
|
||||
] {
|
||||
assert_eq!(transform_degrees(t), deg, "{t:?}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_display_info_without_transform_defaults_to_zero() {
|
||||
// A snapshot serialized by an older probe child carries no transform field; it must
|
||||
// deserialize with 0 rather than fail, or a greeter-side child update becomes a
|
||||
// lockstep upgrade.
|
||||
let old = r#"{"name":"HDMI-1","x":0,"y":0,"width":1920,"height":1080,"logical_size":null,"refresh_rate":60}"#;
|
||||
let info: WaylandDisplayInfo = serde_json::from_str(old).unwrap();
|
||||
assert_eq!(info.transform, 0);
|
||||
let roundtrip: WaylandDisplayInfo =
|
||||
serde_json::from_str(&serde_json::to_string(&info).unwrap()).unwrap();
|
||||
assert_eq!(roundtrip.transform, 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_run_cmds_trim_newline() {
|
||||
assert_eq!(run_cmds_trim_newline("echo -n 123").unwrap(), "123");
|
||||
assert_eq!(run_cmds_trim_newline("echo 123").unwrap(), "123");
|
||||
assert_eq!(
|
||||
run_cmds_trim_newline("whoami").unwrap() + "\n",
|
||||
run_cmds("whoami").unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
/// Test get_home_dir_trusted: returns valid path and ignores HOME env var
|
||||
#[test]
|
||||
fn test_get_home_dir_trusted() {
|
||||
let original_home = std::env::var("HOME").ok();
|
||||
|
||||
// Set HOME to a fake/malicious path
|
||||
std::env::set_var("HOME", "/tmp/fake_malicious_home");
|
||||
let result = get_home_dir_trusted();
|
||||
|
||||
// Restore original HOME
|
||||
match original_home {
|
||||
Some(home) => std::env::set_var("HOME", home),
|
||||
None => std::env::remove_var("HOME"),
|
||||
}
|
||||
|
||||
// Verify: returns valid path that is NOT the fake HOME
|
||||
if let Some(path) = result {
|
||||
assert!(path.is_absolute(), "Path should be absolute: {:?}", path);
|
||||
assert!(path.is_dir(), "Path should be a directory: {:?}", path);
|
||||
assert_ne!(
|
||||
path.to_string_lossy(),
|
||||
"/tmp/fake_malicious_home",
|
||||
"Should not use HOME env var"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Test shell_quote with normal strings
|
||||
#[test]
|
||||
fn test_shell_quote_normal() {
|
||||
assert_eq!(shell_quote("hello"), "'hello'");
|
||||
assert_eq!(shell_quote("/home/user"), "'/home/user'");
|
||||
}
|
||||
|
||||
/// Test shell_quote with spaces
|
||||
#[test]
|
||||
fn test_shell_quote_spaces() {
|
||||
assert_eq!(shell_quote("/home/my user/file"), "'/home/my user/file'");
|
||||
assert_eq!(shell_quote("path with spaces"), "'path with spaces'");
|
||||
}
|
||||
|
||||
/// Test shell_quote with single quotes (the tricky case)
|
||||
#[test]
|
||||
fn test_shell_quote_single_quotes() {
|
||||
assert_eq!(shell_quote("it's"), "'it'\\''s'");
|
||||
assert_eq!(shell_quote("don't stop"), "'don'\\''t stop'");
|
||||
}
|
||||
|
||||
/// Test shell_quote with shell metacharacters
|
||||
#[test]
|
||||
fn test_shell_quote_metacharacters() {
|
||||
// These should all be safely quoted
|
||||
assert_eq!(shell_quote("test;rm -rf /"), "'test;rm -rf /'");
|
||||
assert_eq!(shell_quote("$(whoami)"), "'$(whoami)'");
|
||||
assert_eq!(shell_quote("`id`"), "'`id`'");
|
||||
assert_eq!(shell_quote("a && b"), "'a && b'");
|
||||
assert_eq!(shell_quote("a | b"), "'a | b'");
|
||||
}
|
||||
}
|
||||
349
libs/base/src/platform/linux/wayland_probe.rs
Normal file
349
libs/base/src/platform/linux/wayland_probe.rs
Normal file
@@ -0,0 +1,349 @@
|
||||
//! Isolated Wayland display probe: enumerates a compositor over a runtime-directory socket when
|
||||
//! the environment names no endpoint (a greeter's `--server` and the root service are given no
|
||||
//! compositor variables). Gated behind the `wayland_probe` feature so the base Wayland path is
|
||||
//! untouched — a consumer that does not build the DRM login-screen backend never compiles this,
|
||||
//! and `get_wayland_displays` keeps its original behavior of returning the connect error.
|
||||
|
||||
use super::{collect_wayland_displays, get_values_of_seat0_with_gdm_wayland, WaylandDisplayInfo};
|
||||
use hbb_common::{bail, ResultType};
|
||||
use sctk::reexports::client::Connection;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
const RUNTIME_DIR_PROBE_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(2);
|
||||
|
||||
/// The argument the consumer binary must dispatch to `wayland_display_probe_child_main` before
|
||||
/// any other startup work; see that function for why the probe is its own process.
|
||||
pub const WAYLAND_DISPLAY_PROBE_ARG: &str = "--wayland-display-probe";
|
||||
|
||||
/// First stdout line of a probe child. A binary that does not dispatch the arg never prints it.
|
||||
const WAYLAND_PROBE_MAGIC: &str = "wayland-display-probe-v1";
|
||||
|
||||
/// Latched on a failed handshake: a consumer that does not dispatch the probe arg runs its NORMAL
|
||||
/// startup instead, and this path re-enters every enumeration cycle.
|
||||
static PROBE_UNSUPPORTED: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
|
||||
|
||||
static RUNTIME_DIR_PROBE_BUSY: std::sync::atomic::AtomicBool =
|
||||
std::sync::atomic::AtomicBool::new(false);
|
||||
|
||||
/// Clears the in-flight flag on every exit path of the parent, error arms included.
|
||||
struct ProbeBusyGuard;
|
||||
|
||||
impl Drop for ProbeBusyGuard {
|
||||
fn drop(&mut self) {
|
||||
RUNTIME_DIR_PROBE_BUSY.store(false, std::sync::atomic::Ordering::Release);
|
||||
}
|
||||
}
|
||||
|
||||
/// Entry point of the isolated probe process. The consumer binary dispatches
|
||||
/// `WAYLAND_DISPLAY_PROBE_ARG` here first, before config, logging or any other startup work.
|
||||
///
|
||||
/// Its own process because the release profile builds with panic=abort: sctk panics on malformed
|
||||
/// protocol bytes, and in-process that abort takes the whole server down. Here it takes down only
|
||||
/// this child, which the parent reports as a failed probe. The seat0 lookup also runs in here, so
|
||||
/// the parent's single deadline bounds the loginctl reads too.
|
||||
pub fn wayland_display_probe_child_main() -> ! {
|
||||
use std::io::Write;
|
||||
// The handshake first, so the parent can tell this entry point ran and not a consumer binary
|
||||
// that fell through to its normal startup.
|
||||
println!("{WAYLAND_PROBE_MAGIC}");
|
||||
let _ = std::io::stdout().flush();
|
||||
let code = match seat0_runtime_dir()
|
||||
.and_then(|dir| {
|
||||
drop_to_dir_owner(&dir)?;
|
||||
probe_runtime_dir(&dir)
|
||||
})
|
||||
.and_then(|displays| serde_json::to_string(&displays).map_err(anyhow::Error::from))
|
||||
{
|
||||
Ok(json) => {
|
||||
println!("{json}");
|
||||
0
|
||||
}
|
||||
Err(err) => {
|
||||
eprintln!("{err:#}");
|
||||
1
|
||||
}
|
||||
};
|
||||
let _ = std::io::stdout().flush();
|
||||
std::process::exit(code)
|
||||
}
|
||||
|
||||
static ENDPOINT_WAS_NAMED: std::sync::atomic::AtomicBool =
|
||||
std::sync::atomic::AtomicBool::new(false);
|
||||
|
||||
/// Whether the environment ever named a wayland endpoint in this process. Empty is not a name.
|
||||
///
|
||||
/// Read before `connect_to_env`, which removes `WAYLAND_SOCKET` from the environment on both its
|
||||
/// success and its bad-fd path; and latched, so a consumed variable cannot turn a process that WAS
|
||||
/// pointed at a compositor into one that is free to go looking for another.
|
||||
pub(super) fn env_names_wayland_endpoint() -> bool {
|
||||
use std::sync::atomic::Ordering;
|
||||
let named = ["WAYLAND_DISPLAY", "WAYLAND_SOCKET"]
|
||||
.iter()
|
||||
.any(|key| std::env::var_os(key).is_some_and(|value| !value.is_empty()));
|
||||
if named {
|
||||
ENDPOINT_WAS_NAMED.store(true, Ordering::Release);
|
||||
}
|
||||
ENDPOINT_WAS_NAMED.load(Ordering::Acquire)
|
||||
}
|
||||
|
||||
/// The probe parses compositor-controlled protocol data; a root service must not do that as
|
||||
/// root. Before touching the socket, become the runtime directory's owner — and refuse to probe
|
||||
/// at all if the drop fails, since staying root is the one unacceptable outcome.
|
||||
fn drop_to_dir_owner(dir: &Path) -> ResultType<()> {
|
||||
if unsafe { libc::geteuid() } != 0 {
|
||||
return Ok(());
|
||||
}
|
||||
use std::os::unix::fs::MetadataExt;
|
||||
let meta = std::fs::metadata(dir)?;
|
||||
let (uid, gid) = (meta.uid(), meta.gid());
|
||||
if uid == 0 {
|
||||
// Root's own session: there is no boundary to cross and nothing to drop to.
|
||||
return Ok(());
|
||||
}
|
||||
unsafe {
|
||||
if libc::setgroups(0, std::ptr::null()) != 0
|
||||
|| libc::setgid(gid) != 0
|
||||
|| libc::setuid(uid) != 0
|
||||
|| libc::setuid(0) == 0
|
||||
{
|
||||
bail!("could not drop privileges for the socket probe");
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// `/run/user/<uid>` of the active seat0 session, a greeter included.
|
||||
///
|
||||
/// Derived from the uid rather than read from `XDG_RUNTIME_DIR`: the root service is given no such
|
||||
/// variable, and `get_home_dir_trusted` refuses to trust the environment for the same reason.
|
||||
fn seat0_runtime_dir() -> ResultType<PathBuf> {
|
||||
let uid = get_values_of_seat0_with_gdm_wayland(&[1]).remove(0);
|
||||
if uid.is_empty() || !uid.bytes().all(|b| b.is_ascii_digit()) {
|
||||
bail!("no active seat0 session to take a runtime directory from");
|
||||
}
|
||||
Ok(PathBuf::from(format!("/run/user/{uid}")))
|
||||
}
|
||||
|
||||
/// The wayland sockets present in `dir`, lowest display number first.
|
||||
///
|
||||
/// Scanned rather than guessed: `wl_display_add_socket_auto` takes the first FREE name up to
|
||||
/// `wayland-32`, and a greeter is where leftovers accumulate across compositor restarts. Only that
|
||||
/// name pattern, because the same directory holds pipewire and dbus sockets.
|
||||
fn wayland_sockets_in(dir: &Path) -> Vec<PathBuf> {
|
||||
use std::os::unix::fs::FileTypeExt;
|
||||
let mut paths: Vec<PathBuf> = match std::fs::read_dir(dir) {
|
||||
Ok(entries) => entries
|
||||
.flatten()
|
||||
.filter(|entry| {
|
||||
let name = entry.file_name();
|
||||
let name = name.to_string_lossy();
|
||||
name.starts_with("wayland-")
|
||||
&& !name.ends_with(".lock")
|
||||
&& entry.file_type().map(|t| t.is_socket()).unwrap_or(false)
|
||||
})
|
||||
.map(|entry| entry.path())
|
||||
.collect(),
|
||||
Err(_) => Vec::new(),
|
||||
};
|
||||
paths.sort_by_key(|path| {
|
||||
path.file_name()
|
||||
.and_then(|name| name.to_str())
|
||||
.and_then(|name| name.strip_prefix("wayland-"))
|
||||
.and_then(|number| number.parse::<u32>().ok())
|
||||
.unwrap_or(u32::MAX)
|
||||
});
|
||||
paths
|
||||
}
|
||||
|
||||
/// Enumerate through a socket in the seat0 runtime directory, for the case where nothing named an
|
||||
/// endpoint: a greeter's `--server` and the root service are given no compositor variables, so
|
||||
/// nothing tells the enumerator where a compositor that IS running lives. An endpoint that WAS
|
||||
/// named and failed must not silently reattach to a different compositor.
|
||||
///
|
||||
/// In a subprocess and bounded, because the caller holds a process-wide lock across the call while
|
||||
/// `connect(2)` parks on a full backlog and sctk's roundtrip polls without a deadline; and because
|
||||
/// sctk panics on malformed output events, which the release profile's panic=abort turns into an
|
||||
/// abort of the whole server. A child dies alone, and on the deadline it is killed instead of
|
||||
/// leaking a thread. The seat0 lookup runs inside the child, under the same deadline.
|
||||
pub(super) fn wayland_displays_from_runtime_dir(
|
||||
named_endpoint: bool,
|
||||
) -> ResultType<Vec<WaylandDisplayInfo>> {
|
||||
use std::sync::atomic::Ordering;
|
||||
if named_endpoint {
|
||||
bail!("an explicit wayland endpoint is set and did not connect");
|
||||
}
|
||||
if PROBE_UNSUPPORTED.load(Ordering::Acquire) {
|
||||
bail!("this binary does not dispatch {WAYLAND_DISPLAY_PROBE_ARG}");
|
||||
}
|
||||
if RUNTIME_DIR_PROBE_BUSY.swap(true, Ordering::AcqRel) {
|
||||
bail!("an earlier probe has not returned");
|
||||
}
|
||||
let _busy = ProbeBusyGuard;
|
||||
let exe = std::env::current_exe()?;
|
||||
// Its own process group, so the deadline can kill loginctl descendants along with the child,
|
||||
// and so no surviving descendant can hold the pipes open past the reads below.
|
||||
use std::os::unix::process::CommandExt;
|
||||
let mut child = std::process::Command::new(exe)
|
||||
.arg(WAYLAND_DISPLAY_PROBE_ARG)
|
||||
.stdin(std::process::Stdio::null())
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.stderr(std::process::Stdio::piped())
|
||||
.process_group(0)
|
||||
.spawn()?;
|
||||
let probe_pgid = child.id() as libc::pid_t;
|
||||
let kill_probe_group = || unsafe {
|
||||
let _ = libc::kill(-probe_pgid, libc::SIGKILL);
|
||||
};
|
||||
let deadline = std::time::Instant::now() + RUNTIME_DIR_PROBE_TIMEOUT;
|
||||
let status = loop {
|
||||
match child.try_wait()? {
|
||||
Some(status) => {
|
||||
kill_probe_group();
|
||||
break status;
|
||||
}
|
||||
None if std::time::Instant::now() >= deadline => {
|
||||
kill_probe_group();
|
||||
// The direct pid too, not only its group: if the child left the group its own
|
||||
// kill would miss it, and the wait below would then block on a live child. A
|
||||
// pid-targeted SIGKILL is uncatchable, so wait() is bounded either way.
|
||||
let _ = child.kill();
|
||||
let _ = child.wait();
|
||||
// An unwired binary runs its normal startup, and a long-running one (the
|
||||
// server itself) lands HERE rather than at the handshake check below — latch
|
||||
// on this path too, or every enumeration cycle spawns a full consumer
|
||||
// process. Judged by what the child already wrote: a real probe prints the
|
||||
// magic line first and flushes, so its absence after a whole deadline means
|
||||
// this is not a probe. Only buffered bytes are read — a blocking read could
|
||||
// hang on a grandchild that inherited the write end.
|
||||
match first_buffered_line(child.stdout.take()) {
|
||||
// The pipe could not be inspected at all: no evidence, no latch.
|
||||
None => {
|
||||
bail!("the wayland socket probe timed out and its output was uninspectable")
|
||||
}
|
||||
Some(head) if head.as_deref() == Some(WAYLAND_PROBE_MAGIC) => {
|
||||
bail!("the wayland socket probe did not answer and was killed");
|
||||
}
|
||||
Some(_) => {
|
||||
PROBE_UNSUPPORTED.store(true, Ordering::Release);
|
||||
bail!("the wayland socket probe timed out without the handshake; probe disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
None => std::thread::sleep(std::time::Duration::from_millis(25)),
|
||||
}
|
||||
};
|
||||
// Drained non-blocking, not read_to_string: the child exited so its output is already
|
||||
// buffered, but a descendant that escaped the process group could still hold a write end open
|
||||
// and an EOF-seeking read would then hang here forever.
|
||||
let stdout = drain_nonblocking(child.stdout.take()).unwrap_or_default();
|
||||
let stderr = drain_nonblocking(child.stderr.take()).unwrap_or_default();
|
||||
let mut lines = stdout.lines();
|
||||
if lines.next() != Some(WAYLAND_PROBE_MAGIC) {
|
||||
// Not a probe: the binary ran its normal startup. Latch, or this path would spawn one
|
||||
// full consumer process per enumeration cycle.
|
||||
PROBE_UNSUPPORTED.store(true, Ordering::Release);
|
||||
bail!("this binary does not dispatch {WAYLAND_DISPLAY_PROBE_ARG}; probe disabled");
|
||||
}
|
||||
if !status.success() {
|
||||
let detail = stderr.trim();
|
||||
if detail.is_empty() {
|
||||
// panic=abort or a signal leaves stderr empty; the status is then the only cause.
|
||||
bail!("wayland socket probe failed: {status}");
|
||||
}
|
||||
bail!("wayland socket probe failed ({status}): {detail}");
|
||||
}
|
||||
let displays: Vec<WaylandDisplayInfo> =
|
||||
match serde_json::from_str(lines.next().unwrap_or_default()) {
|
||||
Ok(displays) => displays,
|
||||
Err(err) => bail!("wayland socket probe answered a malformed list: {err}"),
|
||||
};
|
||||
// The child already refuses an empty list; refuse it here too, so a truncated pipe cannot
|
||||
// become a cached-for-life empty enumeration.
|
||||
if displays.is_empty() {
|
||||
bail!("wayland socket probe returned no outputs");
|
||||
}
|
||||
log::debug!(
|
||||
"wayland: {} output(s) via the probe subprocess",
|
||||
displays.len()
|
||||
);
|
||||
Ok(displays)
|
||||
}
|
||||
|
||||
/// Everything already buffered in the pipe, read strictly non-blocking and capped: a descendant
|
||||
/// that escaped the probe's process group can hold a write end open, so a blocking read (even
|
||||
/// after the child exits) could hang the enumeration forever. `None` means the pipe could not be
|
||||
/// INSPECTED (missing handle or fcntl failure) and must not be read as evidence of anything;
|
||||
/// `Some` is whatever bytes were buffered, whether or not EOF arrived.
|
||||
fn drain_nonblocking<R: std::io::Read + std::os::fd::AsRawFd>(pipe: Option<R>) -> Option<String> {
|
||||
let mut pipe = pipe?;
|
||||
let fd = pipe.as_raw_fd();
|
||||
unsafe {
|
||||
let flags = libc::fcntl(fd, libc::F_GETFL);
|
||||
if flags < 0 || libc::fcntl(fd, libc::F_SETFL, flags | libc::O_NONBLOCK) < 0 {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
// Capped so a descendant that keeps writing cannot spin this read forever.
|
||||
const CAP: usize = 64 * 1024;
|
||||
let mut out = Vec::new();
|
||||
let mut buf = [0u8; 4096];
|
||||
loop {
|
||||
match pipe.read(&mut buf) {
|
||||
Ok(0) => break, // EOF: the write end is fully closed
|
||||
Ok(n) => {
|
||||
out.extend_from_slice(&buf[..n]);
|
||||
if out.len() >= CAP {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Err(err) if err.kind() == std::io::ErrorKind::Interrupted => continue,
|
||||
// WouldBlock: what is buffered is drained (a descendant may still hold the writer).
|
||||
// Any other error: stop with what we have.
|
||||
Err(_) => break,
|
||||
}
|
||||
}
|
||||
Some(String::from_utf8_lossy(&out).into_owned())
|
||||
}
|
||||
|
||||
/// The first line the child buffered, for the timeout latch decision. `Some(None)` is an
|
||||
/// inspected-but-empty buffer (genuine absence of the handshake); outer `None` is uninspectable.
|
||||
fn first_buffered_line(pipe: Option<std::process::ChildStdout>) -> Option<Option<String>> {
|
||||
drain_nonblocking(pipe).map(|s| s.lines().next().map(str::to_owned))
|
||||
}
|
||||
|
||||
fn probe_runtime_dir(dir: &Path) -> ResultType<Vec<WaylandDisplayInfo>> {
|
||||
use std::os::unix::net::UnixStream;
|
||||
let mut errs = Vec::new();
|
||||
for path in wayland_sockets_in(dir) {
|
||||
match UnixStream::connect(&path)
|
||||
.map_err(anyhow::Error::from)
|
||||
.and_then(|s| Connection::from_socket(s).map_err(anyhow::Error::from))
|
||||
.and_then(|conn| collect_wayland_displays(&conn))
|
||||
{
|
||||
// The caller caches an empty list as ground truth for the process lifetime, and a
|
||||
// compositor still probing its monitors is exactly what this path connects to.
|
||||
Ok(displays) if displays.is_empty() => {
|
||||
errs.push(format!("{}: no outputs yet", path.display()))
|
||||
}
|
||||
Ok(displays) => {
|
||||
// Which socket answered, when nothing in the environment named one.
|
||||
log::debug!(
|
||||
"wayland: {} output(s) from {}, found by scanning",
|
||||
displays.len(),
|
||||
path.display()
|
||||
);
|
||||
return Ok(displays);
|
||||
}
|
||||
Err(err) => errs.push(format!("{}: {err}", path.display())),
|
||||
}
|
||||
}
|
||||
bail!(
|
||||
"no usable wayland socket in {} ({})",
|
||||
dir.display(),
|
||||
if errs.is_empty() {
|
||||
"none present".to_owned()
|
||||
} else {
|
||||
errs.join("; ")
|
||||
}
|
||||
)
|
||||
}
|
||||
55
libs/base/src/platform/macos.rs
Normal file
55
libs/base/src/platform/macos.rs
Normal file
@@ -0,0 +1,55 @@
|
||||
use hbb_common::ResultType;
|
||||
use osascript;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct AlertParams {
|
||||
title: String,
|
||||
message: String,
|
||||
alert_type: String,
|
||||
buttons: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct AlertResult {
|
||||
#[serde(rename = "buttonReturned")]
|
||||
button: String,
|
||||
}
|
||||
|
||||
/// Firstly run the specified app, then alert a dialog. Return the clicked button value.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `app` - The app to execute the script.
|
||||
/// * `alert_type` - Alert type. . informational, warning, critical
|
||||
/// * `title` - The alert title.
|
||||
/// * `message` - The alert message.
|
||||
/// * `buttons` - The buttons to show.
|
||||
pub fn alert(
|
||||
app: String,
|
||||
alert_type: String,
|
||||
title: String,
|
||||
message: String,
|
||||
buttons: Vec<String>,
|
||||
) -> ResultType<String> {
|
||||
let script = osascript::JavaScript::new(&format!(
|
||||
"
|
||||
var App = Application('{}');
|
||||
App.includeStandardAdditions = true;
|
||||
return App.displayAlert($params.title, {{
|
||||
message: $params.message,
|
||||
'as': $params.alert_type,
|
||||
buttons: $params.buttons,
|
||||
}});
|
||||
",
|
||||
app
|
||||
));
|
||||
|
||||
let result: AlertResult = script.execute_with_params(AlertParams {
|
||||
title,
|
||||
message,
|
||||
alert_type,
|
||||
buttons,
|
||||
})?;
|
||||
Ok(result.button)
|
||||
}
|
||||
82
libs/base/src/platform/mod.rs
Normal file
82
libs/base/src/platform/mod.rs
Normal file
@@ -0,0 +1,82 @@
|
||||
#[cfg(target_os = "linux")]
|
||||
pub mod linux;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod macos;
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
pub mod windows;
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
use hbb_common::{config::Config, log};
|
||||
#[cfg(not(debug_assertions))]
|
||||
use std::process::exit;
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
static mut GLOBAL_CALLBACK: Option<Box<dyn Fn()>> = None;
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
extern "C" fn breakdown_signal_handler(sig: i32) {
|
||||
let mut stack = vec![];
|
||||
backtrace::trace(|frame| {
|
||||
backtrace::resolve_frame(frame, |symbol| {
|
||||
if let Some(name) = symbol.name() {
|
||||
stack.push(name.to_string());
|
||||
}
|
||||
});
|
||||
true // keep going to the next frame
|
||||
});
|
||||
let mut info = String::default();
|
||||
if stack.iter().any(|s| {
|
||||
s.contains(&"nouveau_pushbuf_kick")
|
||||
|| s.to_lowercase().contains("nvidia")
|
||||
|| s.contains("gdk_window_end_draw_frame")
|
||||
|| s.contains("glGetString")
|
||||
}) {
|
||||
Config::set_option("allow-always-software-render".to_string(), "Y".to_string());
|
||||
info = "Always use software rendering will be set.".to_string();
|
||||
log::info!("{}", info);
|
||||
}
|
||||
if stack.iter().any(|s| {
|
||||
s.to_lowercase().contains("nvidia")
|
||||
|| s.to_lowercase().contains("amf")
|
||||
|| s.to_lowercase().contains("mfx")
|
||||
|| s.contains("cuProfilerStop")
|
||||
}) {
|
||||
Config::set_option("enable-hwcodec".to_string(), "N".to_string());
|
||||
info = "Perhaps hwcodec causing the crash, disable it first".to_string();
|
||||
log::info!("{}", info);
|
||||
}
|
||||
log::error!(
|
||||
"Got signal {} and exit. stack:\n{}",
|
||||
sig,
|
||||
stack.join("\n").to_string()
|
||||
);
|
||||
if !info.is_empty() {
|
||||
#[cfg(target_os = "linux")]
|
||||
linux::system_message(
|
||||
"RustDesk",
|
||||
&format!("Got signal {} and exit.{}", sig, info),
|
||||
true,
|
||||
)
|
||||
.ok();
|
||||
}
|
||||
unsafe {
|
||||
#[allow(static_mut_refs)]
|
||||
if let Some(callback) = &GLOBAL_CALLBACK {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
pub fn register_breakdown_handler<T>(callback: T)
|
||||
where
|
||||
T: Fn() + 'static,
|
||||
{
|
||||
unsafe {
|
||||
GLOBAL_CALLBACK = Some(Box::new(callback));
|
||||
libc::signal(libc::SIGSEGV, breakdown_signal_handler as _);
|
||||
}
|
||||
}
|
||||
198
libs/base/src/platform/windows.rs
Normal file
198
libs/base/src/platform/windows.rs
Normal file
@@ -0,0 +1,198 @@
|
||||
use std::{
|
||||
collections::VecDeque,
|
||||
sync::{Arc, Mutex},
|
||||
time::Instant,
|
||||
};
|
||||
use winapi::{
|
||||
shared::minwindef::{DWORD, FALSE, TRUE},
|
||||
um::{
|
||||
handleapi::CloseHandle,
|
||||
pdh::{
|
||||
PdhAddEnglishCounterA, PdhCloseQuery, PdhCollectQueryData, PdhCollectQueryDataEx,
|
||||
PdhGetFormattedCounterValue, PdhOpenQueryA, PDH_FMT_COUNTERVALUE, PDH_FMT_DOUBLE,
|
||||
PDH_HCOUNTER, PDH_HQUERY,
|
||||
},
|
||||
synchapi::{CreateEventA, WaitForSingleObject},
|
||||
sysinfoapi::VerSetConditionMask,
|
||||
winbase::{VerifyVersionInfoW, INFINITE, WAIT_OBJECT_0},
|
||||
winnt::{
|
||||
HANDLE, OSVERSIONINFOEXW, VER_BUILDNUMBER, VER_GREATER_EQUAL, VER_MAJORVERSION,
|
||||
VER_MINORVERSION, VER_SERVICEPACKMAJOR, VER_SERVICEPACKMINOR,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref CPU_USAGE_ONE_MINUTE: Arc<Mutex<Option<(f64, Instant)>>> = Arc::new(Mutex::new(None));
|
||||
}
|
||||
|
||||
// https://github.com/mgostIH/process_list/blob/master/src/windows/mod.rs
|
||||
#[repr(transparent)]
|
||||
pub struct RAIIHandle(pub HANDLE);
|
||||
|
||||
impl Drop for RAIIHandle {
|
||||
fn drop(&mut self) {
|
||||
// This never gives problem except when running under a debugger.
|
||||
unsafe { CloseHandle(self.0) };
|
||||
}
|
||||
}
|
||||
|
||||
#[repr(transparent)]
|
||||
pub(self) struct RAIIPDHQuery(pub PDH_HQUERY);
|
||||
|
||||
impl Drop for RAIIPDHQuery {
|
||||
fn drop(&mut self) {
|
||||
unsafe { PdhCloseQuery(self.0) };
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start_cpu_performance_monitor() {
|
||||
// Code from:
|
||||
// https://learn.microsoft.com/en-us/windows/win32/perfctrs/collecting-performance-data
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/pdh/nf-pdh-pdhcollectquerydataex
|
||||
// Why value lower than taskManager:
|
||||
// https://aaron-margosis.medium.com/task-managers-cpu-numbers-are-all-but-meaningless-2d165b421e43
|
||||
// Therefore we should compare with Precess Explorer rather than taskManager
|
||||
|
||||
let f = || unsafe {
|
||||
// load avg or cpu usage, test with prime95.
|
||||
// Prefer cpu usage because we can get accurate value from Precess Explorer.
|
||||
// const COUNTER_PATH: &'static str = "\\System\\Processor Queue Length\0";
|
||||
const COUNTER_PATH: &'static str = "\\Processor(_total)\\% Processor Time\0";
|
||||
const SAMPLE_INTERVAL: DWORD = 2; // 2 second
|
||||
|
||||
let mut ret;
|
||||
let mut query: PDH_HQUERY = std::mem::zeroed();
|
||||
ret = PdhOpenQueryA(std::ptr::null() as _, 0, &mut query);
|
||||
if ret != 0 {
|
||||
log::error!("PdhOpenQueryA failed: 0x{:X}", ret);
|
||||
return;
|
||||
}
|
||||
let _query = RAIIPDHQuery(query);
|
||||
let mut counter: PDH_HCOUNTER = std::mem::zeroed();
|
||||
ret = PdhAddEnglishCounterA(query, COUNTER_PATH.as_ptr() as _, 0, &mut counter);
|
||||
if ret != 0 {
|
||||
log::error!("PdhAddEnglishCounterA failed: 0x{:X}", ret);
|
||||
return;
|
||||
}
|
||||
ret = PdhCollectQueryData(query);
|
||||
if ret != 0 {
|
||||
log::error!("PdhCollectQueryData failed: 0x{:X}", ret);
|
||||
return;
|
||||
}
|
||||
let mut _counter_type: DWORD = 0;
|
||||
let mut counter_value: PDH_FMT_COUNTERVALUE = std::mem::zeroed();
|
||||
let event = CreateEventA(std::ptr::null_mut(), FALSE, FALSE, std::ptr::null() as _);
|
||||
if event.is_null() {
|
||||
log::error!("CreateEventA failed");
|
||||
return;
|
||||
}
|
||||
let _event: RAIIHandle = RAIIHandle(event);
|
||||
ret = PdhCollectQueryDataEx(query, SAMPLE_INTERVAL, event);
|
||||
if ret != 0 {
|
||||
log::error!("PdhCollectQueryDataEx failed: 0x{:X}", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
let mut queue: VecDeque<f64> = VecDeque::new();
|
||||
let mut recent_valid: VecDeque<bool> = VecDeque::new();
|
||||
loop {
|
||||
// latest one minute
|
||||
if queue.len() == 31 {
|
||||
queue.pop_front();
|
||||
}
|
||||
if recent_valid.len() == 31 {
|
||||
recent_valid.pop_front();
|
||||
}
|
||||
// allow get value within one minute
|
||||
if queue.len() > 0 && recent_valid.iter().filter(|v| **v).count() > queue.len() / 2 {
|
||||
let sum: f64 = queue.iter().map(|f| f.to_owned()).sum();
|
||||
let avg = sum / (queue.len() as f64);
|
||||
*CPU_USAGE_ONE_MINUTE.lock().unwrap() = Some((avg, Instant::now()));
|
||||
} else {
|
||||
*CPU_USAGE_ONE_MINUTE.lock().unwrap() = None;
|
||||
}
|
||||
if WAIT_OBJECT_0 != WaitForSingleObject(event, INFINITE) {
|
||||
recent_valid.push_back(false);
|
||||
continue;
|
||||
}
|
||||
if PdhGetFormattedCounterValue(
|
||||
counter,
|
||||
PDH_FMT_DOUBLE,
|
||||
&mut _counter_type,
|
||||
&mut counter_value,
|
||||
) != 0
|
||||
|| counter_value.CStatus != 0
|
||||
{
|
||||
recent_valid.push_back(false);
|
||||
continue;
|
||||
}
|
||||
queue.push_back(counter_value.u.doubleValue().clone());
|
||||
recent_valid.push_back(true);
|
||||
}
|
||||
};
|
||||
use std::sync::Once;
|
||||
static ONCE: Once = Once::new();
|
||||
ONCE.call_once(|| {
|
||||
std::thread::spawn(f);
|
||||
});
|
||||
}
|
||||
|
||||
pub fn cpu_uage_one_minute() -> Option<f64> {
|
||||
let v = CPU_USAGE_ONE_MINUTE.lock().unwrap().clone();
|
||||
if let Some((v, instant)) = v {
|
||||
if instant.elapsed().as_secs() < 30 {
|
||||
return Some(v);
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub fn sync_cpu_usage(cpu_usage: Option<f64>) {
|
||||
let v = match cpu_usage {
|
||||
Some(cpu_usage) => Some((cpu_usage, Instant::now())),
|
||||
None => None,
|
||||
};
|
||||
*CPU_USAGE_ONE_MINUTE.lock().unwrap() = v;
|
||||
log::info!("cpu usage synced: {:?}", cpu_usage);
|
||||
}
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
|
||||
// https://github.com/nodejs/node-convergence-archive/blob/e11fe0c2777561827cdb7207d46b0917ef3c42a7/deps/uv/src/win/util.c#L780
|
||||
pub fn is_windows_version_or_greater(
|
||||
os_major: u32,
|
||||
os_minor: u32,
|
||||
build_number: u32,
|
||||
service_pack_major: u32,
|
||||
service_pack_minor: u32,
|
||||
) -> bool {
|
||||
let mut osvi: OSVERSIONINFOEXW = unsafe { std::mem::zeroed() };
|
||||
osvi.dwOSVersionInfoSize = std::mem::size_of::<OSVERSIONINFOEXW>() as DWORD;
|
||||
osvi.dwMajorVersion = os_major as _;
|
||||
osvi.dwMinorVersion = os_minor as _;
|
||||
osvi.dwBuildNumber = build_number as _;
|
||||
osvi.wServicePackMajor = service_pack_major as _;
|
||||
osvi.wServicePackMinor = service_pack_minor as _;
|
||||
|
||||
let result = unsafe {
|
||||
let mut condition_mask = 0;
|
||||
let op = VER_GREATER_EQUAL;
|
||||
condition_mask = VerSetConditionMask(condition_mask, VER_MAJORVERSION, op);
|
||||
condition_mask = VerSetConditionMask(condition_mask, VER_MINORVERSION, op);
|
||||
condition_mask = VerSetConditionMask(condition_mask, VER_BUILDNUMBER, op);
|
||||
condition_mask = VerSetConditionMask(condition_mask, VER_SERVICEPACKMAJOR, op);
|
||||
condition_mask = VerSetConditionMask(condition_mask, VER_SERVICEPACKMINOR, op);
|
||||
|
||||
VerifyVersionInfoW(
|
||||
&mut osvi as *mut OSVERSIONINFOEXW,
|
||||
VER_MAJORVERSION
|
||||
| VER_MINORVERSION
|
||||
| VER_BUILDNUMBER
|
||||
| VER_SERVICEPACKMAJOR
|
||||
| VER_SERVICEPACKMINOR,
|
||||
condition_mask,
|
||||
)
|
||||
};
|
||||
|
||||
result == TRUE
|
||||
}
|
||||
1
libs/base/src/protos/mod.rs
Normal file
1
libs/base/src/protos/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/protos/mod.rs"));
|
||||
@@ -30,6 +30,7 @@ lazy_static = "1.4"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
hbb_common = { path = "../hbb_common" }
|
||||
base = { path = "../base" }
|
||||
parking_lot = {version = "0.12"}
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
|
||||
|
||||
@@ -60,10 +60,8 @@ pub(super) fn validate_file_name(name: &str) -> Result<(), CliprdrError> {
|
||||
description: "clipboard file name is not a normalized relative path".to_string(),
|
||||
});
|
||||
}
|
||||
hbb_common::fs::validate_file_name_no_traversal(name).map_err(|error| {
|
||||
CliprdrError::InvalidRequest {
|
||||
description: error.to_string(),
|
||||
}
|
||||
base::fs::validate_file_name_no_traversal(name).map_err(|error| CliprdrError::InvalidRequest {
|
||||
description: error.to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ use crate::{
|
||||
platform::unix::{FileDescription, FileType, BLOCK_SIZE},
|
||||
send_data, ClipboardFile, CliprdrError, ProgressPercent,
|
||||
};
|
||||
use hbb_common::{allow_err, fs::join_validated_path, log, tokio::time::Instant};
|
||||
use base::fs::join_validated_path;
|
||||
use hbb_common::{allow_err, log, tokio::time::Instant};
|
||||
use std::{
|
||||
cmp::min,
|
||||
fs::{File, FileTimes, OpenOptions},
|
||||
|
||||
@@ -25,6 +25,7 @@ log = "0.4"
|
||||
rdev = { git = "https://github.com/rustdesk-org/rdev" }
|
||||
tfc = { git = "https://github.com/rustdesk-org/The-Fat-Controller", branch = "history/rebase_upstream_20240722" }
|
||||
hbb_common = { path = "../hbb_common" }
|
||||
base = { path = "../base" }
|
||||
|
||||
[features]
|
||||
with_serde = ["serde", "serde_derive"]
|
||||
|
||||
@@ -122,7 +122,7 @@ impl Enigo {
|
||||
|
||||
impl Default for Enigo {
|
||||
fn default() -> Self {
|
||||
let is_x11 = hbb_common::platform::linux::is_x11_or_headless();
|
||||
let is_x11 = base::platform::linux::is_x11_or_headless();
|
||||
Self {
|
||||
is_x11,
|
||||
tfc: if is_x11 {
|
||||
|
||||
Submodule libs/hbb_common updated: 05ed68fed8...29cf7cbe4d
@@ -20,7 +20,7 @@ wayland = ["gstreamer", "gstreamer-app", "gstreamer-video", "dbus", "tracing", "
|
||||
# Depends on `wayland`: the three drm modules live inside the `#[cfg(feature = "wayland")]` arm of
|
||||
# common/mod.rs, so `scrap/drm` on its own would compile nothing. The root crate happens to always
|
||||
# enable `scrap/wayland`, which is what hid this.
|
||||
drm = ["wayland", "hbb_common/wayland_probe"]
|
||||
drm = ["wayland", "base/wayland_probe"]
|
||||
mediacodec = ["ndk"]
|
||||
linux-pkg-config = ["dep:pkg-config"]
|
||||
hwcodec = ["dep:hwcodec"]
|
||||
@@ -31,6 +31,7 @@ cfg-if = "1.0"
|
||||
num_cpus = "1.15"
|
||||
lazy_static = "1.4"
|
||||
hbb_common = { path = "../hbb_common" }
|
||||
base = { path = "../base" }
|
||||
webm = { git = "https://github.com/rustdesk-org/rust-webm" }
|
||||
serde = {version="1.0", features=["derive"]}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ fn test_vpx(
|
||||
println!(
|
||||
"{:?} encode: {:?}, {} byte",
|
||||
codec_id,
|
||||
time_sum / yuv_count as _,
|
||||
time_sum / yuv_count as u32,
|
||||
size / yuv_count
|
||||
);
|
||||
|
||||
@@ -156,7 +156,7 @@ fn test_vpx(
|
||||
println!(
|
||||
"{:?} decode: {:?}",
|
||||
codec_id,
|
||||
start.elapsed() / yuv_count as _
|
||||
start.elapsed() / yuv_count as u32
|
||||
);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ fn test_av1(
|
||||
assert_eq!(av1s.len(), yuv_count);
|
||||
println!(
|
||||
"AV1 encode: {:?}, {} byte",
|
||||
time_sum / yuv_count as _,
|
||||
time_sum / yuv_count as u32,
|
||||
size / yuv_count
|
||||
);
|
||||
let mut decoder = AomDecoder::new().unwrap();
|
||||
@@ -221,7 +221,7 @@ fn test_av1(
|
||||
let _ = decoder.decode(&av1);
|
||||
let _ = decoder.flush();
|
||||
}
|
||||
println!("AV1 decode: {:?}", start.elapsed() / yuv_count as _);
|
||||
println!("AV1 decode: {:?}", start.elapsed() / yuv_count as u32);
|
||||
}
|
||||
|
||||
#[cfg(feature = "hwcodec")]
|
||||
|
||||
@@ -9,7 +9,8 @@ use jni::{
|
||||
JavaVM,
|
||||
};
|
||||
|
||||
use hbb_common::{message_proto::MultiClipboards, protobuf::Message};
|
||||
use base::message_proto::MultiClipboards;
|
||||
use hbb_common::protobuf::Message;
|
||||
use jni::errors::{Error as JniError, Result as JniResult};
|
||||
use lazy_static::lazy_static;
|
||||
use serde::Deserialize;
|
||||
|
||||
@@ -13,10 +13,9 @@ use crate::{EncodeInput, EncodeYuvFormat, Pixfmt};
|
||||
use hbb_common::{
|
||||
anyhow::{anyhow, Context},
|
||||
bytes::Bytes,
|
||||
log,
|
||||
message_proto::{Chroma, EncodedVideoFrame, EncodedVideoFrames, VideoFrame},
|
||||
ResultType,
|
||||
log, ResultType,
|
||||
};
|
||||
use base::message_proto::{Chroma, EncodedVideoFrame, EncodedVideoFrames, VideoFrame};
|
||||
use std::{ptr, slice};
|
||||
|
||||
generate_call_macro!(call_aom, false);
|
||||
|
||||
@@ -11,7 +11,7 @@ use nokhwa::{
|
||||
Camera,
|
||||
};
|
||||
|
||||
use hbb_common::message_proto::{DisplayInfo, Resolution};
|
||||
use base::message_proto::{DisplayInfo, Resolution};
|
||||
|
||||
#[cfg(feature = "vram")]
|
||||
use crate::AdapterDevice;
|
||||
|
||||
@@ -18,6 +18,10 @@ use crate::{
|
||||
CodecFormat, EncodeInput, EncodeYuvFormat, ImageRgb, ImageTexture,
|
||||
};
|
||||
|
||||
use base::message_proto::{
|
||||
supported_decoding::PreferCodec, video_frame, Chroma, CodecAbility, EncodedVideoFrames,
|
||||
SupportedDecoding, SupportedEncoding, VideoFrame,
|
||||
};
|
||||
#[cfg(any(
|
||||
feature = "hwcodec",
|
||||
feature = "mediacodec",
|
||||
@@ -30,10 +34,6 @@ use hbb_common::{
|
||||
bail,
|
||||
config::{Config, PeerConfig},
|
||||
lazy_static, log,
|
||||
message_proto::{
|
||||
supported_decoding::PreferCodec, video_frame, Chroma, CodecAbility, EncodedVideoFrames,
|
||||
SupportedDecoding, SupportedEncoding, VideoFrame,
|
||||
},
|
||||
sysinfo::System,
|
||||
ResultType,
|
||||
};
|
||||
@@ -269,7 +269,7 @@ impl Encoder {
|
||||
let preference = most_frequent.enum_value_or(PreferCodec::Auto);
|
||||
|
||||
// auto: h265 > h264 > av1/vp9/vp8
|
||||
let av1_test = Config::get_option(hbb_common::config::keys::OPTION_AV1_TEST) != "N";
|
||||
let av1_test = Config::get_option(base::config::keys::OPTION_AV1_TEST) != "N";
|
||||
let mut auto_codec = if av1_useable && av1_test {
|
||||
CodecFormat::AV1
|
||||
} else {
|
||||
@@ -849,7 +849,7 @@ impl Decoder {
|
||||
|
||||
#[cfg(any(feature = "hwcodec", feature = "mediacodec"))]
|
||||
pub fn enable_hwcodec_option() -> bool {
|
||||
use hbb_common::config::keys::OPTION_ENABLE_HWCODEC;
|
||||
use base::config::keys::OPTION_ENABLE_HWCODEC;
|
||||
|
||||
if !cfg!(target_os = "ios") {
|
||||
return option2bool(
|
||||
@@ -861,7 +861,7 @@ pub fn enable_hwcodec_option() -> bool {
|
||||
}
|
||||
#[cfg(feature = "vram")]
|
||||
pub fn enable_vram_option(encode: bool) -> bool {
|
||||
use hbb_common::config::keys::OPTION_ENABLE_HWCODEC;
|
||||
use base::config::keys::OPTION_ENABLE_HWCODEC;
|
||||
|
||||
if cfg!(windows) {
|
||||
let enable = option2bool(
|
||||
@@ -880,13 +880,13 @@ pub fn enable_vram_option(encode: bool) -> bool {
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn enable_directx_capture() -> bool {
|
||||
use hbb_common::config::keys::OPTION_ENABLE_DIRECTX_CAPTURE as OPTION;
|
||||
use base::config::keys::OPTION_ENABLE_DIRECTX_CAPTURE as OPTION;
|
||||
option2bool(OPTION, &Config::get_option(OPTION))
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
pub fn allow_d3d_render() -> bool {
|
||||
use hbb_common::config::keys::OPTION_ALLOW_D3D_RENDER as OPTION;
|
||||
use base::config::keys::OPTION_ALLOW_D3D_RENDER as OPTION;
|
||||
option2bool(OPTION, &hbb_common::config::LocalConfig::get_option(OPTION))
|
||||
}
|
||||
|
||||
@@ -980,7 +980,7 @@ pub fn codec_thread_num(limit: usize) -> usize {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
res = 0;
|
||||
let percent = hbb_common::platform::windows::cpu_uage_one_minute();
|
||||
let percent = base::platform::windows::cpu_uage_one_minute();
|
||||
info = format!("cpu usage: {:?}", percent);
|
||||
if let Some(pecent) = percent {
|
||||
if pecent < 100.0 {
|
||||
@@ -1038,7 +1038,7 @@ fn disable_av1() -> bool {
|
||||
|
||||
#[cfg(not(target_os = "ios"))]
|
||||
pub fn test_av1() {
|
||||
use hbb_common::config::keys::OPTION_AV1_TEST;
|
||||
use base::config::keys::OPTION_AV1_TEST;
|
||||
use hbb_common::rand::Rng;
|
||||
use std::{sync::Once, time::Duration};
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ use crate::{
|
||||
convert::*,
|
||||
CodecFormat, EncodeInput, ImageFormat, ImageRgb, Pixfmt, HW_STRIDE_ALIGN,
|
||||
};
|
||||
use base::message_proto::{EncodedVideoFrame, EncodedVideoFrames, VideoFrame};
|
||||
use hbb_common::{
|
||||
anyhow::{anyhow, bail, Context},
|
||||
bytes::Bytes,
|
||||
log,
|
||||
message_proto::{EncodedVideoFrame, EncodedVideoFrames, VideoFrame},
|
||||
serde_derive::{Deserialize, Serialize},
|
||||
serde_json, ResultType,
|
||||
};
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
pub use self::vpxcodec::*;
|
||||
use hbb_common::{
|
||||
bail, log,
|
||||
message_proto::{video_frame, Chroma, VideoFrame},
|
||||
ResultType,
|
||||
};
|
||||
use base::message_proto::{video_frame, Chroma, VideoFrame};
|
||||
use hbb_common::{bail, log, ResultType};
|
||||
use std::{ffi::c_void, slice};
|
||||
|
||||
cfg_if! {
|
||||
@@ -268,7 +265,7 @@ pub struct EncodeYuvFormat {
|
||||
#[cfg(x11)]
|
||||
#[inline]
|
||||
pub fn is_x11() -> bool {
|
||||
hbb_common::platform::linux::is_x11_or_headless()
|
||||
base::platform::linux::is_x11_or_headless()
|
||||
}
|
||||
|
||||
#[cfg(x11)]
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
use crate::CodecFormat;
|
||||
use base::message_proto::{message, video_frame, EncodedVideoFrame, Message};
|
||||
#[cfg(feature = "hwcodec")]
|
||||
use hbb_common::anyhow::anyhow;
|
||||
use hbb_common::{
|
||||
bail, chrono, log,
|
||||
message_proto::{message, video_frame, EncodedVideoFrame, Message},
|
||||
ResultType,
|
||||
};
|
||||
use hbb_common::{bail, chrono, log, ResultType};
|
||||
#[cfg(feature = "hwcodec")]
|
||||
use hwcodec::mux::{MuxContext, Muxer};
|
||||
use std::{
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
use hbb_common::anyhow::{anyhow, Context};
|
||||
use hbb_common::log;
|
||||
use hbb_common::message_proto::{Chroma, EncodedVideoFrame, EncodedVideoFrames, VideoFrame};
|
||||
use hbb_common::ResultType;
|
||||
use base::message_proto::{Chroma, EncodedVideoFrame, EncodedVideoFrames, VideoFrame};
|
||||
|
||||
use crate::codec::{base_bitrate, codec_thread_num, EncoderApi};
|
||||
use crate::{EncodeInput, EncodeYuvFormat, GoogleImage, Pixfmt, STRIDE_ALIGN};
|
||||
|
||||
@@ -9,12 +9,11 @@ use crate::{
|
||||
hwcodec::HwCodecConfig,
|
||||
AdapterDevice, CodecFormat, EncodeInput, EncodeYuvFormat, Pixfmt,
|
||||
};
|
||||
use base::message_proto::{EncodedVideoFrame, EncodedVideoFrames, VideoFrame};
|
||||
use hbb_common::{
|
||||
anyhow::{anyhow, bail, Context},
|
||||
bytes::Bytes,
|
||||
log,
|
||||
message_proto::{EncodedVideoFrame, EncodedVideoFrames, VideoFrame},
|
||||
ResultType,
|
||||
log, ResultType,
|
||||
};
|
||||
use hwcodec::{
|
||||
common::{DataFormat, Driver, MAX_GOP},
|
||||
@@ -98,7 +97,7 @@ impl EncoderApi for VRamEncoder {
|
||||
&mut self,
|
||||
frame: EncodeInput,
|
||||
ms: i64,
|
||||
) -> ResultType<hbb_common::message_proto::VideoFrame> {
|
||||
) -> ResultType<base::message_proto::VideoFrame> {
|
||||
let (texture, rotation) = frame.texture()?;
|
||||
if rotation != 0 {
|
||||
// to-do: support rotation
|
||||
|
||||
@@ -8,7 +8,7 @@ use std::{
|
||||
};
|
||||
use tracing::warn;
|
||||
|
||||
use hbb_common::platform::linux::{get_wayland_displays, WaylandDisplayInfo};
|
||||
use base::platform::linux::{get_wayland_displays, WaylandDisplayInfo};
|
||||
|
||||
lazy_static! {
|
||||
static ref DISPLAYS: Mutex<Option<Arc<Displays>>> = Mutex::new(None);
|
||||
@@ -105,7 +105,7 @@ fn try_xrandr_primary() -> Option<String> {
|
||||
}
|
||||
|
||||
fn try_kscreen_primary() -> Option<String> {
|
||||
if !hbb_common::platform::linux::is_kde_session() {
|
||||
if !base::platform::linux::is_kde_session() {
|
||||
return None;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ use gstreamer_app::AppSink;
|
||||
use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use hbb_common::{bail, config, platform::linux::CMD_SH, serde_json, tokio, ResultType};
|
||||
use base::platform::linux::CMD_SH;
|
||||
use hbb_common::{anyhow::anyhow, bail, config, serde_json, tokio, ResultType};
|
||||
|
||||
use super::capturable::PixelProvider;
|
||||
use super::capturable::{Capturable, Recorder};
|
||||
@@ -263,11 +264,21 @@ pub struct PipeWireRecorder {
|
||||
saved_raw_data: Vec<u8>, // for faster compare and copy
|
||||
}
|
||||
|
||||
// Element creation fails the same way for a plugin that is not installed as for one that is
|
||||
// broken, so the tag does not claim which. Only the name travels to the peer -- it is what
|
||||
// says which package to look at -- and the factory's own error stays here in the log.
|
||||
fn gst_element(name: &str) -> ResultType<gst::Element> {
|
||||
gst::ElementFactory::make(name, None).map_err(|e| {
|
||||
error!("Failed to create GStreamer element {}: {}", name, e);
|
||||
anyhow!(stage_err("gst-plugin", "unavailable", name))
|
||||
})
|
||||
}
|
||||
|
||||
impl PipeWireRecorder {
|
||||
pub fn new(capturable: PipeWireCapturable) -> ResultType<Self> {
|
||||
let pipeline = gst::Pipeline::new(None);
|
||||
|
||||
let src = gst::ElementFactory::make("pipewiresrc", None)?;
|
||||
let src = gst_element("pipewiresrc")?;
|
||||
src.set_property("fd", &capturable.fd.as_raw_fd())?;
|
||||
src.set_property("path", &format!("{}", capturable.path))?;
|
||||
src.set_property("keepalive_time", &1_000.as_raw_fd())?;
|
||||
@@ -282,9 +293,9 @@ impl PipeWireRecorder {
|
||||
// "no more output formats" / not-negotiated (-4). videoconvert accepts any
|
||||
// system-memory video/x-raw format, widening negotiation so the portal can
|
||||
// settle on a format it can deliver via its SHM path.
|
||||
let convert = gst::ElementFactory::make("videoconvert", None)?;
|
||||
let convert = gst_element("videoconvert")?;
|
||||
|
||||
let sink = gst::ElementFactory::make("appsink", None)?;
|
||||
let sink = gst_element("appsink")?;
|
||||
sink.set_property("drop", &true)?;
|
||||
sink.set_property("max-buffers", &1u32)?;
|
||||
|
||||
@@ -463,11 +474,125 @@ impl Drop for PipeWireRecorder {
|
||||
}
|
||||
}
|
||||
|
||||
// The portal handshake is four sequential requests whose outcomes arrive as asynchronous
|
||||
// `Response` signals, so where and why it failed is known only inside the signal handler.
|
||||
// Recording it here, instead of collapsing every outcome into one `failed` flag, is what lets
|
||||
// the app side name the real cause rather than guess it from the error text.
|
||||
#[derive(Clone, Copy)]
|
||||
enum PortalStage {
|
||||
CreateSession = 1,
|
||||
SelectDevices = 2,
|
||||
SelectSources = 3,
|
||||
Start = 4,
|
||||
OpenPipeWireRemote = 5,
|
||||
}
|
||||
|
||||
impl PortalStage {
|
||||
fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
Self::CreateSession => "create-session",
|
||||
Self::SelectDevices => "select-devices",
|
||||
Self::SelectSources => "select-sources",
|
||||
Self::Start => "start",
|
||||
Self::OpenPipeWireRemote => "open-pipewire-remote",
|
||||
}
|
||||
}
|
||||
|
||||
fn from_u8(v: u8) -> Self {
|
||||
match v {
|
||||
2 => Self::SelectDevices,
|
||||
3 => Self::SelectSources,
|
||||
4 => Self::Start,
|
||||
5 => Self::OpenPipeWireRemote,
|
||||
_ => Self::CreateSession,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// `wl-stage:<stage>:<kind>:<detail>`, parsed by `map_err_scrap` on the app side. The detail
|
||||
// reaches the user through a `{}` placeholder in a translated string, so it must not bring
|
||||
// braces, control characters or unbounded length of its own.
|
||||
const STAGE_TAG: &str = "wl-stage:";
|
||||
|
||||
fn stage_err(stage: &str, kind: &str, detail: &str) -> String {
|
||||
let detail: String = detail
|
||||
.chars()
|
||||
.map(|c| if c.is_control() { ' ' } else { c })
|
||||
.filter(|c| *c != '{' && *c != '}')
|
||||
.take(200)
|
||||
.collect();
|
||||
format!("{}{}:{}:{}", STAGE_TAG, stage, kind, detail.trim())
|
||||
}
|
||||
|
||||
// The name alone is usually the generic `org.freedesktop.DBus.Error.Failed`; the message is
|
||||
// where a backend says what it objected to. This ends up in the log, so carry both.
|
||||
fn dbus_stage_err(stage: &str, err: &dbus::Error) -> String {
|
||||
let detail = match (err.name(), err.message()) {
|
||||
(Some(name), Some(message)) if !name.is_empty() && !message.is_empty() => {
|
||||
format!("{}: {}", name, message)
|
||||
}
|
||||
(Some(name), _) if !name.is_empty() => name.to_owned(),
|
||||
(_, message) => message.unwrap_or_default().to_owned(),
|
||||
};
|
||||
let kind = match err.name().unwrap_or_default() {
|
||||
"org.freedesktop.DBus.Error.UnknownMethod"
|
||||
| "org.freedesktop.DBus.Error.UnknownInterface" => "unsupported",
|
||||
_ => "dbus",
|
||||
};
|
||||
stage_err(stage, kind, &detail)
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
struct PortalTrace {
|
||||
failed: Arc<AtomicBool>,
|
||||
reason: Arc<Mutex<Option<String>>>,
|
||||
// The stage whose `Response` we are still waiting for, so the polling loop can tell a
|
||||
// non-interactive step apart from the one that waits for a human.
|
||||
waiting_for: Arc<AtomicU8>,
|
||||
}
|
||||
|
||||
impl PortalTrace {
|
||||
fn new() -> Self {
|
||||
Self {
|
||||
failed: Arc::new(AtomicBool::new(false)),
|
||||
reason: Arc::new(Mutex::new(None)),
|
||||
waiting_for: Arc::new(AtomicU8::new(PortalStage::CreateSession as u8)),
|
||||
}
|
||||
}
|
||||
|
||||
fn fail(&self, stage: PortalStage, kind: &str, detail: &str) {
|
||||
self.record(stage_err(stage.as_str(), kind, detail));
|
||||
self.failed.store(true, Ordering::SeqCst);
|
||||
}
|
||||
|
||||
// The first failure is the cause; whatever follows it is a consequence.
|
||||
fn record(&self, tag: String) {
|
||||
if let Ok(mut reason) = self.reason.lock() {
|
||||
if reason.is_none() {
|
||||
*reason = Some(tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn waiting(&self, stage: PortalStage) {
|
||||
self.waiting_for.store(stage as u8, Ordering::SeqCst);
|
||||
}
|
||||
|
||||
fn waiting_stage(&self) -> PortalStage {
|
||||
PortalStage::from_u8(self.waiting_for.load(Ordering::SeqCst))
|
||||
}
|
||||
|
||||
fn take_reason(&self) -> Option<String> {
|
||||
self.reason.lock().ok().and_then(|mut r| r.take())
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_response<F>(
|
||||
conn: &SyncConnection,
|
||||
path: dbus::Path<'static>,
|
||||
mut f: F,
|
||||
failure_out: Arc<AtomicBool>,
|
||||
trace: PortalTrace,
|
||||
stage: PortalStage,
|
||||
) -> Result<dbus::channel::Token, dbus::Error>
|
||||
where
|
||||
F: FnMut(
|
||||
@@ -490,18 +615,29 @@ where
|
||||
0 => {}
|
||||
1 => {
|
||||
warn!("DBus response: User cancelled interaction.");
|
||||
failure_out.store(true, Ordering::SeqCst);
|
||||
trace.fail(stage, "declined", "");
|
||||
return true;
|
||||
}
|
||||
2 => {
|
||||
warn!("DBus response: User interaction ended in some other way.");
|
||||
trace.fail(stage, "ended", "");
|
||||
return true;
|
||||
}
|
||||
c => {
|
||||
warn!("DBus response: Unknown error, code: {}.", c);
|
||||
failure_out.store(true, Ordering::SeqCst);
|
||||
trace.fail(stage, "portal-error", &c.to_string());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if let Err(err) = f(r, c, m) {
|
||||
warn!("Error requesting screen capture via dbus: {}", err);
|
||||
failure_out.store(true, Ordering::SeqCst);
|
||||
let text = err.to_string();
|
||||
warn!("Error requesting screen capture via dbus: {}", text);
|
||||
if text.starts_with(STAGE_TAG) {
|
||||
trace.record(text);
|
||||
trace.failed.store(true, Ordering::SeqCst);
|
||||
} else {
|
||||
trace.fail(trace.waiting_stage(), "internal", &text);
|
||||
}
|
||||
}
|
||||
true
|
||||
})
|
||||
@@ -637,15 +773,16 @@ pub fn request_remote_desktop(
|
||||
INIT = true;
|
||||
}
|
||||
}
|
||||
let conn = SyncConnection::new_session()?;
|
||||
let conn =
|
||||
SyncConnection::new_session().map_err(|e| anyhow!(dbus_stage_err("session-bus", &e)))?;
|
||||
let portal = get_portal(&conn);
|
||||
let mut args: PropMap = HashMap::new();
|
||||
let fd: Arc<Mutex<Option<OwnedFd>>> = Arc::new(Mutex::new(None));
|
||||
let fd_res = fd.clone();
|
||||
let streams: Arc<Mutex<Vec<PwStreamInfo>>> = Arc::new(Mutex::new(Vec::new()));
|
||||
let streams_res = streams.clone();
|
||||
let failure = Arc::new(AtomicBool::new(false));
|
||||
let failure_res = failure.clone();
|
||||
let trace = PortalTrace::new();
|
||||
let trace_res = trace.clone();
|
||||
let session: Arc<Mutex<Option<dbus::Path>>> = Arc::new(Mutex::new(None));
|
||||
let session_res = session.clone();
|
||||
let create_session_handle_token = "u1";
|
||||
@@ -673,38 +810,45 @@ pub fn request_remote_desktop(
|
||||
// the caller to subscribe to the signal before making the method call.
|
||||
handle_response(
|
||||
&conn,
|
||||
get_request_path(&conn, create_session_handle_token)?,
|
||||
get_request_path(&conn, create_session_handle_token)
|
||||
.map_err(|e| anyhow!(dbus_stage_err("create-session", &e)))?,
|
||||
on_create_session_response(
|
||||
fd.clone(),
|
||||
streams.clone(),
|
||||
session.clone(),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
is_support_restore_token,
|
||||
capture_cursor,
|
||||
),
|
||||
failure_res.clone(),
|
||||
)?;
|
||||
trace.clone(),
|
||||
PortalStage::CreateSession,
|
||||
)
|
||||
.map_err(|e| anyhow!(dbus_stage_err("create-session", &e)))?;
|
||||
if is_server_running() {
|
||||
let _ = screencast_portal::create_session(&portal, args)?;
|
||||
let _ = screencast_portal::create_session(&portal, args)
|
||||
.map_err(|e| anyhow!(dbus_stage_err("create-session", &e)))?;
|
||||
} else {
|
||||
let _ = remote_desktop_portal::create_session(&portal, args)?;
|
||||
let _ = remote_desktop_portal::create_session(&portal, args)
|
||||
.map_err(|e| anyhow!(dbus_stage_err("create-session", &e)))?;
|
||||
}
|
||||
|
||||
// wait 3 minutes for user interaction
|
||||
for _ in 0..1800 {
|
||||
conn.process(Duration::from_millis(100))?;
|
||||
conn.process(Duration::from_millis(100))
|
||||
.map_err(|e| anyhow!(dbus_stage_err(trace_res.waiting_stage().as_str(), &e)))?;
|
||||
// Once we got a file descriptor we are done!
|
||||
if fd_res.lock().unwrap().is_some() {
|
||||
break;
|
||||
}
|
||||
|
||||
if failure_res.load(Ordering::SeqCst) {
|
||||
if trace_res.failed.load(Ordering::SeqCst) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
let fd_res = fd_res.lock().unwrap();
|
||||
let streams_res = streams_res.lock().unwrap();
|
||||
let session_res = session_res.lock().unwrap();
|
||||
let have_fd = fd_res.is_some();
|
||||
|
||||
if let Some(fd_res) = fd_res.clone() {
|
||||
if let Some(session) = session_res.clone() {
|
||||
@@ -719,14 +863,20 @@ pub fn request_remote_desktop(
|
||||
}
|
||||
}
|
||||
}
|
||||
bail!("Failed to obtain screen capture. You may need to upgrade the PipeWire library for better compatibility. Please check https://github.com/rustdesk/rustdesk/issues/8600#issuecomment-2254720954 for more details.")
|
||||
bail!(trace_res.take_reason().unwrap_or_else(|| {
|
||||
if have_fd {
|
||||
stage_err("streams", "empty", "")
|
||||
} else {
|
||||
stage_err(trace_res.waiting_stage().as_str(), "no-response", "")
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
fn on_create_session_response(
|
||||
fd: Arc<Mutex<Option<OwnedFd>>>,
|
||||
streams: Arc<Mutex<Vec<PwStreamInfo>>>,
|
||||
session: Arc<Mutex<Option<dbus::Path<'static>>>>,
|
||||
failure: Arc<AtomicBool>,
|
||||
trace: PortalTrace,
|
||||
is_support_restore_token: bool,
|
||||
capture_cursor: bool,
|
||||
) -> impl Fn(
|
||||
@@ -786,19 +936,23 @@ fn on_create_session_response(
|
||||
});
|
||||
}
|
||||
|
||||
trace.waiting(PortalStage::SelectSources);
|
||||
handle_response(
|
||||
c,
|
||||
get_request_path(c, select_sources_handle_token)?,
|
||||
on_select_sources_response(
|
||||
fd.clone(),
|
||||
streams.clone(),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
ses.clone(),
|
||||
is_support_restore_token,
|
||||
),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
PortalStage::SelectSources,
|
||||
)?;
|
||||
let _ = portal.select_sources(ses.clone(), args)?;
|
||||
let _ = portal
|
||||
.select_sources(ses.clone(), args)
|
||||
.map_err(|e| DBusError(dbus_stage_err("select-sources", &e)))?;
|
||||
} else {
|
||||
// TODO: support persist_mode for remote_desktop_portal
|
||||
// https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.RemoteDesktop.html
|
||||
@@ -810,19 +964,23 @@ fn on_create_session_response(
|
||||
);
|
||||
args.insert("types".to_string(), Variant(Box::new(7u32)));
|
||||
|
||||
trace.waiting(PortalStage::SelectDevices);
|
||||
handle_response(
|
||||
c,
|
||||
get_request_path(c, select_devices_handle_token)?,
|
||||
on_select_devices_response(
|
||||
fd.clone(),
|
||||
streams.clone(),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
ses.clone(),
|
||||
is_support_restore_token,
|
||||
),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
PortalStage::SelectDevices,
|
||||
)?;
|
||||
let _ = portal.select_devices(ses.clone(), args)?;
|
||||
let _ = portal
|
||||
.select_devices(ses.clone(), args)
|
||||
.map_err(|e| DBusError(dbus_stage_err("select-devices", &e)))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@@ -832,7 +990,7 @@ fn on_create_session_response(
|
||||
fn on_select_devices_response(
|
||||
fd: Arc<Mutex<Option<OwnedFd>>>,
|
||||
streams: Arc<Mutex<Vec<PwStreamInfo>>>,
|
||||
failure: Arc<AtomicBool>,
|
||||
trace: PortalTrace,
|
||||
session: dbus::Path<'static>,
|
||||
is_support_restore_token: bool,
|
||||
) -> impl Fn(
|
||||
@@ -855,19 +1013,23 @@ fn on_select_devices_response(
|
||||
args.insert("types".into(), Variant(Box::new(1u32))); //| 2u32)));
|
||||
|
||||
let session = session.clone();
|
||||
trace.waiting(PortalStage::SelectSources);
|
||||
handle_response(
|
||||
c,
|
||||
get_request_path(c, select_sources_handle_token)?,
|
||||
on_select_sources_response(
|
||||
fd.clone(),
|
||||
streams.clone(),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
session.clone(),
|
||||
is_support_restore_token,
|
||||
),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
PortalStage::SelectSources,
|
||||
)?;
|
||||
let _ = portal.select_sources(session.clone(), args)?;
|
||||
let _ = portal
|
||||
.select_sources(session.clone(), args)
|
||||
.map_err(|e| DBusError(dbus_stage_err("select-sources", &e)))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -876,7 +1038,7 @@ fn on_select_devices_response(
|
||||
fn on_select_sources_response(
|
||||
fd: Arc<Mutex<Option<OwnedFd>>>,
|
||||
streams: Arc<Mutex<Vec<PwStreamInfo>>>,
|
||||
failure: Arc<AtomicBool>,
|
||||
trace: PortalTrace,
|
||||
session: dbus::Path<'static>,
|
||||
is_support_restore_token: bool,
|
||||
) -> impl Fn(
|
||||
@@ -892,6 +1054,7 @@ fn on_select_sources_response(
|
||||
"handle_token".to_string(),
|
||||
Variant(Box::new(start_handle_token.to_string())),
|
||||
);
|
||||
trace.waiting(PortalStage::Start);
|
||||
handle_response(
|
||||
c,
|
||||
get_request_path(c, start_handle_token)?,
|
||||
@@ -899,14 +1062,18 @@ fn on_select_sources_response(
|
||||
fd.clone(),
|
||||
streams.clone(),
|
||||
session.clone(),
|
||||
trace.clone(),
|
||||
is_support_restore_token,
|
||||
),
|
||||
failure.clone(),
|
||||
trace.clone(),
|
||||
PortalStage::Start,
|
||||
)?;
|
||||
if is_server_running() {
|
||||
let _ = screencast_portal::start(&portal, session.clone(), "", args)?;
|
||||
let _ = screencast_portal::start(&portal, session.clone(), "", args)
|
||||
.map_err(|e| DBusError(dbus_stage_err("start", &e)))?;
|
||||
} else {
|
||||
let _ = remote_desktop_portal::start(&portal, session.clone(), "", args)?;
|
||||
let _ = remote_desktop_portal::start(&portal, session.clone(), "", args)
|
||||
.map_err(|e| DBusError(dbus_stage_err("start", &e)))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@@ -917,6 +1084,7 @@ fn on_start_response(
|
||||
fd: Arc<Mutex<Option<OwnedFd>>>,
|
||||
streams: Arc<Mutex<Vec<PwStreamInfo>>>,
|
||||
session: dbus::Path<'static>,
|
||||
trace: PortalTrace,
|
||||
is_support_restore_token: bool,
|
||||
) -> impl Fn(
|
||||
OrgFreedesktopPortalRequestResponse,
|
||||
@@ -944,10 +1112,14 @@ fn on_start_response(
|
||||
.lock()
|
||||
.unwrap()
|
||||
.append(&mut streams_from_response(r));
|
||||
fd.clone()
|
||||
.lock()
|
||||
.unwrap()
|
||||
.replace(portal.open_pipe_wire_remote(session.clone(), HashMap::new())?);
|
||||
// Past this point the user has granted the request; anything that fails now is the
|
||||
// hand-over of the PipeWire fd, which is a different thing to go looking at.
|
||||
trace.waiting(PortalStage::OpenPipeWireRemote);
|
||||
fd.clone().lock().unwrap().replace(
|
||||
portal
|
||||
.open_pipe_wire_remote(session.clone(), HashMap::new())
|
||||
.map_err(|e| DBusError(dbus_stage_err("open-pipewire-remote", &e)))?,
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -1554,3 +1726,29 @@ fn sort_streams(
|
||||
*streams = sorted_streams;
|
||||
*shared_displays = sorted_shared_displays;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::stage_err;
|
||||
|
||||
#[test]
|
||||
fn stage_err_keeps_the_detail_safe_for_a_placeholder() {
|
||||
assert_eq!(
|
||||
stage_err("start", "declined", ""),
|
||||
"wl-stage:start:declined:"
|
||||
);
|
||||
// Braces of its own would break the placeholder lookup on the peer.
|
||||
assert_eq!(
|
||||
stage_err("create-session", "dbus", "org.freedesktop.{Error}"),
|
||||
"wl-stage:create-session:dbus:org.freedesktop.Error"
|
||||
);
|
||||
assert_eq!(
|
||||
stage_err("select-sources", "internal", "one\ntwo"),
|
||||
"wl-stage:select-sources:internal:one two"
|
||||
);
|
||||
assert_eq!(
|
||||
stage_err("start", "internal", &"x".repeat(300)),
|
||||
format!("wl-stage:start:internal:{}", "x".repeat(200))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
242
src/audio_resampler.rs
Normal file
242
src/audio_resampler.rs
Normal file
@@ -0,0 +1,242 @@
|
||||
use hbb_common::thiserror;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod allocation_tests;
|
||||
|
||||
#[cfg(all(feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
mod sinc;
|
||||
|
||||
const INTERPOLATION_MARGIN_FRAMES: usize = 2;
|
||||
const PENDING_PACKET_CAPACITY: usize = 2;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub(crate) struct AudioResamplerConfig {
|
||||
pub input_rate: u32,
|
||||
pub output_rate: u32,
|
||||
pub channels: u16,
|
||||
}
|
||||
|
||||
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
|
||||
pub(crate) enum AudioResamplerError {
|
||||
#[error(
|
||||
"invalid audio resampler configuration: input_rate={}, output_rate={}, channels={}",
|
||||
.0.input_rate, .0.output_rate, .0.channels
|
||||
)]
|
||||
InvalidConfig(AudioResamplerConfig),
|
||||
#[error("invalid resampler output frame size: {output_frames}")]
|
||||
InvalidOutputFrameSize { output_frames: usize },
|
||||
#[error("audio resampler input length {samples} is not divisible by channel count {channels}")]
|
||||
IncompleteFrame { samples: usize, channels: usize },
|
||||
#[error("audio resampler output capacity overflow")]
|
||||
CapacityOverflow,
|
||||
#[cfg(all(feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
#[error("audio resampler backend failed: {0}")]
|
||||
Backend(String),
|
||||
}
|
||||
|
||||
pub(crate) struct FixedFrameAudioResampler {
|
||||
resampler: AudioResampler,
|
||||
output_samples: usize,
|
||||
pending_samples: Vec<f32>,
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
// SAFETY: libsamplerate's src_new state owns heap data and has no thread affinity.
|
||||
// This wrapper never exposes or shares that state; processing requires &mut self.
|
||||
unsafe impl Send for FixedFrameAudioResampler {}
|
||||
|
||||
impl FixedFrameAudioResampler {
|
||||
pub(crate) fn new(
|
||||
config: AudioResamplerConfig,
|
||||
output_frames: usize,
|
||||
) -> Result<Self, AudioResamplerError> {
|
||||
if output_frames == 0 {
|
||||
return Err(AudioResamplerError::InvalidOutputFrameSize { output_frames });
|
||||
}
|
||||
let channels = validate_config(config)?;
|
||||
let output_samples = output_frames
|
||||
.checked_mul(channels)
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)?;
|
||||
let input_frames = output_frames
|
||||
.checked_mul(config.input_rate as usize)
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)?
|
||||
.div_ceil(config.output_rate as usize);
|
||||
let capacity = output_samples
|
||||
.checked_mul(PENDING_PACKET_CAPACITY)
|
||||
.and_then(|samples| samples.checked_add(channels * INTERPOLATION_MARGIN_FRAMES))
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)?;
|
||||
let mut resampler = AudioResampler::new(config)?;
|
||||
resampler.reserve_input(input_frames)?;
|
||||
Ok(Self {
|
||||
resampler,
|
||||
output_samples,
|
||||
pending_samples: Vec::with_capacity(capacity),
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn process_with(
|
||||
&mut self,
|
||||
input: &[f32],
|
||||
mut on_packet: impl FnMut(&[f32]),
|
||||
) -> Result<(), AudioResamplerError> {
|
||||
self.resampler
|
||||
.process_into(input, &mut self.pending_samples)?;
|
||||
let complete_samples =
|
||||
self.pending_samples.len() / self.output_samples * self.output_samples;
|
||||
for packet in self.pending_samples[..complete_samples].chunks_exact(self.output_samples) {
|
||||
on_packet(packet);
|
||||
}
|
||||
self.pending_samples.drain(..complete_samples);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn process(&mut self, input: &[f32]) -> Result<Vec<Vec<f32>>, AudioResamplerError> {
|
||||
let mut packets = Vec::new();
|
||||
self.process_with(input, |packet| packets.push(packet.to_owned()))?;
|
||||
Ok(packets)
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct AudioResampler {
|
||||
#[cfg(not(all(feature = "use_samplerate", not(feature = "use_dasp"))))]
|
||||
backend: StreamingLinearAudioResampler,
|
||||
#[cfg(all(feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
backend: sinc::SincAudioResampler,
|
||||
}
|
||||
|
||||
impl AudioResampler {
|
||||
pub(crate) fn new(config: AudioResamplerConfig) -> Result<Self, AudioResamplerError> {
|
||||
Ok(Self {
|
||||
#[cfg(all(feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
backend: sinc::SincAudioResampler::new(config)?,
|
||||
#[cfg(not(all(feature = "use_samplerate", not(feature = "use_dasp"))))]
|
||||
backend: StreamingLinearAudioResampler::new(config)?,
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn process(&mut self, input: &[f32]) -> Result<Vec<f32>, AudioResamplerError> {
|
||||
let mut output = Vec::new();
|
||||
self.process_into(input, &mut output)?;
|
||||
Ok(output)
|
||||
}
|
||||
|
||||
// Append samples so capture can retain an incomplete output packet in the same buffer.
|
||||
fn process_into(
|
||||
&mut self,
|
||||
input: &[f32],
|
||||
output: &mut Vec<f32>,
|
||||
) -> Result<(), AudioResamplerError> {
|
||||
self.backend.process_into(input, output)
|
||||
}
|
||||
|
||||
fn reserve_input(&mut self, _frames: usize) -> Result<(), AudioResamplerError> {
|
||||
#[cfg(not(all(feature = "use_samplerate", not(feature = "use_dasp"))))]
|
||||
{
|
||||
let capacity = _frames
|
||||
.checked_add(INTERPOLATION_MARGIN_FRAMES)
|
||||
.and_then(|frames| frames.checked_mul(self.backend.channels))
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)?;
|
||||
self.backend.buffered_samples.reserve(capacity);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(feature = "use_samplerate", not(feature = "use_dasp"))))]
|
||||
struct StreamingLinearAudioResampler {
|
||||
config: AudioResamplerConfig,
|
||||
channels: usize,
|
||||
buffered_samples: Vec<f32>,
|
||||
next_position: u64,
|
||||
}
|
||||
|
||||
#[cfg(not(all(feature = "use_samplerate", not(feature = "use_dasp"))))]
|
||||
impl StreamingLinearAudioResampler {
|
||||
fn new(config: AudioResamplerConfig) -> Result<Self, AudioResamplerError> {
|
||||
Ok(Self {
|
||||
config,
|
||||
channels: validate_config(config)?,
|
||||
buffered_samples: Vec::new(),
|
||||
next_position: 0,
|
||||
})
|
||||
}
|
||||
|
||||
fn process_into(
|
||||
&mut self,
|
||||
input: &[f32],
|
||||
output: &mut Vec<f32>,
|
||||
) -> Result<(), AudioResamplerError> {
|
||||
validate_input(input, self.channels)?;
|
||||
let capacity = self.output_capacity(input.len())?;
|
||||
output.reserve(capacity);
|
||||
self.buffered_samples.extend_from_slice(input);
|
||||
while self.write_next_frame(output) {
|
||||
self.next_position += self.config.input_rate as u64;
|
||||
}
|
||||
self.discard_consumed_frames();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn output_capacity(&self, input_samples: usize) -> Result<usize, AudioResamplerError> {
|
||||
let input_frames = input_samples / self.channels;
|
||||
let scaled_frames = input_frames
|
||||
.checked_mul(self.config.output_rate as usize)
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)?
|
||||
/ self.config.input_rate as usize;
|
||||
scaled_frames
|
||||
.checked_add(INTERPOLATION_MARGIN_FRAMES)
|
||||
.and_then(|frames| frames.checked_mul(self.channels))
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)
|
||||
}
|
||||
|
||||
fn write_next_frame(&self, output: &mut Vec<f32>) -> bool {
|
||||
let output_rate = self.config.output_rate as u64;
|
||||
let frame_count = self.buffered_samples.len() / self.channels;
|
||||
let frame = (self.next_position / output_rate) as usize;
|
||||
let fraction = self.next_position % output_rate;
|
||||
if frame >= frame_count || (fraction != 0 && frame + 1 >= frame_count) {
|
||||
return false;
|
||||
}
|
||||
let weight = fraction as f32 / output_rate as f32;
|
||||
for channel in 0..self.channels {
|
||||
let current = self.buffered_samples[frame * self.channels + channel];
|
||||
let next_frame = frame + usize::from(fraction != 0);
|
||||
let next = self.buffered_samples[next_frame * self.channels + channel];
|
||||
output.push(current + (next - current) * weight);
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
fn discard_consumed_frames(&mut self) {
|
||||
let output_rate = self.config.output_rate as u64;
|
||||
let available_frames = self.buffered_samples.len() / self.channels;
|
||||
let consumed_frames = ((self.next_position / output_rate) as usize).min(available_frames);
|
||||
self.buffered_samples
|
||||
.drain(0..consumed_frames * self.channels);
|
||||
self.next_position -= consumed_frames as u64 * output_rate;
|
||||
}
|
||||
}
|
||||
|
||||
fn validate_config(config: AudioResamplerConfig) -> Result<usize, AudioResamplerError> {
|
||||
if config.input_rate == 0 || config.output_rate == 0 || config.channels == 0 {
|
||||
return Err(AudioResamplerError::InvalidConfig(config));
|
||||
}
|
||||
Ok(config.channels as usize)
|
||||
}
|
||||
|
||||
fn validate_input(input: &[f32], channels: usize) -> Result<(), AudioResamplerError> {
|
||||
if input.len() % channels != 0 {
|
||||
return Err(AudioResamplerError::IncompleteFrame {
|
||||
samples: input.len(),
|
||||
channels,
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(all(test, not(all(feature = "use_samplerate", not(feature = "use_dasp")))))]
|
||||
mod tests;
|
||||
|
||||
#[cfg(all(test, feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
mod samplerate_tests;
|
||||
142
src/audio_resampler/allocation_tests.rs
Normal file
142
src/audio_resampler/allocation_tests.rs
Normal file
@@ -0,0 +1,142 @@
|
||||
use super::{AudioResamplerConfig, FixedFrameAudioResampler};
|
||||
use std::alloc::{GlobalAlloc, Layout, System};
|
||||
use std::cell::Cell;
|
||||
|
||||
struct CountingAllocator;
|
||||
|
||||
thread_local! {
|
||||
static ALLOCATIONS: Cell<Option<usize>> = const { Cell::new(None) };
|
||||
}
|
||||
|
||||
fn record_allocation() {
|
||||
let _ = ALLOCATIONS.try_with(|count| {
|
||||
if let Some(value) = count.get() {
|
||||
count.set(Some(value + 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
unsafe impl GlobalAlloc for CountingAllocator {
|
||||
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
|
||||
record_allocation();
|
||||
unsafe { System.alloc(layout) }
|
||||
}
|
||||
|
||||
unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
|
||||
record_allocation();
|
||||
unsafe { System.alloc_zeroed(layout) }
|
||||
}
|
||||
|
||||
unsafe fn realloc(&self, ptr: *mut u8, layout: Layout, size: usize) -> *mut u8 {
|
||||
record_allocation();
|
||||
unsafe { System.realloc(ptr, layout, size) }
|
||||
}
|
||||
|
||||
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
|
||||
unsafe { System.dealloc(ptr, layout) }
|
||||
}
|
||||
}
|
||||
|
||||
#[global_allocator]
|
||||
static ALLOCATOR: CountingAllocator = CountingAllocator;
|
||||
|
||||
pub(crate) fn assert_no_allocations(process: impl FnOnce()) {
|
||||
struct ResetCounter;
|
||||
impl Drop for ResetCounter {
|
||||
fn drop(&mut self) {
|
||||
ALLOCATIONS.with(|count| count.set(None));
|
||||
}
|
||||
}
|
||||
|
||||
ALLOCATIONS.with(|count| assert!(count.replace(Some(0)).is_none()));
|
||||
let reset = ResetCounter;
|
||||
process();
|
||||
let allocations = ALLOCATIONS.with(|count| count.get().unwrap());
|
||||
drop(reset);
|
||||
assert_eq!(
|
||||
allocations, 0,
|
||||
"PCM processing allocated on the capture thread"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn capture_resampling_reuses_buffers() {
|
||||
const PACKETS_PER_SECOND: usize = 100;
|
||||
const PACKET_COUNT: usize = 100;
|
||||
const MAX_STARTUP_DELAY_PACKETS: usize = 1;
|
||||
const SIGNAL_LEVEL: f32 = 0.25;
|
||||
const RATE_PAIRS: [(u32, u32); 6] = [
|
||||
(32_000, 24_000),
|
||||
(44_100, 24_000),
|
||||
(44_100, 48_000),
|
||||
(48_000, 24_000),
|
||||
(96_000, 48_000),
|
||||
(192_000, 48_000),
|
||||
];
|
||||
|
||||
for (input_rate, output_rate) in RATE_PAIRS {
|
||||
for channels in [1, 2, 4, 6, 8] {
|
||||
let config = AudioResamplerConfig {
|
||||
input_rate,
|
||||
output_rate,
|
||||
channels,
|
||||
};
|
||||
let input =
|
||||
vec![SIGNAL_LEVEL; input_rate as usize / PACKETS_PER_SECOND * channels as usize];
|
||||
let frames = output_rate as usize / PACKETS_PER_SECOND;
|
||||
let mut resampler = FixedFrameAudioResampler::new(config, frames).unwrap();
|
||||
let mut packets = 0;
|
||||
let mut energy = 0.0;
|
||||
assert_no_allocations(|| {
|
||||
for _ in 0..PACKET_COUNT {
|
||||
resampler
|
||||
.process_with(&input, |packet| {
|
||||
assert_eq!(packet.len(), frames * channels as usize);
|
||||
energy += packet.iter().map(|sample| sample * sample).sum::<f32>();
|
||||
packets += 1;
|
||||
})
|
||||
.unwrap();
|
||||
}
|
||||
});
|
||||
assert!((PACKET_COUNT - MAX_STARTUP_DELAY_PACKETS..=PACKET_COUNT).contains(&packets));
|
||||
assert!(energy > SIGNAL_LEVEL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
#[test]
|
||||
fn sinc_output_matches_the_existing_backend() {
|
||||
use super::AudioResampler;
|
||||
|
||||
const INPUT_FRAMES: usize = 2_048;
|
||||
const CHUNK_FRAMES: usize = 73;
|
||||
const SIGNAL_STEP: f32 = 0.07;
|
||||
for (input_rate, output_rate) in [(44_100, 24_000), (44_100, 48_000), (96_000, 48_000)] {
|
||||
for channels in [1, 2, 4, 6, 8] {
|
||||
let config = AudioResamplerConfig {
|
||||
input_rate,
|
||||
output_rate,
|
||||
channels,
|
||||
};
|
||||
let input: Vec<_> = (0..INPUT_FRAMES * channels as usize)
|
||||
.map(|sample| (sample as f32 * SIGNAL_STEP).sin())
|
||||
.collect();
|
||||
let mut actual = AudioResampler::new(config).unwrap();
|
||||
let expected = samplerate::Samplerate::new(
|
||||
samplerate::ConverterType::SincBestQuality,
|
||||
input_rate,
|
||||
output_rate,
|
||||
channels as usize,
|
||||
)
|
||||
.unwrap();
|
||||
for chunk in input.chunks(CHUNK_FRAMES * channels as usize) {
|
||||
assert_eq!(
|
||||
actual.process(chunk).unwrap(),
|
||||
expected.process(chunk).unwrap()
|
||||
);
|
||||
assert_eq!(actual.process(&[]).unwrap(), expected.process(&[]).unwrap());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
157
src/audio_resampler/samplerate_tests.rs
Normal file
157
src/audio_resampler/samplerate_tests.rs
Normal file
@@ -0,0 +1,157 @@
|
||||
use super::{AudioResampler, AudioResamplerConfig, AudioResamplerError, FixedFrameAudioResampler};
|
||||
|
||||
const INPUT_RATE: u32 = 44_100;
|
||||
const OUTPUT_RATE: u32 = 48_000;
|
||||
const CHANNELS: u16 = 2;
|
||||
const INPUT_PACKET_FRAMES: usize = INPUT_RATE as usize / PACKETS_PER_SECOND;
|
||||
const OUTPUT_PACKET_FRAMES: usize = OUTPUT_RATE as usize / PACKETS_PER_SECOND;
|
||||
const PACKET_COUNT: usize = 20;
|
||||
const PACKETS_PER_SECOND: usize = 100;
|
||||
const MIN_CONTINUITY_PACKETS: usize = 2;
|
||||
const TONE_FREQUENCY_HZ: f32 = 997.0;
|
||||
const TONE_AMPLITUDE: f32 = 0.5;
|
||||
const MAX_BOUNDARY_RESIDUAL: f32 = 0.02;
|
||||
const INCOMPLETE_SAMPLE_COUNT: usize = 1;
|
||||
const DOWNSAMPLE_RATE: u32 = 24_000;
|
||||
const REJECTED_TONE_HZ: f64 = 18_000.0;
|
||||
const MAX_ALIAS_RMS: f64 = 0.01;
|
||||
const MIN_PASSBAND_RMS: f64 = 0.3;
|
||||
|
||||
fn stereo_tone(frames: usize) -> Vec<f32> {
|
||||
(0..frames)
|
||||
.flat_map(|frame| {
|
||||
let phase =
|
||||
std::f32::consts::TAU * TONE_FREQUENCY_HZ * frame as f32 / INPUT_RATE as f32;
|
||||
let sample = TONE_AMPLITUDE * phase.sin();
|
||||
[sample, sample]
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn maximum_boundary_residual(packets: &[Vec<f32>]) -> f32 {
|
||||
packets.windows(2).fold(0.0, |maximum, pair| {
|
||||
let previous = &pair[0];
|
||||
let current = &pair[1];
|
||||
let last = previous.len() - CHANNELS as usize;
|
||||
let penultimate = last - CHANNELS as usize;
|
||||
(0..CHANNELS as usize).fold(maximum, |maximum, channel| {
|
||||
let predicted = previous[last + channel]
|
||||
+ (previous[last + channel] - previous[penultimate + channel]);
|
||||
maximum.max((current[channel] - predicted).abs())
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
fn stereo_config() -> AudioResamplerConfig {
|
||||
AudioResamplerConfig {
|
||||
input_rate: INPUT_RATE,
|
||||
output_rate: OUTPUT_RATE,
|
||||
channels: CHANNELS,
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn moving_capture_resampler_preserves_pending_audio() {
|
||||
let input = stereo_tone(INPUT_PACKET_FRAMES * PACKET_COUNT);
|
||||
let packet_samples = INPUT_PACKET_FRAMES * CHANNELS as usize;
|
||||
let mut expected_resampler =
|
||||
FixedFrameAudioResampler::new(stereo_config(), OUTPUT_PACKET_FRAMES).unwrap();
|
||||
let expected: Vec<_> = input
|
||||
.chunks(packet_samples)
|
||||
.flat_map(|packet| expected_resampler.process(packet).unwrap())
|
||||
.collect();
|
||||
let mut moved_resampler =
|
||||
FixedFrameAudioResampler::new(stereo_config(), OUTPUT_PACKET_FRAMES).unwrap();
|
||||
let mut output = moved_resampler.process(&input[..packet_samples]).unwrap();
|
||||
let remaining = std::thread::spawn(move || {
|
||||
input[packet_samples..]
|
||||
.chunks(packet_samples)
|
||||
.flat_map(|packet| moved_resampler.process(packet).unwrap())
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
.join()
|
||||
.unwrap();
|
||||
output.extend(remaining);
|
||||
|
||||
assert!(output.len() >= MIN_CONTINUITY_PACKETS);
|
||||
assert!(output
|
||||
.iter()
|
||||
.all(|packet| packet.len() == OUTPUT_PACKET_FRAMES * CHANNELS as usize));
|
||||
assert!(maximum_boundary_residual(&output) <= MAX_BOUNDARY_RESIDUAL);
|
||||
assert_eq!(output, expected);
|
||||
}
|
||||
|
||||
fn downsampled_rms(input: &[f32]) -> f64 {
|
||||
let config = AudioResamplerConfig {
|
||||
output_rate: DOWNSAMPLE_RATE,
|
||||
..stereo_config()
|
||||
};
|
||||
let output_frames = DOWNSAMPLE_RATE as usize / PACKETS_PER_SECOND;
|
||||
let mut resampler = FixedFrameAudioResampler::new(config, output_frames).unwrap();
|
||||
let output: Vec<f32> = input
|
||||
.chunks(INPUT_PACKET_FRAMES * CHANNELS as usize)
|
||||
.flat_map(|packet| resampler.process(packet).unwrap().into_iter().flatten())
|
||||
.collect();
|
||||
|
||||
assert!(output.len() >= output_frames * CHANNELS as usize * MIN_CONTINUITY_PACKETS);
|
||||
let mean_square = output
|
||||
.iter()
|
||||
.map(|sample| f64::from(*sample).powi(2))
|
||||
.sum::<f64>()
|
||||
/ output.len() as f64;
|
||||
mean_square.sqrt()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn capture_downsampling_filters_out_of_band_audio() {
|
||||
let input: Vec<_> = (0..INPUT_PACKET_FRAMES * PACKET_COUNT)
|
||||
.flat_map(|frame| {
|
||||
let phase =
|
||||
std::f64::consts::TAU * REJECTED_TONE_HZ * frame as f64 / f64::from(INPUT_RATE);
|
||||
let sample = (f64::from(TONE_AMPLITUDE) * phase.sin()) as f32;
|
||||
[sample, sample]
|
||||
})
|
||||
.collect();
|
||||
let rms = downsampled_rms(&input);
|
||||
assert!(
|
||||
rms < MAX_ALIAS_RMS,
|
||||
"out-of-band output RMS {rms} exceeded {MAX_ALIAS_RMS}"
|
||||
);
|
||||
|
||||
let input = stereo_tone(INPUT_PACKET_FRAMES * PACKET_COUNT);
|
||||
let rms = downsampled_rms(&input);
|
||||
assert!(
|
||||
rms > MIN_PASSBAND_RMS,
|
||||
"in-band output RMS {rms} fell below {MIN_PASSBAND_RMS}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn samplerate_backend_preserves_streaming_continuity() {
|
||||
let input = stereo_tone(INPUT_PACKET_FRAMES * PACKET_COUNT);
|
||||
let mut resampler = AudioResampler::new(stereo_config()).unwrap();
|
||||
let packets: Vec<_> = input
|
||||
.chunks(INPUT_PACKET_FRAMES * CHANNELS as usize)
|
||||
.map(|packet| resampler.process(packet).unwrap())
|
||||
.filter(|packet| !packet.is_empty())
|
||||
.collect();
|
||||
|
||||
assert!(packets.len() >= MIN_CONTINUITY_PACKETS);
|
||||
assert!(packets
|
||||
.iter()
|
||||
.all(|packet| packet.len() % CHANNELS as usize == 0));
|
||||
assert!(maximum_boundary_residual(&packets) <= MAX_BOUNDARY_RESIDUAL);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn samplerate_backend_reports_incomplete_frame_context() {
|
||||
let mut resampler = AudioResampler::new(stereo_config()).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
resampler.process(&[0.0]).unwrap_err(),
|
||||
AudioResamplerError::IncompleteFrame {
|
||||
samples: INCOMPLETE_SAMPLE_COUNT,
|
||||
channels: CHANNELS as usize,
|
||||
}
|
||||
);
|
||||
}
|
||||
112
src/audio_resampler/sinc.rs
Normal file
112
src/audio_resampler/sinc.rs
Normal file
@@ -0,0 +1,112 @@
|
||||
use super::{AudioResamplerConfig, AudioResamplerError};
|
||||
use libsamplerate_sys as sys;
|
||||
use std::ptr::NonNull;
|
||||
|
||||
const OUTPUT_MARGIN_FRAMES: usize = 1;
|
||||
|
||||
pub(super) struct SincAudioResampler {
|
||||
state: NonNull<sys::SRC_STATE>,
|
||||
config: AudioResamplerConfig,
|
||||
}
|
||||
|
||||
impl SincAudioResampler {
|
||||
pub(super) fn new(config: AudioResamplerConfig) -> Result<Self, AudioResamplerError> {
|
||||
super::validate_config(config)?;
|
||||
let ratio = f64::from(config.output_rate) / f64::from(config.input_rate);
|
||||
if unsafe { sys::src_is_valid_ratio(ratio) } == 0 {
|
||||
return Err(backend_error(
|
||||
config,
|
||||
samplerate::ErrorCode::BadSrcRatio as _,
|
||||
));
|
||||
}
|
||||
let mut error = 0;
|
||||
// SAFETY: src_new allocates independent state; this owner releases it in Drop.
|
||||
let state = unsafe {
|
||||
sys::src_new(
|
||||
sys::SRC_SINC_BEST_QUALITY as _,
|
||||
config.channels.into(),
|
||||
&mut error,
|
||||
)
|
||||
};
|
||||
let state = NonNull::new(state).ok_or_else(|| backend_error(config, error))?;
|
||||
Ok(Self { state, config })
|
||||
}
|
||||
|
||||
pub(super) fn process_into(
|
||||
&mut self,
|
||||
input: &[f32],
|
||||
output: &mut Vec<f32>,
|
||||
) -> Result<(), AudioResamplerError> {
|
||||
super::validate_input(input, self.config.channels as usize)?;
|
||||
let mut consumed = 0;
|
||||
loop {
|
||||
let (used, generated) = self.process_block(&input[consumed..], output)?;
|
||||
consumed += used;
|
||||
if consumed == input.len() {
|
||||
return Ok(());
|
||||
}
|
||||
if used == 0 && generated == 0 {
|
||||
return Err(AudioResamplerError::Backend(
|
||||
"libsamplerate made no progress while input remained".to_owned(),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn process_block(
|
||||
&mut self,
|
||||
input: &[f32],
|
||||
output: &mut Vec<f32>,
|
||||
) -> Result<(usize, usize), AudioResamplerError> {
|
||||
let channels = self.config.channels as usize;
|
||||
let input_frames = input.len() / channels;
|
||||
let output_frames = input_frames
|
||||
.checked_mul(self.config.output_rate as usize)
|
||||
.map(|frames| frames / self.config.input_rate as usize)
|
||||
.and_then(|frames| frames.checked_add(OUTPUT_MARGIN_FRAMES))
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)?;
|
||||
let start = output.len();
|
||||
let end = output_frames
|
||||
.checked_mul(channels)
|
||||
.and_then(|samples| start.checked_add(samples))
|
||||
.ok_or(AudioResamplerError::CapacityOverflow)?;
|
||||
let mut data = sys::SRC_DATA {
|
||||
data_in: input.as_ptr(),
|
||||
input_frames: input_frames
|
||||
.try_into()
|
||||
.map_err(|_| AudioResamplerError::CapacityOverflow)?,
|
||||
output_frames: output_frames
|
||||
.try_into()
|
||||
.map_err(|_| AudioResamplerError::CapacityOverflow)?,
|
||||
src_ratio: f64::from(self.config.output_rate) / f64::from(self.config.input_rate),
|
||||
..Default::default()
|
||||
};
|
||||
output.resize(end, 0.0);
|
||||
data.data_out = output[start..].as_mut_ptr();
|
||||
// SAFETY: state is exclusively owned; disjoint slices cover the declared frame counts.
|
||||
let error = unsafe { sys::src_process(self.state.as_ptr(), &mut data) };
|
||||
let generated = data.output_frames_gen as usize * channels;
|
||||
output.truncate(start + generated);
|
||||
if error != 0 {
|
||||
return Err(backend_error(self.config, error));
|
||||
}
|
||||
Ok((data.input_frames_used as usize * channels, generated))
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for SincAudioResampler {
|
||||
fn drop(&mut self) {
|
||||
// SAFETY: this owner holds the only handle returned by src_new.
|
||||
unsafe { sys::src_delete(self.state.as_ptr()) };
|
||||
}
|
||||
}
|
||||
|
||||
fn backend_error(config: AudioResamplerConfig, code: i32) -> AudioResamplerError {
|
||||
AudioResamplerError::Backend(format!(
|
||||
"input_rate={}, output_rate={}, channels={}: {:?}",
|
||||
config.input_rate,
|
||||
config.output_rate,
|
||||
config.channels,
|
||||
samplerate::Error::from_int(code)
|
||||
))
|
||||
}
|
||||
178
src/audio_resampler/tests.rs
Normal file
178
src/audio_resampler/tests.rs
Normal file
@@ -0,0 +1,178 @@
|
||||
use super::{AudioResampler, AudioResamplerConfig, FixedFrameAudioResampler};
|
||||
|
||||
const INPUT_RATE: u32 = 24_000;
|
||||
const OUTPUT_RATE: u32 = 48_000;
|
||||
const CHANNELS: u16 = 2;
|
||||
const CHUNK_FRAMES: usize = 240;
|
||||
const CHUNK_COUNT: usize = 4;
|
||||
const TONE_FREQUENCY_HZ: f32 = 997.0;
|
||||
const TONE_AMPLITUDE: f32 = 0.5;
|
||||
const MAX_BOUNDARY_RESIDUAL: f32 = 0.02;
|
||||
const LOOK_AHEAD_OUTPUT_FRAMES: usize = 1;
|
||||
const UNEVEN_CHUNK_FRAMES: usize = 73;
|
||||
const MONO_CHANNELS: u16 = 1;
|
||||
const UNIT_RATE: u32 = 1;
|
||||
const DOUBLE_RATE: u32 = 2;
|
||||
const FIRST_DOWNSAMPLE_PACKET: [f32; 3] = [0.0, 1.0, 2.0];
|
||||
const SECOND_DOWNSAMPLE_PACKET: [f32; 4] = [3.0, 4.0, 5.0, 6.0];
|
||||
const EXPECTED_DOWNSAMPLED_OUTPUT: [f32; 4] = [0.0, 2.0, 4.0, 6.0];
|
||||
const PACKETS_PER_SECOND: usize = 100;
|
||||
const OUTPUT_PACKET_FRAMES: usize = OUTPUT_RATE as usize / PACKETS_PER_SECOND;
|
||||
const RATE_44_1_KHZ: u32 = 44_100;
|
||||
const FLOAT_TOLERANCE: f32 = 0.000_001;
|
||||
const MIN_CONTINUITY_PACKETS: usize = 2;
|
||||
|
||||
fn stereo_tone_at_rate(frames: usize, sample_rate: u32) -> Vec<f32> {
|
||||
(0..frames)
|
||||
.flat_map(|frame| {
|
||||
let phase =
|
||||
std::f32::consts::TAU * TONE_FREQUENCY_HZ * frame as f32 / sample_rate as f32;
|
||||
let sample = TONE_AMPLITUDE * phase.sin();
|
||||
[sample, sample]
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn stereo_tone(frames: usize) -> Vec<f32> {
|
||||
stereo_tone_at_rate(frames, INPUT_RATE)
|
||||
}
|
||||
|
||||
fn maximum_tone_prediction_residual(sample_rate: u32) -> f32 {
|
||||
let half_step = std::f32::consts::PI * TONE_FREQUENCY_HZ / sample_rate as f32;
|
||||
4.0 * TONE_AMPLITUDE * half_step.sin().powi(2)
|
||||
}
|
||||
|
||||
fn maximum_boundary_residual(chunks: &[Vec<f32>]) -> f32 {
|
||||
chunks.windows(2).fold(0.0, |maximum, pair| {
|
||||
let previous = &pair[0];
|
||||
let current = &pair[1];
|
||||
let last = previous.len() - CHANNELS as usize;
|
||||
let penultimate = last - CHANNELS as usize;
|
||||
(0..CHANNELS as usize).fold(maximum, |maximum, channel| {
|
||||
let predicted = previous[last + channel]
|
||||
+ (previous[last + channel] - previous[penultimate + channel]);
|
||||
maximum.max((current[channel] - predicted).abs())
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
fn stereo_config() -> AudioResamplerConfig {
|
||||
AudioResamplerConfig {
|
||||
input_rate: INPUT_RATE,
|
||||
output_rate: OUTPUT_RATE,
|
||||
channels: CHANNELS,
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserves_decoded_packet_continuity_and_output_ratio() {
|
||||
let input = stereo_tone(CHUNK_FRAMES * CHUNK_COUNT);
|
||||
let mut whole_resampler = AudioResampler::new(stereo_config()).unwrap();
|
||||
let whole_output = whole_resampler.process(&input).unwrap();
|
||||
let expected_frames = CHUNK_FRAMES * CHUNK_COUNT * OUTPUT_RATE as usize / INPUT_RATE as usize
|
||||
- LOOK_AHEAD_OUTPUT_FRAMES;
|
||||
|
||||
for chunk_frames in [CHUNK_FRAMES, UNEVEN_CHUNK_FRAMES] {
|
||||
let mut resampler = AudioResampler::new(stereo_config()).unwrap();
|
||||
let output: Vec<_> = input
|
||||
.chunks(chunk_frames * CHANNELS as usize)
|
||||
.map(|chunk| resampler.process(chunk).unwrap())
|
||||
.collect();
|
||||
let residual = maximum_boundary_residual(&output);
|
||||
assert!(
|
||||
residual <= MAX_BOUNDARY_RESIDUAL,
|
||||
"packet boundary residual {residual} exceeded {MAX_BOUNDARY_RESIDUAL}, chunk_frames={chunk_frames}"
|
||||
);
|
||||
let output_frames = output.iter().map(Vec::len).sum::<usize>() / CHANNELS as usize;
|
||||
assert_eq!(output_frames, expected_frames);
|
||||
assert_eq!(output.concat(), whole_output, "chunk_frames={chunk_frames}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_incomplete_interleaved_frames() {
|
||||
let mut resampler = AudioResampler::new(stereo_config()).unwrap();
|
||||
|
||||
assert!(resampler.process(&[TONE_AMPLITUDE]).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn interpolates_mono_samples() {
|
||||
let config = AudioResamplerConfig {
|
||||
input_rate: UNIT_RATE,
|
||||
output_rate: DOUBLE_RATE,
|
||||
channels: MONO_CHANNELS,
|
||||
};
|
||||
let mut resampler = AudioResampler::new(config).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
resampler.process(&[0.0, 1.0, 2.0]).unwrap(),
|
||||
[0.0, 0.5, 1.0, 1.5, 2.0]
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_zero_rate_configuration() {
|
||||
let config = AudioResamplerConfig {
|
||||
input_rate: 0,
|
||||
output_rate: OUTPUT_RATE,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
|
||||
assert!(AudioResampler::new(config).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn downsamples_across_packet_boundaries() {
|
||||
let config = AudioResamplerConfig {
|
||||
input_rate: DOUBLE_RATE,
|
||||
output_rate: UNIT_RATE,
|
||||
channels: MONO_CHANNELS,
|
||||
};
|
||||
let mut resampler = AudioResampler::new(config).unwrap();
|
||||
let mut output = resampler.process(&FIRST_DOWNSAMPLE_PACKET).unwrap();
|
||||
output.extend(resampler.process(&SECOND_DOWNSAMPLE_PACKET).unwrap());
|
||||
|
||||
assert_eq!(output, EXPECTED_DOWNSAMPLED_OUTPUT);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sender_resampler_emits_only_complete_continuous_frames() {
|
||||
let input = stereo_tone(CHUNK_FRAMES * CHUNK_COUNT);
|
||||
let mut resampler =
|
||||
FixedFrameAudioResampler::new(stereo_config(), OUTPUT_PACKET_FRAMES).unwrap();
|
||||
let output: Vec<_> = input
|
||||
.chunks(CHUNK_FRAMES * CHANNELS as usize)
|
||||
.flat_map(|chunk| resampler.process(chunk).unwrap())
|
||||
.collect();
|
||||
|
||||
assert!(output.len() >= MIN_CONTINUITY_PACKETS);
|
||||
assert!(output
|
||||
.iter()
|
||||
.all(|packet| packet.len() == OUTPUT_PACKET_FRAMES * CHANNELS as usize));
|
||||
assert!(maximum_boundary_residual(&output) <= MAX_BOUNDARY_RESIDUAL);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sender_downsampling_preserves_packet_continuity() {
|
||||
let input_packet_frames = RATE_44_1_KHZ as usize / PACKETS_PER_SECOND;
|
||||
let input = stereo_tone_at_rate(input_packet_frames * CHUNK_COUNT, RATE_44_1_KHZ);
|
||||
let config = AudioResamplerConfig {
|
||||
input_rate: RATE_44_1_KHZ,
|
||||
output_rate: INPUT_RATE,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
let mut resampler =
|
||||
FixedFrameAudioResampler::new(config, INPUT_RATE as usize / PACKETS_PER_SECOND).unwrap();
|
||||
let packets: Vec<_> = input
|
||||
.chunks(input_packet_frames * CHANNELS as usize)
|
||||
.flat_map(|packet| resampler.process(packet).unwrap())
|
||||
.collect();
|
||||
let residual = maximum_boundary_residual(&packets);
|
||||
|
||||
assert_eq!(packets.len(), CHUNK_COUNT);
|
||||
assert!(
|
||||
residual <= maximum_tone_prediction_residual(INPUT_RATE) + FLOAT_TOLERANCE,
|
||||
"sender packet boundary residual {residual} exceeded the tone curvature"
|
||||
);
|
||||
}
|
||||
1666
src/client.rs
1666
src/client.rs
File diff suppressed because it is too large
Load Diff
218
src/client/audio_playback.rs
Normal file
218
src/client/audio_playback.rs
Normal file
@@ -0,0 +1,218 @@
|
||||
use hbb_common::{log, thiserror};
|
||||
use ringbuf::{ring_buffer::RbBase, Rb};
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, AtomicUsize, Ordering},
|
||||
TryLockError,
|
||||
};
|
||||
|
||||
pub(super) const UNDERRUN_DECLICK_MS: usize = 5;
|
||||
const MILLISECONDS_PER_SECOND: usize = 1_000;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub(super) struct AudioPlaybackConfig {
|
||||
pub sample_rate: u32,
|
||||
pub channels: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, thiserror::Error, PartialEq, Eq)]
|
||||
pub(super) enum AudioPlaybackError {
|
||||
#[error(
|
||||
"invalid audio playback configuration: sample_rate={}, channels={}",
|
||||
.0.sample_rate, .0.channels
|
||||
)]
|
||||
InvalidConfig(AudioPlaybackConfig),
|
||||
#[error("audio playback frame has {samples} samples for {channels} channels")]
|
||||
IncompleteFrame { samples: usize, channels: usize },
|
||||
#[error("audio playback transition frame count overflow")]
|
||||
FrameCountOverflow,
|
||||
}
|
||||
|
||||
pub(super) struct AudioPlaybackRecovery {
|
||||
channels: usize,
|
||||
transition_frames: usize,
|
||||
transition_frame: usize,
|
||||
had_input: bool,
|
||||
transition_start: Vec<f32>,
|
||||
output_frame: Vec<f32>,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub(super) struct AudioPlaybackStatus {
|
||||
pub(super) ready: AtomicBool,
|
||||
contentions: AtomicUsize,
|
||||
buffer_poisoned: AtomicBool,
|
||||
}
|
||||
|
||||
impl AudioPlaybackStatus {
|
||||
pub(super) fn report_errors(&self) {
|
||||
let contentions = self.contentions.swap(0, Ordering::Relaxed);
|
||||
if contentions != 0 {
|
||||
log::debug!("Audio playback PCM buffer contention: callbacks={contentions}");
|
||||
}
|
||||
if self.buffer_poisoned.swap(false, Ordering::Relaxed) {
|
||||
log::error!("Audio playback stopped reading a poisoned PCM buffer");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) struct AudioPlaybackWriter {
|
||||
audio_buffer: std::sync::Arc<std::sync::Mutex<ringbuf::HeapRb<f32>>>,
|
||||
discontinuity_generation: std::sync::Arc<AtomicUsize>,
|
||||
observed_discontinuity_generation: usize,
|
||||
buffered_input: Vec<f32>,
|
||||
recovery: AudioPlaybackRecovery,
|
||||
pub(super) status: std::sync::Arc<AudioPlaybackStatus>,
|
||||
buffer_failed: bool,
|
||||
}
|
||||
|
||||
impl AudioPlaybackWriter {
|
||||
pub(super) fn new(
|
||||
config: AudioPlaybackConfig,
|
||||
audio_buffer: std::sync::Arc<std::sync::Mutex<ringbuf::HeapRb<f32>>>,
|
||||
discontinuity_generation: std::sync::Arc<AtomicUsize>,
|
||||
) -> Result<Self, AudioPlaybackError> {
|
||||
let recovery = AudioPlaybackRecovery::new(config)?;
|
||||
let buffer_capacity = audio_buffer.lock().unwrap().capacity();
|
||||
let observed_discontinuity_generation = discontinuity_generation.load(Ordering::Relaxed);
|
||||
Ok(Self {
|
||||
audio_buffer,
|
||||
discontinuity_generation,
|
||||
observed_discontinuity_generation,
|
||||
buffered_input: vec![0.0; buffer_capacity],
|
||||
recovery,
|
||||
status: Default::default(),
|
||||
buffer_failed: false,
|
||||
})
|
||||
}
|
||||
|
||||
fn read_buffer(&mut self, requested_samples: usize) -> usize {
|
||||
if self.buffer_failed {
|
||||
return 0;
|
||||
}
|
||||
let mut buffer = match self.audio_buffer.try_lock() {
|
||||
Ok(buffer) => buffer,
|
||||
Err(TryLockError::WouldBlock) => {
|
||||
// Keep queued PCM and its generation for the next successful read.
|
||||
self.status.contentions.fetch_add(1, Ordering::Relaxed);
|
||||
return 0;
|
||||
}
|
||||
Err(TryLockError::Poisoned(_)) => {
|
||||
self.buffer_failed = true;
|
||||
self.status.ready.store(false, Ordering::Release);
|
||||
self.status.buffer_poisoned.store(true, Ordering::Relaxed);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
let generation = self.discontinuity_generation.load(Ordering::Relaxed);
|
||||
let channels = self.recovery.channels;
|
||||
let samples = buffer.occupied_len().min(requested_samples) / channels * channels;
|
||||
buffer.pop_slice(&mut self.buffered_input[..samples]);
|
||||
drop(buffer);
|
||||
if generation != self.observed_discontinuity_generation {
|
||||
self.recovery.begin_discontinuity();
|
||||
self.observed_discontinuity_generation = generation;
|
||||
}
|
||||
samples
|
||||
}
|
||||
|
||||
pub(super) fn write_output<T>(&mut self, output: &mut [T])
|
||||
where
|
||||
T: cpal::Sample + cpal::FromSample<f32>,
|
||||
{
|
||||
self.status
|
||||
.ready
|
||||
.store(!self.buffer_failed, Ordering::Release);
|
||||
let requested_samples = output.len().min(self.buffered_input.len());
|
||||
let channel_count = self.recovery.channels;
|
||||
let available_samples = self.read_buffer(requested_samples);
|
||||
let available_frames = available_samples / channel_count;
|
||||
for (frame_index, output_frame) in output.chunks_mut(channel_count).enumerate() {
|
||||
let input = if frame_index < available_frames {
|
||||
let start = frame_index * channel_count;
|
||||
Some(&self.buffered_input[start..start + channel_count])
|
||||
} else {
|
||||
None
|
||||
};
|
||||
match self.recovery.process_frame(input) {
|
||||
Ok(recovered) => {
|
||||
for (output, sample) in output_frame.iter_mut().zip(recovered) {
|
||||
*output = T::from_sample(*sample);
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
log::error!("Failed to recover audio underflow: {error}");
|
||||
output_frame.fill(T::from_sample(0.0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl AudioPlaybackRecovery {
|
||||
pub(super) fn new(config: AudioPlaybackConfig) -> Result<Self, AudioPlaybackError> {
|
||||
if config.sample_rate == 0 || config.channels == 0 {
|
||||
return Err(AudioPlaybackError::InvalidConfig(config));
|
||||
}
|
||||
let transition_frames = (config.sample_rate as usize)
|
||||
.checked_mul(UNDERRUN_DECLICK_MS)
|
||||
.ok_or(AudioPlaybackError::FrameCountOverflow)?
|
||||
/ MILLISECONDS_PER_SECOND;
|
||||
if transition_frames == 0 {
|
||||
return Err(AudioPlaybackError::InvalidConfig(config));
|
||||
}
|
||||
Ok(Self {
|
||||
channels: config.channels,
|
||||
transition_frames,
|
||||
transition_frame: transition_frames,
|
||||
had_input: false,
|
||||
transition_start: vec![0.0; config.channels],
|
||||
output_frame: vec![0.0; config.channels],
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) fn process_frame(
|
||||
&mut self,
|
||||
input: Option<&[f32]>,
|
||||
) -> Result<&[f32], AudioPlaybackError> {
|
||||
if input.is_some_and(|frame| frame.len() != self.channels) {
|
||||
return Err(AudioPlaybackError::IncompleteFrame {
|
||||
samples: input.map_or(0, <[f32]>::len),
|
||||
channels: self.channels,
|
||||
});
|
||||
}
|
||||
self.begin_transition(input.is_some());
|
||||
let target_weight = self.advance_transition();
|
||||
for channel in 0..self.channels {
|
||||
let target = input.map_or(0.0, |frame| frame[channel]);
|
||||
self.output_frame[channel] =
|
||||
self.transition_start[channel] * (1.0 - target_weight) + target * target_weight;
|
||||
}
|
||||
Ok(&self.output_frame)
|
||||
}
|
||||
|
||||
pub(super) fn begin_discontinuity(&mut self) {
|
||||
self.transition_start.copy_from_slice(&self.output_frame);
|
||||
self.transition_frame = 0;
|
||||
}
|
||||
|
||||
fn begin_transition(&mut self, has_input: bool) {
|
||||
if has_input == self.had_input {
|
||||
return;
|
||||
}
|
||||
self.transition_start.copy_from_slice(&self.output_frame);
|
||||
self.transition_frame = 0;
|
||||
self.had_input = has_input;
|
||||
}
|
||||
|
||||
fn advance_transition(&mut self) -> f32 {
|
||||
if self.transition_frame >= self.transition_frames {
|
||||
return 1.0;
|
||||
}
|
||||
self.transition_frame += 1;
|
||||
self.transition_frame as f32 / self.transition_frames as f32
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "audio_playback_tests.rs"]
|
||||
mod tests;
|
||||
218
src/client/audio_playback_tests.rs
Normal file
218
src/client/audio_playback_tests.rs
Normal file
@@ -0,0 +1,218 @@
|
||||
use super::{AudioPlaybackConfig, AudioPlaybackError, AudioPlaybackRecovery, AudioPlaybackWriter};
|
||||
use ringbuf::{ring_buffer::RbBase, Rb};
|
||||
use std::{
|
||||
sync::{atomic::Ordering, mpsc, Arc, Mutex},
|
||||
time::Duration,
|
||||
};
|
||||
|
||||
const SAMPLE_RATE: u32 = 48_000;
|
||||
const CHANNELS: usize = 2;
|
||||
const ACTIVE_FRAME: [f32; CHANNELS] = [0.8, -0.8];
|
||||
const OPPOSITE_ACTIVE_FRAME: [f32; CHANNELS] = [-0.8, 0.8];
|
||||
const ACTIVE_FRAMES: usize = 300;
|
||||
const SILENT_FRAMES: usize = 300;
|
||||
const TRANSITION_FRAMES: usize =
|
||||
SAMPLE_RATE as usize * super::UNDERRUN_DECLICK_MS / super::MILLISECONDS_PER_SECOND;
|
||||
const MAX_SAMPLE_STEP: f32 = 0.01;
|
||||
|
||||
#[test]
|
||||
fn writing_audio_observes_discard_and_releases_buffer_lock() {
|
||||
const INPUT: [f32; 4] = [0.1, 0.2, 0.3, 0.4];
|
||||
const GENERATION: usize = 7;
|
||||
let buffer = Arc::new(Mutex::new(ringbuf::HeapRb::new(INPUT.len())));
|
||||
let generation = Arc::new(super::AtomicUsize::new(0));
|
||||
let config = AudioPlaybackConfig {
|
||||
sample_rate: SAMPLE_RATE,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
let mut writer = AudioPlaybackWriter::new(config, buffer.clone(), generation.clone()).unwrap();
|
||||
{
|
||||
let mut buffer = buffer.lock().unwrap();
|
||||
buffer.push_slice(&INPUT);
|
||||
generation.store(GENERATION, Ordering::Relaxed);
|
||||
}
|
||||
let mut output = [0.0_f32; INPUT.len()];
|
||||
|
||||
writer.write_output(&mut output);
|
||||
|
||||
assert_eq!(writer.buffered_input, INPUT);
|
||||
assert_eq!(writer.observed_discontinuity_generation, GENERATION);
|
||||
assert_eq!(buffer.try_lock().unwrap().occupied_len(), 0);
|
||||
}
|
||||
|
||||
fn maximum_sample_step(samples: &[f32]) -> f32 {
|
||||
samples
|
||||
.windows(CHANNELS + 1)
|
||||
.map(|window| (window[CHANNELS] - window[0]).abs())
|
||||
.fold(0.0, f32::max)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn smooths_underflow_and_explicit_audio_discontinuities() {
|
||||
for explicit_discontinuity in [false, true] {
|
||||
let config = AudioPlaybackConfig {
|
||||
sample_rate: SAMPLE_RATE,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
let mut recovery = AudioPlaybackRecovery::new(config).unwrap();
|
||||
let mut output = Vec::new();
|
||||
for _ in 0..ACTIVE_FRAMES {
|
||||
output.extend_from_slice(recovery.process_frame(Some(&ACTIVE_FRAME)).unwrap());
|
||||
}
|
||||
let transition_end = TRANSITION_FRAMES * CHANNELS;
|
||||
assert_eq!(
|
||||
&output[transition_end - CHANNELS..transition_end],
|
||||
ACTIVE_FRAME.as_slice(),
|
||||
"explicit_discontinuity={explicit_discontinuity}"
|
||||
);
|
||||
let resumed_frame = if explicit_discontinuity {
|
||||
recovery.begin_discontinuity();
|
||||
&OPPOSITE_ACTIVE_FRAME
|
||||
} else {
|
||||
for _ in 0..SILENT_FRAMES {
|
||||
output.extend_from_slice(recovery.process_frame(None).unwrap());
|
||||
}
|
||||
&ACTIVE_FRAME
|
||||
};
|
||||
for _ in 0..ACTIVE_FRAMES {
|
||||
output.extend_from_slice(recovery.process_frame(Some(resumed_frame)).unwrap());
|
||||
}
|
||||
let maximum = maximum_sample_step(&output);
|
||||
assert!(
|
||||
maximum <= MAX_SAMPLE_STEP,
|
||||
"step {maximum} exceeded {MAX_SAMPLE_STEP}, explicit={explicit_discontinuity}"
|
||||
);
|
||||
assert_eq!(
|
||||
&output[output.len() - CHANNELS..],
|
||||
resumed_frame,
|
||||
"explicit_discontinuity={explicit_discontinuity}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validates_configuration_and_frame_size() {
|
||||
let invalid_config = AudioPlaybackConfig {
|
||||
sample_rate: 0,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
assert_eq!(
|
||||
AudioPlaybackRecovery::new(invalid_config).err(),
|
||||
Some(AudioPlaybackError::InvalidConfig(invalid_config))
|
||||
);
|
||||
|
||||
let config = AudioPlaybackConfig {
|
||||
sample_rate: SAMPLE_RATE,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
let mut recovery = AudioPlaybackRecovery::new(config).unwrap();
|
||||
assert_eq!(
|
||||
recovery.process_frame(Some(&[0.5])).err(),
|
||||
Some(AudioPlaybackError::IncompleteFrame {
|
||||
samples: 1,
|
||||
channels: CHANNELS,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
const CALLBACK_SAMPLES: usize = 64;
|
||||
const CALLBACK_TIMEOUT: Duration = Duration::from_secs(2);
|
||||
const DISCARD_GENERATION: usize = 1;
|
||||
|
||||
fn write_while_buffer_is_locked(
|
||||
mut writer: AudioPlaybackWriter,
|
||||
buffer: &Arc<Mutex<ringbuf::HeapRb<f32>>>,
|
||||
generation: &Arc<super::AtomicUsize>,
|
||||
) -> (AudioPlaybackWriter, [f32; CALLBACK_SAMPLES]) {
|
||||
let mut guard = buffer.lock().unwrap();
|
||||
let queued = OPPOSITE_ACTIVE_FRAME.repeat(ACTIVE_FRAMES);
|
||||
guard.push_slice(&queued);
|
||||
generation.store(DISCARD_GENERATION, Ordering::Relaxed);
|
||||
let (completed_tx, completed_rx) = mpsc::channel();
|
||||
let callback = std::thread::spawn(move || {
|
||||
let mut output = [0.0; CALLBACK_SAMPLES];
|
||||
crate::audio_resampler::allocation_tests::assert_no_allocations(|| {
|
||||
writer.write_output(&mut output);
|
||||
});
|
||||
completed_tx.send((writer, output)).unwrap();
|
||||
});
|
||||
let completed = completed_rx.recv_timeout(CALLBACK_TIMEOUT);
|
||||
let retained = guard.occupied_len();
|
||||
drop(guard);
|
||||
callback.join().unwrap();
|
||||
let result = completed.expect("playback callback waited for the buffer owner");
|
||||
assert_eq!(retained, queued.len());
|
||||
result
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn playback_contention_preserves_queued_audio_and_recovers_after_release() {
|
||||
let samples = ACTIVE_FRAMES * CHANNELS;
|
||||
let buffer = Arc::new(Mutex::new(ringbuf::HeapRb::new(samples)));
|
||||
let generation = Arc::new(super::AtomicUsize::new(0));
|
||||
let config = AudioPlaybackConfig {
|
||||
sample_rate: SAMPLE_RATE,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
let mut writer = AudioPlaybackWriter::new(config, buffer.clone(), generation.clone()).unwrap();
|
||||
buffer
|
||||
.lock()
|
||||
.unwrap()
|
||||
.push_slice(&ACTIVE_FRAME.repeat(ACTIVE_FRAMES));
|
||||
let mut output = vec![0.0; samples];
|
||||
writer.write_output(&mut output);
|
||||
assert_eq!(&output[samples - CHANNELS..], &ACTIVE_FRAME);
|
||||
|
||||
let (mut writer, gap) = write_while_buffer_is_locked(writer, &buffer, &generation);
|
||||
|
||||
assert_eq!(writer.status.contentions.load(Ordering::Relaxed), 1);
|
||||
assert!(writer.status.ready.load(Ordering::Acquire));
|
||||
assert_eq!(writer.observed_discontinuity_generation, 0);
|
||||
assert!(maximum_sample_step(&gap) <= MAX_SAMPLE_STEP);
|
||||
assert!(gap[0] > 0.0 && gap[0] < ACTIVE_FRAME[0]);
|
||||
assert_eq!(gap[1], -gap[0]);
|
||||
assert!(gap[CALLBACK_SAMPLES - CHANNELS] > 0.0);
|
||||
writer.write_output(&mut output);
|
||||
let mut transition = gap[gap.len() - CHANNELS..].to_vec();
|
||||
transition.extend_from_slice(&output[..TRANSITION_FRAMES * CHANNELS]);
|
||||
assert!(maximum_sample_step(&transition) <= MAX_SAMPLE_STEP);
|
||||
assert_eq!(
|
||||
writer.buffered_input,
|
||||
OPPOSITE_ACTIVE_FRAME.repeat(ACTIVE_FRAMES)
|
||||
);
|
||||
assert_eq!(writer.observed_discontinuity_generation, DISCARD_GENERATION);
|
||||
assert_eq!(&output[samples - CHANNELS..], &OPPOSITE_ACTIVE_FRAME);
|
||||
assert_eq!(buffer.lock().unwrap().occupied_len(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn poisoned_playback_buffer_reports_once_without_panicking_in_the_callback() {
|
||||
let buffer = Arc::new(Mutex::new(ringbuf::HeapRb::new(CALLBACK_SAMPLES)));
|
||||
let config = AudioPlaybackConfig {
|
||||
sample_rate: SAMPLE_RATE,
|
||||
channels: CHANNELS,
|
||||
};
|
||||
let mut writer =
|
||||
AudioPlaybackWriter::new(config, buffer.clone(), Arc::new(super::AtomicUsize::new(0)))
|
||||
.unwrap();
|
||||
assert!(std::thread::spawn(move || {
|
||||
let _guard = buffer.lock().unwrap();
|
||||
panic!("Injected PCM buffer failure");
|
||||
})
|
||||
.join()
|
||||
.is_err());
|
||||
let mut output = [ACTIVE_FRAME[0]; CALLBACK_SAMPLES];
|
||||
|
||||
crate::audio_resampler::allocation_tests::assert_no_allocations(|| {
|
||||
writer.write_output(&mut output);
|
||||
});
|
||||
|
||||
assert_eq!(output, [0.0; CALLBACK_SAMPLES]);
|
||||
assert!(!writer.status.ready.load(Ordering::Acquire));
|
||||
assert!(writer.status.buffer_poisoned.load(Ordering::Relaxed));
|
||||
writer.status.report_errors();
|
||||
writer.write_output(&mut output);
|
||||
assert!(!writer.status.buffer_poisoned.load(Ordering::Relaxed));
|
||||
assert_eq!(writer.status.contentions.load(Ordering::Relaxed), 0);
|
||||
assert!(!writer.status.ready.load(Ordering::Acquire));
|
||||
}
|
||||
113
src/client/audio_state_tests.rs
Normal file
113
src/client/audio_state_tests.rs
Normal file
@@ -0,0 +1,113 @@
|
||||
use super::{create_audio_resampler, AudioDecoder, AudioFrame, AudioHandler, Stereo};
|
||||
use cpal::traits::StreamTrait;
|
||||
use hbb_common::anyhow::anyhow;
|
||||
use magnum_opus::{Application::LowDelay, Encoder};
|
||||
use ringbuf::{ring_buffer::RbBase, Rb};
|
||||
use std::sync::{
|
||||
atomic::{AtomicBool, Ordering},
|
||||
Arc,
|
||||
};
|
||||
|
||||
const INPUT_RATE: u32 = 24_000;
|
||||
const OUTPUT_RATE: u32 = 48_000;
|
||||
const CHANNELS: u16 = 2;
|
||||
const PACKETS_PER_SECOND: usize = 100;
|
||||
const MAX_PACKET_BYTES: usize = 4_096;
|
||||
const SAMPLE_VALUE: f32 = 0.25;
|
||||
|
||||
struct TrackedAudioStream(Arc<AtomicBool>);
|
||||
|
||||
impl StreamTrait for TrackedAudioStream {
|
||||
fn play(&self) -> Result<(), cpal::PlayStreamError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn pause(&self) -> Result<(), cpal::PauseStreamError> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for TrackedAudioStream {
|
||||
fn drop(&mut self) {
|
||||
self.0.store(true, Ordering::SeqCst);
|
||||
}
|
||||
}
|
||||
|
||||
fn decoder(sample_rate: u32) -> (AudioDecoder, Vec<f32>) {
|
||||
(
|
||||
AudioDecoder::new(sample_rate, Stereo).unwrap(),
|
||||
vec![0.0; sample_rate as usize * CHANNELS as usize],
|
||||
)
|
||||
}
|
||||
|
||||
fn active_handler(input_rate: u32) -> (AudioHandler, Arc<AtomicBool>) {
|
||||
let dropped = Arc::new(AtomicBool::new(false));
|
||||
let handler = AudioHandler {
|
||||
audio_decoder: Some(decoder(input_rate)),
|
||||
audio_resampler: create_audio_resampler(input_rate, OUTPUT_RATE, CHANNELS).unwrap(),
|
||||
sample_rate: (input_rate, OUTPUT_RATE),
|
||||
audio_stream: Some(Box::new(TrackedAudioStream(dropped.clone()))),
|
||||
channels: CHANNELS,
|
||||
device_channel: CHANNELS,
|
||||
..Default::default()
|
||||
};
|
||||
handler.playback_status.ready.store(true, Ordering::Release);
|
||||
(handler, dropped)
|
||||
}
|
||||
|
||||
fn audio_frame() -> AudioFrame {
|
||||
let samples = OUTPUT_RATE as usize / PACKETS_PER_SECOND * CHANNELS as usize;
|
||||
let mut encoder = Encoder::new(OUTPUT_RATE, Stereo, LowDelay).unwrap();
|
||||
AudioFrame {
|
||||
data: encoder
|
||||
.encode_vec_float(&vec![SAMPLE_VALUE; samples], MAX_PACKET_BYTES)
|
||||
.unwrap()
|
||||
.into(),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn failed_format_change_discards_old_playback_state() {
|
||||
let (mut handler, dropped) = active_handler(INPUT_RATE);
|
||||
handler
|
||||
.audio_buffer
|
||||
.0
|
||||
.lock()
|
||||
.unwrap()
|
||||
.push_slice(&[SAMPLE_VALUE; CHANNELS as usize]);
|
||||
handler.audio_decoder = Some(decoder(OUTPUT_RATE));
|
||||
handler.sample_rate = (OUTPUT_RATE, OUTPUT_RATE);
|
||||
|
||||
handler.handle_audio_start_result(
|
||||
Err(anyhow!("Injected output stream startup failure")),
|
||||
false,
|
||||
);
|
||||
|
||||
assert!(dropped.load(Ordering::SeqCst));
|
||||
assert!(handler.audio_stream.is_none());
|
||||
assert!(handler.audio_resampler.is_none());
|
||||
assert!(handler.audio_decoder.is_none());
|
||||
assert!(!handler.playback_status.ready.load(Ordering::Acquire));
|
||||
handler.handle_frame(audio_frame());
|
||||
assert_eq!(handler.audio_buffer.0.lock().unwrap().occupied_len(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn successful_start_or_compatible_failure_preserves_audio_packet_duration() {
|
||||
for result in [
|
||||
Ok(()),
|
||||
Err(anyhow!("Injected compatible stream replacement failure")),
|
||||
] {
|
||||
let (mut handler, dropped) = active_handler(OUTPUT_RATE);
|
||||
|
||||
handler.handle_audio_start_result(result, true);
|
||||
handler.handle_frame(audio_frame());
|
||||
|
||||
assert!(!dropped.load(Ordering::SeqCst));
|
||||
assert_eq!(
|
||||
handler.audio_buffer.0.lock().unwrap().occupied_len(),
|
||||
OUTPUT_RATE as usize / PACKETS_PER_SECOND * CHANNELS as usize
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
use hbb_common::{fs, log, message_proto::*};
|
||||
use hbb_common::log;
|
||||
use base::{fs, message_proto::*};
|
||||
|
||||
use super::{Data, Interface};
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
use hbb_common::{
|
||||
get_time,
|
||||
message_proto::{Message, VoiceCallRequest, VoiceCallResponse},
|
||||
};
|
||||
use base::message_proto::{Message, VoiceCallRequest, VoiceCallResponse};
|
||||
use hbb_common::get_time;
|
||||
use scrap::CodecFormat;
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -15,8 +15,26 @@ use crate::{
|
||||
// Restart msgbox text is kept as a legacy UI fallback; Flutter handles the type as a control event.
|
||||
const RESTART_REMOTE_DEVICE_NO_DATA_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
const KCP_CLOSE_REASON_FLUSH_DELAY: Duration = Duration::from_millis(30);
|
||||
// Deadline for the parting close-reason send once the peer is presumed gone; KCP waits for send
|
||||
// capacity with no deadline of its own.
|
||||
const KCP_CLOSE_REASON_GONE_DEADLINE: Duration = Duration::from_millis(500);
|
||||
// Grace after ICE reports Disconnected, which it does ~5s after it stops hearing from the peer,
|
||||
// for ~8s in total. Disconnected is transient by design, so this waits out a Wi-Fi roam or a
|
||||
// sleep/wake rather than acting on the first hint.
|
||||
const WEBRTC_SUSPECT_GRACE: Duration = Duration::from_secs(3);
|
||||
// KCP gets no such hint, only how long since a packet arrived; its endpoint pings an idle peer
|
||||
// about every 2s, so this is several missed pings, and matches the 8s WebRTC arrives at.
|
||||
const KCP_PEER_SILENCE_LIMIT: Duration = Duration::from_secs(8);
|
||||
#[cfg(feature = "unix-file-copy-paste")]
|
||||
use crate::{clipboard::try_empty_clipboard_files, clipboard_file::unix_file_clip};
|
||||
use base::{
|
||||
config::keys,
|
||||
fs::{
|
||||
self, can_enable_overwrite_detection, get_job, get_string, new_send_confirm,
|
||||
DigestCheckResult, RemoveJobMeta,
|
||||
},
|
||||
message_proto::{permission_info::Permission, *},
|
||||
};
|
||||
#[cfg(any(
|
||||
target_os = "windows",
|
||||
all(target_os = "macos", feature = "unix-file-copy-paste")
|
||||
@@ -28,12 +46,7 @@ use hbb_common::tokio::sync::mpsc::error::TryRecvError;
|
||||
use hbb_common::{
|
||||
allow_err,
|
||||
config::{self, LocalConfig, PeerConfig, TransferSerde},
|
||||
fs::{
|
||||
self, can_enable_overwrite_detection, get_job, get_string, new_send_confirm,
|
||||
DigestCheckResult, RemoveJobMeta,
|
||||
},
|
||||
get_time, log,
|
||||
message_proto::{permission_info::Permission, *},
|
||||
protobuf::Message as _,
|
||||
rendezvous_proto::ConnType,
|
||||
timeout,
|
||||
@@ -185,6 +198,14 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
.unwrap()
|
||||
.set_connected();
|
||||
let is_secured = peer.is_secured();
|
||||
// Only WebRTC needs refining: its label names the transport that won the race,
|
||||
// not the family ICE ended up nominating, and it is the one path where the two
|
||||
// can disagree with the address the rendezvous observed.
|
||||
let stream_type = if peer.webrtc_remote_ipv6().await.unwrap_or(false) {
|
||||
"WebRTC/IPv6"
|
||||
} else {
|
||||
stream_type
|
||||
};
|
||||
self.handler
|
||||
.set_connection_type(is_secured, direct, stream_type); // flutter -> connection_ready
|
||||
if !is_secured
|
||||
@@ -236,6 +257,9 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
|
||||
let _keep_it = client::hc_connection(feedback, rendezvous_server, token).await;
|
||||
let mut last_recv_time = Instant::now();
|
||||
let mut webrtc_suspect_since: Option<Instant> = None;
|
||||
let mut last_rx_progress = peer.rx_progress();
|
||||
let mut peer_gone = false;
|
||||
|
||||
loop {
|
||||
tokio::select! {
|
||||
@@ -302,6 +326,37 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
self.handler.msgbox("restarting-show", "Restarting remote device", "Connection in progress. Please wait.", "");
|
||||
break;
|
||||
}
|
||||
let rx_progress = peer.rx_progress();
|
||||
// `None` for transports that report none, and it never changes for a
|
||||
// given one, so they are inert here.
|
||||
let progressed = rx_progress != last_rx_progress;
|
||||
last_rx_progress = rx_progress;
|
||||
if peer.webrtc_disconnected() && !progressed {
|
||||
webrtc_suspect_since.get_or_insert_with(Instant::now);
|
||||
} else {
|
||||
webrtc_suspect_since = None;
|
||||
}
|
||||
// Neither limit is a hard upper bound. A send is awaited inline in
|
||||
// this loop, so one in progress delays this tick - bounded on WebRTC
|
||||
// by the timeout the stream was built with, not bounded at all on
|
||||
// KCP. The 30s watchdog above shares the loop and the same delay.
|
||||
peer_gone = webrtc_suspect_since
|
||||
.map_or(false, |since| since.elapsed() >= WEBRTC_SUSPECT_GRACE)
|
||||
|| kcp
|
||||
.as_ref()
|
||||
.and_then(|k| k.peer_silent_for())
|
||||
.map_or(false, |silent| silent >= KCP_PEER_SILENCE_LIMIT);
|
||||
if peer_gone {
|
||||
log::info!("Peer stopped answering, reconnecting");
|
||||
#[cfg(feature = "flutter")]
|
||||
self.handler.msgbox("restarting-show", "Connecting...", "Connection in progress. Please wait.", "");
|
||||
// Sciter knows no `restarting-show` and would show a dialog that
|
||||
// waits for a click, where the timeout this arrives ahead of is
|
||||
// retryable and reconnects on its own. Keep that message for it.
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
self.handler.msgbox("error", "Connection Error", "Timeout", "");
|
||||
break;
|
||||
}
|
||||
let elapsed = fps_instant.elapsed().as_millis();
|
||||
if elapsed < 1000 {
|
||||
continue;
|
||||
@@ -347,6 +402,11 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
s.send(()).ok();
|
||||
}
|
||||
if kcp.is_some() {
|
||||
// Attempted rather than skipped even here: if the loss was one-way the peer
|
||||
// does get it, and drops its side instead of waiting out its own timeout.
|
||||
if peer_gone {
|
||||
peer.set_send_timeout(KCP_CLOSE_REASON_GONE_DEADLINE.as_millis() as u64);
|
||||
}
|
||||
// Send the close reason if it hasn't been sent yet, as KCP cannot detect the socket close event.
|
||||
self.send_close_reason(&mut peer, "kcp").await;
|
||||
// KCP does not send messages immediately, so wait to ensure the last message is sent.
|
||||
@@ -2028,9 +2088,8 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
#[cfg(target_os = "windows")]
|
||||
Ok(file_transfer_send_request::FileType::Printer) => {
|
||||
#[cfg(feature = "flutter")]
|
||||
let action = LocalConfig::get_option(
|
||||
config::keys::OPTION_PRINTER_INCOMING_JOB_ACTION,
|
||||
);
|
||||
let action =
|
||||
LocalConfig::get_option(keys::OPTION_PRINTER_INCOMING_JOB_ACTION);
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
let action = "";
|
||||
if action == "dismiss" {
|
||||
@@ -2039,7 +2098,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
let id = fs::get_next_job_id();
|
||||
#[cfg(feature = "flutter")]
|
||||
let allow_auto_print = LocalConfig::get_bool_option(
|
||||
config::keys::OPTION_PRINTER_ALLOW_AUTO_PRINT,
|
||||
keys::OPTION_PRINTER_ALLOW_AUTO_PRINT,
|
||||
);
|
||||
#[cfg(not(feature = "flutter"))]
|
||||
let allow_auto_print = false;
|
||||
@@ -2047,9 +2106,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
let printer_name = if action == "" {
|
||||
"".to_string()
|
||||
} else {
|
||||
LocalConfig::get_option(
|
||||
config::keys::OPTION_PRINTER_SELECTED_NAME,
|
||||
)
|
||||
LocalConfig::get_option(keys::OPTION_PRINTER_SELECTED_NAME)
|
||||
};
|
||||
self.handler.printer_response(id, _s.path, printer_name);
|
||||
} else {
|
||||
@@ -2115,7 +2172,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
.handle_screenshot_resp(response.sid, response.msg);
|
||||
}
|
||||
Some(message::Union::TerminalResponse(response)) => {
|
||||
use hbb_common::message_proto::terminal_response::Union;
|
||||
use base::message_proto::terminal_response::Union;
|
||||
if let Some(Union::Opened(opened)) = &response.union {
|
||||
if opened.success && !opened.service_id.is_empty() {
|
||||
let mut lc = self.handler.lc.write().unwrap();
|
||||
@@ -2339,14 +2396,10 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "windows", feature = "unix-file-copy-paste"))]
|
||||
async fn handle_cliprdr_msg(
|
||||
&mut self,
|
||||
clip: hbb_common::message_proto::Cliprdr,
|
||||
_peer: &mut Stream,
|
||||
) {
|
||||
async fn handle_cliprdr_msg(&mut self, clip: base::message_proto::Cliprdr, _peer: &mut Stream) {
|
||||
log::debug!("handling cliprdr msg from server peer");
|
||||
#[cfg(feature = "flutter")]
|
||||
if let Some(hbb_common::message_proto::cliprdr::Union::FormatList(_)) = &clip.union {
|
||||
if let Some(base::message_proto::cliprdr::Union::FormatList(_)) = &clip.union {
|
||||
if self.client_conn_id
|
||||
!= clipboard::get_client_conn_id(&crate::flutter::get_cur_peer_id()).unwrap_or(0)
|
||||
{
|
||||
@@ -2456,8 +2509,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
);
|
||||
self.video_threads.insert(display, video_thread);
|
||||
if self.video_threads.len() == 1 {
|
||||
let auto_record =
|
||||
LocalConfig::get_bool_option(config::keys::OPTION_ALLOW_AUTO_RECORD_OUTGOING);
|
||||
let auto_record = LocalConfig::get_bool_option(keys::OPTION_ALLOW_AUTO_RECORD_OUTGOING);
|
||||
self.handler.lc.write().unwrap().record_state = auto_record;
|
||||
self.update_record_state();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use crate::clipboard::{update_clipboard, ClipboardSide};
|
||||
use hbb_common::{message_proto::*, ResultType};
|
||||
use base::message_proto::*;
|
||||
use hbb_common::ResultType;
|
||||
use std::sync::Mutex;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
@@ -58,11 +59,14 @@ impl Screenshot {
|
||||
}
|
||||
|
||||
fn handle_screenshot(&mut self, action: String) -> String {
|
||||
let Some(data) = self.data.take() else {
|
||||
let Some(data) = self.data.as_ref().cloned() else {
|
||||
return "No cached screenshot".to_owned();
|
||||
};
|
||||
match Self::handle_screenshot_(data, action) {
|
||||
Ok(()) => "".to_owned(),
|
||||
Ok(()) => {
|
||||
self.data = None;
|
||||
"".to_owned()
|
||||
}
|
||||
Err(e) => e.to_string(),
|
||||
}
|
||||
}
|
||||
@@ -97,3 +101,37 @@ pub fn set_screenshot(data: bytes::Bytes) {
|
||||
pub fn handle_screenshot(action: String) -> String {
|
||||
SCREENSHOT.lock().unwrap().handle_screenshot(action)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::Screenshot;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
#[test]
|
||||
fn preserves_cached_screenshot_when_save_fails() {
|
||||
let data = bytes::Bytes::from_static(b"screenshot data");
|
||||
let mut screenshot = Screenshot {
|
||||
data: Some(data.clone()),
|
||||
};
|
||||
let unique = SystemTime::now()
|
||||
.duration_since(UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_nanos();
|
||||
let missing_parent = std::env::temp_dir()
|
||||
.join(format!("rustdesk-screenshot-missing-parent-{unique}"))
|
||||
.join("screenshot.png");
|
||||
let valid_path = std::env::temp_dir().join(format!("rustdesk-screenshot-{unique}.png"));
|
||||
|
||||
let error = screenshot.handle_screenshot(format!("0:{}", missing_parent.display()));
|
||||
|
||||
assert!(!error.is_empty());
|
||||
assert_eq!(screenshot.data.as_deref(), Some(data.as_ref()));
|
||||
assert_eq!(
|
||||
screenshot.handle_screenshot(format!("0:{}", valid_path.display())),
|
||||
""
|
||||
);
|
||||
assert!(screenshot.data.is_none());
|
||||
assert_eq!(std::fs::read(&valid_path).unwrap(), data.as_ref());
|
||||
std::fs::remove_file(valid_path).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
use arboard::{ClipboardData, ClipboardFormat};
|
||||
#[cfg(target_os = "linux")]
|
||||
use arboard::{LinuxClipboardKind, SetExtLinux};
|
||||
use hbb_common::{bail, log, message_proto::*, ResultType};
|
||||
use hbb_common::{bail, log, ResultType};
|
||||
use base::message_proto::*;
|
||||
use std::{
|
||||
sync::{Arc, Mutex},
|
||||
time::Duration,
|
||||
@@ -515,10 +516,10 @@ impl ClipboardContext {
|
||||
// The host-side clear file clipboard `let _ = self.inner.clear();`,
|
||||
// does not work on KDE Plasma for the installed version.
|
||||
|
||||
// Don't use `hbb_common::platform::linux::is_kde()` here.
|
||||
// Don't use `base::platform::linux::is_kde()` here.
|
||||
// It's not correct in the server process.
|
||||
#[cfg(target_os = "linux")]
|
||||
let is_kde_x11 = hbb_common::platform::linux::is_kde_session()
|
||||
let is_kde_x11 = base::platform::linux::is_kde_session()
|
||||
&& crate::platform::linux::is_x11();
|
||||
#[cfg(target_os = "macos")]
|
||||
let is_kde_x11 = false;
|
||||
@@ -581,7 +582,7 @@ pub fn get_current_clipboard_msg(
|
||||
multi_clipboards
|
||||
.clipboards
|
||||
.iter()
|
||||
.find(|c| c.format.enum_value() == Ok(hbb_common::message_proto::ClipboardFormat::Text))
|
||||
.find(|c| c.format.enum_value() == Ok(base::message_proto::ClipboardFormat::Text))
|
||||
.map(|c| {
|
||||
let mut msg = Message::new();
|
||||
msg.set_clipboard(c.clone());
|
||||
@@ -629,8 +630,8 @@ mod proto {
|
||||
use arboard::ClipboardData;
|
||||
use hbb_common::{
|
||||
compress::{compress as compress_func, decompress},
|
||||
message_proto::{Clipboard, ClipboardFormat, Message, MultiClipboards},
|
||||
};
|
||||
use base::message_proto::{Clipboard, ClipboardFormat, Message, MultiClipboards};
|
||||
|
||||
fn plain_to_proto(s: String, format: ClipboardFormat) -> Clipboard {
|
||||
let compressed = compress_func(s.as_bytes());
|
||||
@@ -698,7 +699,7 @@ mod proto {
|
||||
let content = if compress {
|
||||
compressed
|
||||
} else {
|
||||
s.bytes().collect::<Vec<u8>>()
|
||||
d
|
||||
};
|
||||
Clipboard {
|
||||
compress,
|
||||
@@ -794,6 +795,29 @@ mod proto {
|
||||
msg
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(all(test, not(target_os = "android")))]
|
||||
mod tests {
|
||||
use super::{from_clipboard, special_to_proto};
|
||||
use arboard::ClipboardData;
|
||||
|
||||
#[test]
|
||||
fn preserves_uncompressed_special_clipboard_data() {
|
||||
let data = vec![0x01, 0x02, 0x03];
|
||||
let name = "custom-format".to_owned();
|
||||
|
||||
let clipboard = special_to_proto(data.clone(), name.clone());
|
||||
|
||||
assert!(!clipboard.compress);
|
||||
assert_eq!(clipboard.content.as_ref(), data.as_slice());
|
||||
assert_eq!(clipboard.special_name, name);
|
||||
assert!(matches!(
|
||||
from_clipboard(clipboard),
|
||||
Some(ClipboardData::Special((restored_name, restored_data)))
|
||||
if restored_name == name && restored_data == data
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(test, not(target_os = "android")))]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use clipboard::ClipboardFile;
|
||||
use hbb_common::message_proto::*;
|
||||
use base::message_proto::*;
|
||||
|
||||
pub fn clip_2_msg(clip: ClipboardFile) -> Message {
|
||||
match clip {
|
||||
|
||||
319
src/common.rs
319
src/common.rs
@@ -1,13 +1,14 @@
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
future::Future,
|
||||
net::{SocketAddr, ToSocketAddrs},
|
||||
net::SocketAddr,
|
||||
sync::{Arc, Mutex, RwLock},
|
||||
task::Poll,
|
||||
};
|
||||
|
||||
use serde_json::{json, Map, Value};
|
||||
|
||||
use base::{config::keys, message_proto::*};
|
||||
#[cfg(not(target_os = "ios"))]
|
||||
use hbb_common::whoami;
|
||||
use hbb_common::{
|
||||
@@ -16,13 +17,10 @@ use hbb_common::{
|
||||
async_recursion::async_recursion,
|
||||
bail, base64,
|
||||
bytes::Bytes,
|
||||
config::{
|
||||
self, keys, use_ws, Config, LocalConfig, CONNECT_TIMEOUT, READ_TIMEOUT, RENDEZVOUS_PORT,
|
||||
},
|
||||
config::{self, use_ws, Config, LocalConfig, CONNECT_TIMEOUT, READ_TIMEOUT, RENDEZVOUS_PORT},
|
||||
futures::future::join_all,
|
||||
futures_util::future::poll_fn,
|
||||
get_version_number, log,
|
||||
message_proto::*,
|
||||
protobuf::{Enum, Message as _},
|
||||
rendezvous_proto::*,
|
||||
socket_client,
|
||||
@@ -410,6 +408,11 @@ pub fn resample_channels(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "use_dasp", feature = "use_samplerate"))]
|
||||
compile_error!(
|
||||
"features `use_dasp` and `use_samplerate` are mutually exclusive; disable default features before selecting `use_samplerate`"
|
||||
);
|
||||
|
||||
#[cfg(feature = "use_dasp")]
|
||||
pub fn audio_resample(
|
||||
data: &[f32],
|
||||
@@ -446,7 +449,7 @@ pub fn audio_resample(
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "use_samplerate")]
|
||||
#[cfg(all(feature = "use_samplerate", not(feature = "use_dasp")))]
|
||||
pub fn audio_resample(
|
||||
data: &[f32],
|
||||
sample_rate0: u32,
|
||||
@@ -1153,6 +1156,13 @@ pub fn is_public(url: &str) -> bool {
|
||||
host == "rustdesk.com" || host.ends_with(".rustdesk.com")
|
||||
}
|
||||
|
||||
pub fn get_tcp_punch_enabled() -> bool {
|
||||
config::option2bool(
|
||||
keys::OPTION_ENABLE_TCP_PUNCH,
|
||||
&get_local_option(keys::OPTION_ENABLE_TCP_PUNCH),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn get_udp_punch_enabled() -> bool {
|
||||
config::option2bool(
|
||||
keys::OPTION_ENABLE_UDP_PUNCH,
|
||||
@@ -1167,9 +1177,19 @@ pub fn get_ipv6_punch_enabled() -> bool {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn get_webrtc_enabled() -> bool {
|
||||
config::option2bool(
|
||||
keys::OPTION_ENABLE_WEBRTC,
|
||||
&get_local_option(keys::OPTION_ENABLE_WEBRTC),
|
||||
)
|
||||
}
|
||||
|
||||
pub fn get_local_option(key: &str) -> String {
|
||||
let v = LocalConfig::get_option(key);
|
||||
if key == keys::OPTION_ENABLE_UDP_PUNCH || key == keys::OPTION_ENABLE_IPV6_PUNCH {
|
||||
if key == keys::OPTION_ENABLE_UDP_PUNCH
|
||||
|| key == keys::OPTION_ENABLE_IPV6_PUNCH
|
||||
|| key == keys::OPTION_ENABLE_WEBRTC
|
||||
{
|
||||
if v.is_empty() {
|
||||
if !is_public(&Config::get_rendezvous_server()) {
|
||||
return "N".to_owned();
|
||||
@@ -2126,11 +2146,21 @@ pub fn get_rs_pk(str_base64: &str) -> Option<sign::PublicKey> {
|
||||
}
|
||||
|
||||
pub fn decode_id_pk(signed: &[u8], key: &sign::PublicKey) -> ResultType<(String, [u8; 32])> {
|
||||
let (id, pk, _) = decode_id_pk_dtls(signed, key)?;
|
||||
Ok((id, pk))
|
||||
}
|
||||
|
||||
/// Like [`decode_id_pk`] but also returns the signed DTLS certificate fingerprint (empty string
|
||||
/// for non-WebRTC peers), used to bind a WebRTC DTLS channel to the verified peer identity.
|
||||
pub fn decode_id_pk_dtls(
|
||||
signed: &[u8],
|
||||
key: &sign::PublicKey,
|
||||
) -> ResultType<(String, [u8; 32], String)> {
|
||||
let res = IdPk::parse_from_bytes(
|
||||
&sign::verify(signed, key).map_err(|_| anyhow!("Signature mismatch"))?,
|
||||
)?;
|
||||
if let Some(pk) = get_pk(&res.pk) {
|
||||
Ok((res.id, pk))
|
||||
Ok((res.id, pk, res.dtls_fingerprint))
|
||||
} else {
|
||||
bail!("Wrong their public length");
|
||||
}
|
||||
@@ -2432,16 +2462,26 @@ pub fn is_udp_disabled() -> bool {
|
||||
Config::get_option(keys::OPTION_DISABLE_UDP) == "Y"
|
||||
}
|
||||
|
||||
/// Run KCP with its congestion window (nc=0) instead of the turbo profile it has always shipped.
|
||||
///
|
||||
/// Opt-in: which profile wins depends on why packets are lost — nc=1 deepens real congestion,
|
||||
/// while nc=0 reads random loss as congestion and its RTO backoff drops cwnd to 1. Undecidable
|
||||
/// without a shaped link, so keep what users run today.
|
||||
#[inline]
|
||||
pub fn get_kcp_cc_enabled() -> bool {
|
||||
let k = keys::OPTION_ALLOW_KCP_CC;
|
||||
config::option2bool(k, &Config::get_option(k))
|
||||
}
|
||||
|
||||
// this crate https://github.com/yoshd/stun-client supports nat type
|
||||
async fn stun_ipv6_test(stun_server: &str) -> ResultType<(SocketAddr, String)> {
|
||||
use std::net::ToSocketAddrs;
|
||||
async fn stun_ipv6_test(stun_server: String) -> ResultType<(SocketAddr, String)> {
|
||||
use stunclient::StunClient;
|
||||
let local_addr = SocketAddr::from(([0u16; 8], 0)); // [::]:0
|
||||
let socket = UdpSocket::bind(&local_addr).await?;
|
||||
let Some(stun_addr) = stun_server
|
||||
.to_socket_addrs()?
|
||||
.filter(|x| x.is_ipv6())
|
||||
.next()
|
||||
// Resolve via tokio so DNS never blocks the async runtime worker.
|
||||
let Some(stun_addr) = tokio::net::lookup_host(&stun_server)
|
||||
.await?
|
||||
.find(|x| x.is_ipv6())
|
||||
else {
|
||||
bail!(
|
||||
"Failed to resolve STUN ipv6 server address: {}",
|
||||
@@ -2451,81 +2491,36 @@ async fn stun_ipv6_test(stun_server: &str) -> ResultType<(SocketAddr, String)> {
|
||||
let client = StunClient::new(stun_addr);
|
||||
let addr = client.query_external_address_async(&socket).await?;
|
||||
Ok(if addr.ip().is_ipv6() {
|
||||
(addr, stun_server.to_owned())
|
||||
(addr, stun_server)
|
||||
} else {
|
||||
bail!("STUN server returned non-IPv6 address: {}", addr)
|
||||
})
|
||||
}
|
||||
|
||||
async fn stun_ipv4_test(stun_server: &str) -> ResultType<(SocketAddr, String)> {
|
||||
use std::net::ToSocketAddrs;
|
||||
use stunclient::StunClient;
|
||||
let local_addr = SocketAddr::from(([0u8; 4], 0));
|
||||
let socket = UdpSocket::bind(&local_addr).await?;
|
||||
let Some(stun_addr) = stun_server
|
||||
.to_socket_addrs()?
|
||||
.filter(|x| x.is_ipv4())
|
||||
.next()
|
||||
else {
|
||||
bail!(
|
||||
"Failed to resolve STUN ipv4 server address: {}",
|
||||
stun_server
|
||||
);
|
||||
};
|
||||
let client = StunClient::new(stun_addr);
|
||||
let addr = client.query_external_address_async(&socket).await?;
|
||||
Ok(if addr.ip().is_ipv4() {
|
||||
(addr, stun_server.to_owned())
|
||||
} else {
|
||||
bail!("STUN server returned non-IPv6 address: {}", addr)
|
||||
})
|
||||
}
|
||||
|
||||
static STUNS_V4: [&str; 3] = [
|
||||
"stun.l.google.com:19302",
|
||||
"stun.cloudflare.com:3478",
|
||||
"stun.nextcloud.com:3478",
|
||||
];
|
||||
|
||||
static STUNS_V6: [&str; 3] = [
|
||||
"stun.l.google.com:19302",
|
||||
"stun.cloudflare.com:3478",
|
||||
"stun.nextcloud.com:3478",
|
||||
];
|
||||
|
||||
pub async fn test_nat_ipv4() -> ResultType<(SocketAddr, String)> {
|
||||
use hbb_common::futures::future::{select_ok, FutureExt};
|
||||
let tests = STUNS_V4
|
||||
.iter()
|
||||
.map(|&stun| stun_ipv4_test(stun).boxed())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
match select_ok(tests).await {
|
||||
Ok(res) => {
|
||||
return Ok(res.0);
|
||||
}
|
||||
Err(e) => {
|
||||
bail!(
|
||||
"Failed to get public IPv4 address via public STUN servers: {}",
|
||||
e
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
async fn test_bind_ipv6() -> ResultType<SocketAddr> {
|
||||
use hbb_common::futures::future::FutureExt;
|
||||
let local_addr = SocketAddr::from(([0u16; 8], 0)); // [::]:0
|
||||
let socket = UdpSocket::bind(local_addr).await?;
|
||||
let addr = STUNS_V6[0]
|
||||
.to_socket_addrs()?
|
||||
.filter(|x| x.is_ipv6())
|
||||
.next()
|
||||
.ok_or_else(|| {
|
||||
anyhow!(
|
||||
"Failed to resolve STUN ipv6 server address: {}",
|
||||
STUNS_V6[0]
|
||||
)
|
||||
})?;
|
||||
// Nothing is sent - `connect` only makes the kernel pick a route and a source address - so any
|
||||
// resolvable target answers equally and the whole cost is DNS. Race the lookups rather than
|
||||
// walk them: this is awaited inline on the connection path, not every STUN host publishes a
|
||||
// AAAA, and one resolver that hangs must not decide whether this host has v6.
|
||||
let lookups = hbb_common::webrtc::WebRTCStream::default_stun_servers()
|
||||
.into_iter()
|
||||
.map(|stun| {
|
||||
(async move {
|
||||
let addr = tokio::net::lookup_host(&stun)
|
||||
.await?
|
||||
.find(|x| x.is_ipv6())
|
||||
.ok_or_else(|| {
|
||||
anyhow!("Failed to resolve STUN ipv6 server address: {}", stun)
|
||||
})?;
|
||||
Ok::<SocketAddr, hbb_common::anyhow::Error>(addr)
|
||||
})
|
||||
.boxed()
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
let (addr, _) = hbb_common::futures::future::select_ok(lookups).await?;
|
||||
socket.connect(addr).await?;
|
||||
Ok(socket.local_addr()?)
|
||||
}
|
||||
@@ -2592,9 +2587,9 @@ pub async fn test_ipv6() -> Option<tokio::task::JoinHandle<()>> {
|
||||
|
||||
Some(tokio::spawn(async {
|
||||
use hbb_common::futures::future::{select_ok, FutureExt};
|
||||
let tests = STUNS_V6
|
||||
.iter()
|
||||
.map(|&stun| stun_ipv6_test(stun).boxed())
|
||||
let tests = hbb_common::webrtc::WebRTCStream::default_stun_servers()
|
||||
.into_iter()
|
||||
.map(|stun| stun_ipv6_test(stun).boxed())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
match select_ok(tests).await {
|
||||
@@ -2615,51 +2610,117 @@ pub async fn test_ipv6() -> Option<tokio::task::JoinHandle<()>> {
|
||||
}))
|
||||
}
|
||||
|
||||
// A punch packet carries a magic and a transaction id so a reply can be *proven* to answer this
|
||||
// probe. The punch it replaces sent a zero-length datagram and called the hole open on whatever
|
||||
// arrived next - which the rendezvous NAT test's own leftover replies satisfied instantly, so the
|
||||
// retry loop below never actually ran and its success meant nothing.
|
||||
const PUNCH_PROBE: [u8; 4] = *b"RDP?";
|
||||
const PUNCH_ACK: [u8; 4] = *b"RDP!";
|
||||
const PUNCH_PACKET_LEN: usize = 12;
|
||||
|
||||
fn punch_packet(tag: &[u8; 4], tid: u64) -> [u8; PUNCH_PACKET_LEN] {
|
||||
let mut packet = [0u8; PUNCH_PACKET_LEN];
|
||||
packet[..4].copy_from_slice(tag);
|
||||
packet[4..].copy_from_slice(&tid.to_le_bytes());
|
||||
packet
|
||||
}
|
||||
|
||||
fn punch_tid(packet: &[u8], tag: &[u8; 4]) -> Option<u64> {
|
||||
if packet.len() != PUNCH_PACKET_LEN || packet[..4] != tag[..] {
|
||||
return None;
|
||||
}
|
||||
packet[4..].try_into().ok().map(u64::from_le_bytes)
|
||||
}
|
||||
|
||||
/// Punch until one of our own probes is acknowledged. Both ends run this identically - each
|
||||
/// probes, each answers the other's probes - and each returns only once a reply carrying its own
|
||||
/// transaction id comes back, the one thing that proves the pair carries traffic both ways.
|
||||
///
|
||||
/// Returning is therefore a fact rather than a guess, which is what lets the caller stop instead
|
||||
/// of handing a dead socket to a transport whose only way to discover the truth is to time out.
|
||||
///
|
||||
/// A datagram that is neither probe nor acknowledgement is returned rather than dropped: it means
|
||||
/// the peer finished first and is already speaking KCP, whose SYN is never retransmitted.
|
||||
///
|
||||
/// Only the connector stops on its own acknowledgement, because only it has something to send
|
||||
/// next. An acknowledgement proves our probe came back, not that the peer's probe was answered -
|
||||
/// and after this returns nothing answers probes any more, since KCP's io loop drops anything
|
||||
/// shorter than its header. A listener that stopped here would go mute while a peer whose own
|
||||
/// probe or answer was lost - the normal state of a hole that is still opening - kept probing an
|
||||
/// endpoint that works, until it timed out. So the listener stops on the peer's first real packet.
|
||||
pub async fn punch_udp(
|
||||
socket: Arc<UdpSocket>,
|
||||
listen: bool,
|
||||
) -> ResultType<Option<bytes::BytesMut>> {
|
||||
let tid = ((hbb_common::time_based_rand() as u64) << 32) | hbb_common::time_based_rand() as u64;
|
||||
let probe = punch_packet(&PUNCH_PROBE, tid);
|
||||
let mut data = [0u8; 1500];
|
||||
// `connect` does not flush the receive queue, so the NAT test's extra replies are still in it.
|
||||
while socket.try_recv(&mut data).is_ok() {}
|
||||
|
||||
let mut retry_interval = Duration::from_millis(20);
|
||||
const MAX_INTERVAL: Duration = Duration::from_millis(200);
|
||||
const MAX_TIME: Duration = Duration::from_secs(20);
|
||||
let mut packets_sent = 0;
|
||||
socket.send(&[]).await.ok();
|
||||
packets_sent += 1;
|
||||
let mut last_send_time = Instant::now();
|
||||
// Both ends start within one rendezvous round trip of each other and the acknowledgement is
|
||||
// one peer round trip, so a pair that has not answered in this long is not going to. The old
|
||||
// 20s came from having no way to tell "not yet" from "never".
|
||||
const MAX_TIME: Duration = Duration::from_secs(3);
|
||||
let mut probes_sent = 0u32;
|
||||
let mut probes_seen = 0u32;
|
||||
let mut acked = false;
|
||||
let mut recv_errors = 0u32;
|
||||
socket.send(&probe).await.ok();
|
||||
probes_sent += 1;
|
||||
let tm = Instant::now();
|
||||
let mut data = [0u8; 1500];
|
||||
// Absolute instants, not relative sleeps: `select!` rebuilds every arm each iteration, so a
|
||||
// peer that keeps the receive side ready restarts a relative timer before it can fire. That
|
||||
// both defeats MAX_TIME and starves the retransmit, and the peer decides the rate - an
|
||||
// old-build peer's empty datagrams match no arm below and loop without even a pause.
|
||||
let deadline = tm + MAX_TIME;
|
||||
let mut next_probe = tm + retry_interval;
|
||||
|
||||
loop {
|
||||
tokio::select! {
|
||||
_ = hbb_common::sleep(retry_interval.as_secs_f32()) => {
|
||||
if tm.elapsed() > MAX_TIME {
|
||||
bail!("UDP punch is timed out, stop sending packets after {:?} packets", packets_sent);
|
||||
}
|
||||
let elapsed = last_send_time.elapsed();
|
||||
|
||||
if elapsed >= retry_interval {
|
||||
socket.send(&[]).await.ok();
|
||||
packets_sent += 1;
|
||||
|
||||
// Exponentially increase interval to reduce network pressure
|
||||
retry_interval = std::cmp::min(
|
||||
Duration::from_millis((retry_interval.as_millis() as f64 * 1.5) as u64),
|
||||
MAX_INTERVAL
|
||||
);
|
||||
last_send_time = Instant::now();
|
||||
}
|
||||
_ = tokio::time::sleep_until(deadline) => {
|
||||
bail!("UDP punch is timed out, {probes_sent} probes sent, {probes_seen} probes received, acked: {acked}, {recv_errors} recv errors absorbed");
|
||||
}
|
||||
_ = tokio::time::sleep_until(next_probe) => {
|
||||
socket.send(&probe).await.ok();
|
||||
probes_sent += 1;
|
||||
retry_interval = std::cmp::min(retry_interval.mul_f64(1.5), MAX_INTERVAL);
|
||||
next_probe = Instant::now() + retry_interval;
|
||||
}
|
||||
res = socket.recv(&mut data) => match res {
|
||||
Err(e) => bail!("UDP punch failed, {packets_sent} packets sent: {e}"),
|
||||
Err(e) => {
|
||||
// ICMP unreachable from the peer's NAT is expected while the hole forms and
|
||||
// surfaces here as ConnectionReset/Refused; treat it as loss, MAX_TIME bounds
|
||||
// the attempt. Log only the first - this retries every 10ms.
|
||||
recv_errors += 1;
|
||||
if recv_errors == 1 {
|
||||
log::debug!("UDP punch recv error (treated as loss): {e}");
|
||||
}
|
||||
hbb_common::sleep(0.01).await;
|
||||
}
|
||||
Ok(n) => {
|
||||
// log::debug!("UDP punch succeeded after sending {} packets after {:?}", packets_sent, tm.elapsed());
|
||||
if listen {
|
||||
if n == 0 {
|
||||
continue;
|
||||
let ack = punch_tid(&data[..n], &PUNCH_ACK);
|
||||
if ack == Some(tid) {
|
||||
if !listen {
|
||||
log::debug!(
|
||||
"UDP punch confirmed in {:?}, {probes_sent} probes sent, {probes_seen} received",
|
||||
tm.elapsed()
|
||||
);
|
||||
return Ok(None);
|
||||
}
|
||||
acked = true;
|
||||
} else if let Some(peer_tid) = punch_tid(&data[..n], &PUNCH_PROBE) {
|
||||
probes_seen += 1;
|
||||
socket.send(&punch_packet(&PUNCH_ACK, peer_tid)).await.ok();
|
||||
} else if ack.is_none() && n > 0 {
|
||||
log::debug!(
|
||||
"UDP punch confirmed by {n} bytes of peer data in {:?}, {probes_sent} probes sent",
|
||||
tm.elapsed()
|
||||
);
|
||||
return Ok(Some(bytes::BytesMut::from(&data[..n])));
|
||||
}
|
||||
return Ok(None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2783,6 +2844,38 @@ mod tests {
|
||||
)
|
||||
}
|
||||
|
||||
// The deadline must hold against a peer that keeps the receive side ready. `select!` rebuilds
|
||||
// its arms every iteration, so a relative sleep would be restarted by every datagram and the
|
||||
// punch would run for as long as the peer keeps talking, with no outer timeout to stop it.
|
||||
#[tokio::test]
|
||||
async fn test_udp_punch_deadline_survives_a_talkative_peer() {
|
||||
let a = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
||||
let b = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
||||
let (a_addr, b_addr) = (a.local_addr().unwrap(), b.local_addr().unwrap());
|
||||
a.connect(b_addr).await.unwrap();
|
||||
b.connect(a_addr).await.unwrap();
|
||||
// Empty datagrams answer no probe and match no return branch, so they only feed the loop.
|
||||
// Sent well past the punch deadline so a restarted timer would show up as a long run.
|
||||
let flooder = tokio::spawn(async move {
|
||||
let end = Instant::now() + Duration::from_secs(12);
|
||||
while Instant::now() < end {
|
||||
if b.send(&[]).await.is_err() {
|
||||
break;
|
||||
}
|
||||
sleep(Duration::from_millis(5)).await;
|
||||
}
|
||||
});
|
||||
let start = Instant::now();
|
||||
let res = punch_udp(Arc::new(a), false).await;
|
||||
let elapsed = start.elapsed();
|
||||
flooder.abort();
|
||||
assert!(res.is_err(), "the punch should have timed out");
|
||||
assert!(
|
||||
elapsed < Duration::from_secs(6),
|
||||
"the punch ran for {elapsed:?}; its deadline did not hold"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn untrusted_peer_id_validation() {
|
||||
let cases = [
|
||||
|
||||
@@ -3,9 +3,10 @@ use crate::client::translate;
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use crate::platform::breakdown_callback;
|
||||
use base::config::keys;
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use hbb_common::platform::register_breakdown_handler;
|
||||
use base::platform::register_breakdown_handler;
|
||||
use hbb_common::{config, log};
|
||||
#[cfg(windows)]
|
||||
use tauri_winrt_notification::{Duration, Sound, Toast};
|
||||
@@ -113,7 +114,7 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
}
|
||||
#[cfg(windows)]
|
||||
if args.contains(&"--connect".to_string()) || args.contains(&"--view-camera".to_string()) {
|
||||
hbb_common::platform::windows::start_cpu_performance_monitor();
|
||||
base::platform::windows::start_cpu_performance_monitor();
|
||||
}
|
||||
#[cfg(feature = "flutter")]
|
||||
if _is_flutter_invoke_new_connection {
|
||||
@@ -889,7 +890,7 @@ fn is_user_main_ipc_scope_cli_command(args: &[String]) -> bool {
|
||||
|
||||
#[inline]
|
||||
fn is_cli_setting_change_disabled() -> bool {
|
||||
let option = config::keys::OPTION_ALLOW_COMMAND_LINE_SETTINGS_WHEN_SETTINGS_DISABLED;
|
||||
let option = keys::OPTION_ALLOW_COMMAND_LINE_SETTINGS_WHEN_SETTINGS_DISABLED;
|
||||
let allow_command_line_settings =
|
||||
config::option2bool(option, &crate::get_builtin_option(option));
|
||||
config::is_disable_settings() && !allow_command_line_settings
|
||||
|
||||
@@ -10,9 +10,10 @@ use hbb_common::dlopen::{
|
||||
Error as LibError,
|
||||
};
|
||||
use hbb_common::{
|
||||
anyhow::anyhow, bail, config::LocalConfig, get_version_number, log, message_proto::*,
|
||||
anyhow::anyhow, bail, config::LocalConfig, get_version_number, log,
|
||||
rendezvous_proto::ConnType, ResultType,
|
||||
};
|
||||
use base::message_proto::*;
|
||||
use serde::Serialize;
|
||||
use serde_json::json;
|
||||
#[cfg(target_os = "windows")]
|
||||
@@ -1102,7 +1103,7 @@ impl InvokeUiSession for FlutterHandler {
|
||||
}
|
||||
|
||||
fn handle_terminal_response(&self, response: TerminalResponse) {
|
||||
use hbb_common::message_proto::terminal_response::Union;
|
||||
use base::message_proto::terminal_response::Union;
|
||||
|
||||
match response.union {
|
||||
Some(Union::Opened(opened)) => {
|
||||
|
||||
@@ -14,10 +14,14 @@ use crate::{
|
||||
use flutter_rust_bridge::{StreamSink, SyncReturn};
|
||||
use hbb_common::{
|
||||
config::{self, LocalConfig, PeerConfig, PeerInfoSerde},
|
||||
fs, lazy_static, log,
|
||||
lazy_static, log,
|
||||
rendezvous_proto::ConnType,
|
||||
ResultType,
|
||||
};
|
||||
use base::{
|
||||
config::keys,
|
||||
fs,
|
||||
};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
path::PathBuf,
|
||||
@@ -330,7 +334,7 @@ pub fn session_toggle_option(session_id: SessionID, value: String) {
|
||||
}
|
||||
#[cfg(feature = "unix-file-copy-paste")]
|
||||
if sessions::get_session_by_session_id(&session_id).is_some()
|
||||
&& (value == config::keys::OPTION_ENABLE_FILE_COPY_PASTE || value == "view-only")
|
||||
&& (value == keys::OPTION_ENABLE_FILE_COPY_PASTE || value == "view-only")
|
||||
{
|
||||
crate::flutter::update_file_clipboard_required();
|
||||
}
|
||||
@@ -965,12 +969,12 @@ pub fn main_get_error() -> String {
|
||||
pub fn main_set_option(key: String, value: String) {
|
||||
#[cfg(target_os = "android")]
|
||||
{
|
||||
let is_permission_option = key.eq(config::keys::OPTION_ENABLE_CLIPBOARD)
|
||||
|| key.eq(config::keys::OPTION_ENABLE_FILE_TRANSFER)
|
||||
|| key.eq(config::keys::OPTION_ENABLE_AUDIO);
|
||||
let is_permission_option = key.eq(keys::OPTION_ENABLE_CLIPBOARD)
|
||||
|| key.eq(keys::OPTION_ENABLE_FILE_TRANSFER)
|
||||
|| key.eq(keys::OPTION_ENABLE_AUDIO);
|
||||
let allow_perm_change_in_accept_window = config::option2bool(
|
||||
config::keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW,
|
||||
&crate::get_builtin_option(config::keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW),
|
||||
keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW,
|
||||
&crate::get_builtin_option(keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW),
|
||||
);
|
||||
if is_permission_option
|
||||
&& !allow_perm_change_in_accept_window
|
||||
@@ -985,14 +989,14 @@ pub fn main_set_option(key: String, value: String) {
|
||||
}
|
||||
}
|
||||
#[cfg(target_os = "android")]
|
||||
if key.eq(config::keys::OPTION_ENABLE_KEYBOARD) {
|
||||
if key.eq(keys::OPTION_ENABLE_KEYBOARD) {
|
||||
crate::ui_cm_interface::switch_permission_all(
|
||||
"keyboard".to_owned(),
|
||||
config::option2bool(&key, &value),
|
||||
);
|
||||
}
|
||||
#[cfg(target_os = "android")]
|
||||
if key.eq(config::keys::OPTION_ENABLE_CLIPBOARD) {
|
||||
if key.eq(keys::OPTION_ENABLE_CLIPBOARD) {
|
||||
crate::ui_cm_interface::switch_permission_all(
|
||||
"clipboard".to_owned(),
|
||||
config::option2bool(&key, &value),
|
||||
@@ -1002,11 +1006,11 @@ pub fn main_set_option(key: String, value: String) {
|
||||
// If `is_allow_tls_fallback` and https proxy is used, we need to restart rendezvous mediator.
|
||||
// No need to check if https proxy is used, because this option does not change frequently
|
||||
// and restarting mediator is safe even https proxy is not used.
|
||||
let is_allow_tls_fallback = key.eq(config::keys::OPTION_ALLOW_INSECURE_TLS_FALLBACK);
|
||||
let is_allow_tls_fallback = key.eq(keys::OPTION_ALLOW_INSECURE_TLS_FALLBACK);
|
||||
if is_allow_tls_fallback
|
||||
|| key.eq("custom-rendezvous-server")
|
||||
|| key.eq(config::keys::OPTION_ALLOW_WEBSOCKET)
|
||||
|| key.eq(config::keys::OPTION_DISABLE_UDP)
|
||||
|| key.eq(keys::OPTION_ALLOW_WEBSOCKET)
|
||||
|| key.eq(keys::OPTION_DISABLE_UDP)
|
||||
|| key.eq("api-server")
|
||||
{
|
||||
if is_allow_tls_fallback {
|
||||
@@ -1035,14 +1039,14 @@ pub fn main_set_options(json: String) {
|
||||
#[cfg(target_os = "android")]
|
||||
{
|
||||
let allow_perm_change_in_accept_window = config::option2bool(
|
||||
config::keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW,
|
||||
&crate::get_builtin_option(config::keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW),
|
||||
keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW,
|
||||
&crate::get_builtin_option(keys::OPTION_ENABLE_PERM_CHANGE_IN_ACCEPT_WINDOW),
|
||||
);
|
||||
if !allow_perm_change_in_accept_window && crate::ui_cm_interface::has_active_clients() {
|
||||
for key in [
|
||||
config::keys::OPTION_ENABLE_CLIPBOARD,
|
||||
config::keys::OPTION_ENABLE_FILE_TRANSFER,
|
||||
config::keys::OPTION_ENABLE_AUDIO,
|
||||
keys::OPTION_ENABLE_CLIPBOARD,
|
||||
keys::OPTION_ENABLE_FILE_TRANSFER,
|
||||
keys::OPTION_ENABLE_AUDIO,
|
||||
] {
|
||||
if let Some(value) = map.remove(key) {
|
||||
log::info!(
|
||||
@@ -1210,8 +1214,8 @@ pub fn main_set_env(key: String, value: Option<String>) -> SyncReturn<()> {
|
||||
}
|
||||
|
||||
pub fn main_set_local_option(key: String, value: String) {
|
||||
let is_texture_render_key = key.eq(config::keys::OPTION_TEXTURE_RENDER);
|
||||
let is_d3d_render_key = key.eq(config::keys::OPTION_ALLOW_D3D_RENDER);
|
||||
let is_texture_render_key = key.eq(keys::OPTION_TEXTURE_RENDER);
|
||||
let is_d3d_render_key = key.eq(keys::OPTION_ALLOW_D3D_RENDER);
|
||||
set_local_option(key, value.clone());
|
||||
let is_render_target =
|
||||
|session: &crate::flutter::FlutterSession| session.is_default() || session.is_view_camera();
|
||||
@@ -2651,7 +2655,7 @@ pub fn main_get_common(key: String) -> String {
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
return false.to_string();
|
||||
} else if key == "transfer-job-id" {
|
||||
return hbb_common::fs::get_next_job_id().to_string();
|
||||
return base::fs::get_next_job_id().to_string();
|
||||
} else if key == "is-remote-modify-enabled-by-control-permissions" {
|
||||
return match is_remote_modify_enabled_by_control_permissions() {
|
||||
Some(true) => "true",
|
||||
|
||||
@@ -7,10 +7,11 @@ use std::{
|
||||
#[cfg(not(any(target_os = "ios")))]
|
||||
use crate::{ui_interface::get_builtin_option, Connection};
|
||||
use hbb_common::{
|
||||
config::{self, keys, Config, LocalConfig},
|
||||
config::{self, Config, LocalConfig},
|
||||
log,
|
||||
tokio::{self, sync::broadcast, time::Instant},
|
||||
};
|
||||
use base::config::keys;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
|
||||
|
||||
15
src/ipc.rs
15
src/ipc.rs
@@ -34,7 +34,7 @@ use hbb_common::anyhow;
|
||||
use hbb_common::{
|
||||
allow_err, bail, bytes,
|
||||
bytes_codec::BytesCodec,
|
||||
config::{self, keys::OPTION_ALLOW_WEBSOCKET, Config, Config2},
|
||||
config::{self, Config, Config2},
|
||||
futures::StreamExt as _,
|
||||
futures_util::sink::SinkExt,
|
||||
log, password_security as password, timeout,
|
||||
@@ -45,6 +45,7 @@ use hbb_common::{
|
||||
tokio_util::codec::Framed,
|
||||
ResultType,
|
||||
};
|
||||
use base::config::keys::{self, OPTION_ALLOW_WEBSOCKET};
|
||||
#[cfg(windows)]
|
||||
pub(crate) use ipc_auth::authorize_windows_portable_service_ipc_connection;
|
||||
#[cfg(windows)]
|
||||
@@ -752,9 +753,9 @@ impl CheckIfRestart {
|
||||
audio_input: Config::get_option("audio-input"),
|
||||
voice_call_input: Config::get_option("voice-call-input"),
|
||||
ws: Config::get_option(OPTION_ALLOW_WEBSOCKET),
|
||||
disable_udp: Config::get_option(config::keys::OPTION_DISABLE_UDP),
|
||||
disable_udp: Config::get_option(keys::OPTION_DISABLE_UDP),
|
||||
allow_insecure_tls_fallback: Config::get_option(
|
||||
config::keys::OPTION_ALLOW_INSECURE_TLS_FALLBACK,
|
||||
keys::OPTION_ALLOW_INSECURE_TLS_FALLBACK,
|
||||
),
|
||||
api_server: Config::get_option("api-server"),
|
||||
}
|
||||
@@ -766,12 +767,12 @@ impl Drop for CheckIfRestart {
|
||||
// No need to check if https proxy is used, because this option does not change frequently
|
||||
// and restarting mediator is safe even https proxy is not used.
|
||||
let allow_insecure_tls_fallback_changed = self.allow_insecure_tls_fallback
|
||||
!= Config::get_option(config::keys::OPTION_ALLOW_INSECURE_TLS_FALLBACK);
|
||||
!= Config::get_option(keys::OPTION_ALLOW_INSECURE_TLS_FALLBACK);
|
||||
if allow_insecure_tls_fallback_changed
|
||||
|| self.stop_service != Config::get_option("stop-service")
|
||||
|| self.rendezvous_servers != Config::get_rendezvous_servers()
|
||||
|| self.ws != Config::get_option(OPTION_ALLOW_WEBSOCKET)
|
||||
|| self.disable_udp != Config::get_option(config::keys::OPTION_DISABLE_UDP)
|
||||
|| self.disable_udp != Config::get_option(keys::OPTION_DISABLE_UDP)
|
||||
|| self.api_server != Config::get_option("api-server")
|
||||
{
|
||||
if allow_insecure_tls_fallback_changed {
|
||||
@@ -1035,7 +1036,7 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
allow_err!(
|
||||
stream
|
||||
.send(&Data::SyncWinCpuUsage(
|
||||
hbb_common::platform::windows::cpu_uage_one_minute()
|
||||
base::platform::windows::cpu_uage_one_minute()
|
||||
))
|
||||
.await
|
||||
);
|
||||
@@ -1227,7 +1228,7 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
let state = crate::server::get_control_permission_state(Permission::file, false);
|
||||
let enabled = state.unwrap_or_else(|| {
|
||||
crate::server::Connection::is_permission_enabled_locally(
|
||||
config::keys::OPTION_ENABLE_FILE_TRANSFER,
|
||||
keys::OPTION_ENABLE_FILE_TRANSFER,
|
||||
)
|
||||
});
|
||||
allow_err!(
|
||||
|
||||
129
src/ipc/auth.rs
129
src/ipc/auth.rs
@@ -24,7 +24,6 @@ use std::os::windows::io::AsRawHandle;
|
||||
use std::{
|
||||
fs,
|
||||
path::{Path, PathBuf},
|
||||
sync::{Mutex, OnceLock},
|
||||
};
|
||||
#[cfg(windows)]
|
||||
use windows::Win32::{Foundation::HANDLE, System::Pipes::GetNamedPipeClientProcessId};
|
||||
@@ -520,66 +519,17 @@ 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 = "windows", target_os = "linux", target_os = "macos"))]
|
||||
#[derive(Default)]
|
||||
struct UnauthorizedIpcLogThrottle {
|
||||
last_log_at: Option<std::time::Instant>,
|
||||
suppressed: u64,
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
|
||||
impl UnauthorizedIpcLogThrottle {
|
||||
#[inline]
|
||||
fn on_reject(&mut self, now: std::time::Instant) -> Option<u64> {
|
||||
if let Some(last) = self.last_log_at {
|
||||
if now.saturating_duration_since(last) < UNAUTHORIZED_IPC_LOG_INTERVAL {
|
||||
self.suppressed += 1;
|
||||
return None;
|
||||
}
|
||||
}
|
||||
self.last_log_at = Some(now);
|
||||
Some(std::mem::take(&mut self.suppressed))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
|
||||
#[inline]
|
||||
fn throttled_unauthorized_ipc_log(
|
||||
throttle_cell: &OnceLock<Mutex<UnauthorizedIpcLogThrottle>>,
|
||||
emit: impl FnOnce(u64),
|
||||
) {
|
||||
let throttle = throttle_cell.get_or_init(|| Mutex::new(UnauthorizedIpcLogThrottle::default()));
|
||||
let should_log = match throttle.lock() {
|
||||
Ok(mut throttle) => throttle.on_reject(std::time::Instant::now()),
|
||||
Err(_) => Some(0),
|
||||
};
|
||||
if let Some(suppressed) = should_log {
|
||||
emit(suppressed);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
#[inline]
|
||||
fn log_rejected_service_connection(postfix: &str, peer_uid: Option<u32>, active_uid: Option<u32>) {
|
||||
static LOG_THROTTLE: OnceLock<Mutex<UnauthorizedIpcLogThrottle>> = OnceLock::new();
|
||||
throttled_unauthorized_ipc_log(&LOG_THROTTLE, |suppressed| {
|
||||
if suppressed > 0 {
|
||||
log::warn!(
|
||||
"Rejected unauthorized connection on protected service-scoped IPC channel: postfix={}, peer_uid={:?}, active_uid={:?} (suppressed {} similar events)",
|
||||
postfix,
|
||||
peer_uid,
|
||||
active_uid,
|
||||
suppressed
|
||||
);
|
||||
} else {
|
||||
log::warn!(
|
||||
"Rejected unauthorized connection on protected service-scoped IPC channel: postfix={}, peer_uid={:?}, active_uid={:?}",
|
||||
postfix,
|
||||
peer_uid,
|
||||
active_uid
|
||||
);
|
||||
}
|
||||
});
|
||||
hbb_common::throttled_log!(
|
||||
UNAUTHORIZED_IPC_LOG_INTERVAL,
|
||||
warn,
|
||||
"Rejected unauthorized connection on protected service-scoped IPC channel: postfix={}, peer_uid={:?}, active_uid={:?}",
|
||||
postfix,
|
||||
peer_uid,
|
||||
active_uid
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
@@ -589,25 +539,14 @@ pub(crate) fn log_rejected_uinput_connection(
|
||||
peer_uid: Option<u32>,
|
||||
active_uid: Option<u32>,
|
||||
) {
|
||||
static LOG_THROTTLE: OnceLock<Mutex<UnauthorizedIpcLogThrottle>> = OnceLock::new();
|
||||
throttled_unauthorized_ipc_log(&LOG_THROTTLE, |suppressed| {
|
||||
if suppressed > 0 {
|
||||
log::warn!(
|
||||
"Rejected unauthorized connection on uinput ipc channel: postfix={}, peer_uid={:?}, active_uid={:?} (suppressed {} similar events)",
|
||||
postfix,
|
||||
peer_uid,
|
||||
active_uid,
|
||||
suppressed
|
||||
);
|
||||
} else {
|
||||
log::warn!(
|
||||
"Rejected unauthorized connection on uinput ipc channel: postfix={}, peer_uid={:?}, active_uid={:?}",
|
||||
postfix,
|
||||
peer_uid,
|
||||
active_uid
|
||||
);
|
||||
}
|
||||
});
|
||||
hbb_common::throttled_log!(
|
||||
UNAUTHORIZED_IPC_LOG_INTERVAL,
|
||||
warn,
|
||||
"Rejected unauthorized connection on uinput ipc channel: postfix={}, peer_uid={:?}, active_uid={:?}",
|
||||
postfix,
|
||||
peer_uid,
|
||||
active_uid
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
@@ -620,31 +559,17 @@ pub(crate) fn log_rejected_windows_ipc_connection(
|
||||
peer_is_system: Option<bool>,
|
||||
peer_is_elevated: Option<bool>,
|
||||
) {
|
||||
static LOG_THROTTLE: OnceLock<Mutex<UnauthorizedIpcLogThrottle>> = OnceLock::new();
|
||||
throttled_unauthorized_ipc_log(&LOG_THROTTLE, |suppressed| {
|
||||
if suppressed > 0 {
|
||||
log::warn!(
|
||||
"Rejected unauthorized connection on ipc channel: postfix={}, peer_pid={:?}, peer_session_id={:?}, expected_session_id={:?}, peer_is_system={:?}, peer_is_elevated={:?} (suppressed {} similar events)",
|
||||
postfix,
|
||||
peer_pid,
|
||||
peer_session_id,
|
||||
expected_session_id,
|
||||
peer_is_system,
|
||||
peer_is_elevated,
|
||||
suppressed
|
||||
);
|
||||
} else {
|
||||
log::warn!(
|
||||
"Rejected unauthorized connection on ipc channel: postfix={}, peer_pid={:?}, peer_session_id={:?}, expected_session_id={:?}, peer_is_system={:?}, peer_is_elevated={:?}",
|
||||
postfix,
|
||||
peer_pid,
|
||||
peer_session_id,
|
||||
expected_session_id,
|
||||
peer_is_system,
|
||||
peer_is_elevated
|
||||
);
|
||||
}
|
||||
});
|
||||
hbb_common::throttled_log!(
|
||||
UNAUTHORIZED_IPC_LOG_INTERVAL,
|
||||
warn,
|
||||
"Rejected unauthorized connection on ipc channel: postfix={}, peer_pid={:?}, peer_session_id={:?}, expected_session_id={:?}, peer_is_system={:?}, peer_is_elevated={:?}",
|
||||
postfix,
|
||||
peer_pid,
|
||||
peer_session_id,
|
||||
expected_session_id,
|
||||
peer_is_system,
|
||||
peer_is_elevated
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
|
||||
@@ -8,18 +8,48 @@ use hbb_common::{
|
||||
tokio_util, ResultType, Stream,
|
||||
};
|
||||
use kcp_sys::{
|
||||
endpoint::KcpEndpoint,
|
||||
endpoint::{ConnId, KcpEndpoint},
|
||||
packet_def::{KcpPacket, KcpPacketHeader},
|
||||
stream,
|
||||
};
|
||||
use std::{net::SocketAddr, sync::Arc};
|
||||
|
||||
pub struct KcpStream {
|
||||
_endpoint: KcpEndpoint,
|
||||
endpoint: KcpEndpoint,
|
||||
conn_id: ConnId,
|
||||
stop_sender: Option<oneshot::Sender<()>>,
|
||||
}
|
||||
|
||||
const KCP_IO_ERR_LOG_INTERVAL: std::time::Duration = std::time::Duration::from_secs(5);
|
||||
static KCP_SEND_ERR_LOG: hbb_common::log_throttle::LogThrottle =
|
||||
hbb_common::log_throttle::LogThrottle::new(KCP_IO_ERR_LOG_INTERVAL);
|
||||
static KCP_RECV_ERR_LOG: hbb_common::log_throttle::LogThrottle =
|
||||
hbb_common::log_throttle::LogThrottle::new(KCP_IO_ERR_LOG_INTERVAL);
|
||||
|
||||
impl KcpStream {
|
||||
// Opt in to KCP's built-in congestion window (nc=0) instead of the pure turbo profile
|
||||
// (nc=1) that has always shipped; see `get_kcp_cc_enabled` for why this is not the default.
|
||||
// Sender-side only, so no wire negotiation is needed and either peer may run either profile.
|
||||
// Requires kcp-sys from the `rustdesk-patches` branch, which wires the config factory into
|
||||
// connection setup (on older revs the factory was stored but never consulted).
|
||||
fn apply_kcp_config(endpoint: &mut KcpEndpoint) {
|
||||
if crate::get_kcp_cc_enabled() {
|
||||
endpoint.set_kcp_config_factory(Box::new(|conv| {
|
||||
let mut config = kcp_sys::ffi_safe::KcpConfig::new_turbo(conv);
|
||||
config.nc = Some(0);
|
||||
config
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/// How long since a valid packet was last received from the peer, or `None` once the
|
||||
/// connection is gone. Answered by the KCP endpoint's own tasks, not by the session's read
|
||||
/// loop, so it stays meaningful while that loop is busy sending a large message; and the
|
||||
/// endpoint pings an idle peer often enough that silence here means the peer, not quiet.
|
||||
pub fn peer_silent_for(&self) -> Option<std::time::Duration> {
|
||||
self.endpoint.peer_silent_for(&self.conn_id)
|
||||
}
|
||||
|
||||
fn create_framed(stream: stream::KcpStream, local_addr: Option<SocketAddr>) -> Stream {
|
||||
Stream::Tcp(FramedStream(
|
||||
tokio_util::codec::Framed::new(DynTcpStream(Box::new(stream)), BytesCodec::new()),
|
||||
@@ -35,6 +65,7 @@ impl KcpStream {
|
||||
init_packet: Option<BytesMut>,
|
||||
) -> ResultType<(Self, Stream)> {
|
||||
let mut endpoint = KcpEndpoint::new();
|
||||
Self::apply_kcp_config(&mut endpoint);
|
||||
endpoint.run().await;
|
||||
|
||||
let (input, output) = (
|
||||
@@ -55,7 +86,8 @@ impl KcpStream {
|
||||
if let Some(stream) = stream::KcpStream::new(&endpoint, conn_id) {
|
||||
Ok((
|
||||
Self {
|
||||
_endpoint: endpoint,
|
||||
endpoint,
|
||||
conn_id,
|
||||
stop_sender: Some(stop_sender),
|
||||
},
|
||||
Self::create_framed(stream, udp_socket.local_addr().ok()),
|
||||
@@ -70,6 +102,7 @@ impl KcpStream {
|
||||
timeout: std::time::Duration,
|
||||
) -> ResultType<(Self, Stream)> {
|
||||
let mut endpoint = KcpEndpoint::new();
|
||||
Self::apply_kcp_config(&mut endpoint);
|
||||
endpoint.run().await;
|
||||
|
||||
let (input, output) = (
|
||||
@@ -85,7 +118,8 @@ impl KcpStream {
|
||||
if let Some(stream) = stream::KcpStream::new(&endpoint, conn_id) {
|
||||
Ok((
|
||||
Self {
|
||||
_endpoint: endpoint,
|
||||
endpoint,
|
||||
conn_id,
|
||||
stop_sender: Some(stop_sender),
|
||||
},
|
||||
Self::create_framed(stream, udp_socket.local_addr().ok()),
|
||||
@@ -104,6 +138,10 @@ impl KcpStream {
|
||||
let udp = udp_socket.clone();
|
||||
tokio::spawn(async move {
|
||||
let mut buf = vec![0; 1500];
|
||||
// Socket errors are ICMP unreachable on a connected UDP socket — advisory, and
|
||||
// routine while a hole forms — so treat them as loss and let KCP's pong timeout reap
|
||||
// a link that is really dead. One throttle PER DIRECTION: the error is reported once
|
||||
// and cleared, so send-ok/recv-err alternates and a shared counter never fires.
|
||||
loop {
|
||||
tokio::select! {
|
||||
_ = &mut stop_receiver => {
|
||||
@@ -112,8 +150,10 @@ impl KcpStream {
|
||||
}
|
||||
Some(data) = output.recv() => {
|
||||
if let Err(e) = udp.send(&data.inner()).await {
|
||||
log::debug!("KCP send error: {:?}", e);
|
||||
break;
|
||||
if let Some(n) = KCP_SEND_ERR_LOG.due() {
|
||||
log::debug!("KCP send error x{n} (treated as loss), last: {e}");
|
||||
}
|
||||
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
|
||||
}
|
||||
}
|
||||
result = udp.recv_from(&mut buf) => {
|
||||
@@ -127,8 +167,10 @@ impl KcpStream {
|
||||
.await.ok();
|
||||
}
|
||||
Err(e) => {
|
||||
log::debug!("KCP recv_from error: {:?}", e);
|
||||
break;
|
||||
if let Some(n) = KCP_RECV_ERR_LOG.due() {
|
||||
log::debug!("KCP recv error x{n} (treated as loss), last: {e}");
|
||||
}
|
||||
tokio::time::sleep(std::time::Duration::from_millis(10)).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -149,3 +191,124 @@ impl Drop for KcpStream {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::time::Duration;
|
||||
|
||||
async fn connected_pair() -> (Arc<UdpSocket>, Arc<UdpSocket>) {
|
||||
let a = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
||||
let b = UdpSocket::bind("127.0.0.1:0").await.unwrap();
|
||||
a.connect(b.local_addr().unwrap()).await.unwrap();
|
||||
b.connect(a.local_addr().unwrap()).await.unwrap();
|
||||
(Arc::new(a), Arc::new(b))
|
||||
}
|
||||
|
||||
async fn establish() -> ((KcpStream, Stream), (KcpStream, Stream)) {
|
||||
let (a, b) = connected_pair().await;
|
||||
let (accept_res, connect_res) = tokio::join!(
|
||||
KcpStream::accept(b, Duration::from_secs(5), None),
|
||||
KcpStream::connect(a, Duration::from_secs(5))
|
||||
);
|
||||
(
|
||||
connect_res.expect("connect over loopback"),
|
||||
accept_res.expect("accept over loopback"),
|
||||
)
|
||||
}
|
||||
|
||||
// The full client path over real loopback sockets: handshake through the kcp_io
|
||||
// pumps, framed data both ways, then a graceful close. The endpoint guard stays
|
||||
// alive across the stream drop so the FIN can go out, and the peer's framed
|
||||
// stream must end (BrokenPipe from the kcp reader) instead of hanging.
|
||||
#[tokio::test]
|
||||
async fn test_kcp_stream_loopback_roundtrip_and_close() {
|
||||
let ((_guard_a, mut stream_a), (_guard_b, mut stream_b)) = establish().await;
|
||||
|
||||
stream_a
|
||||
.send_bytes(Bytes::from_static(b"ping"))
|
||||
.await
|
||||
.unwrap();
|
||||
let got = stream_b.next_timeout(5000).await.unwrap().unwrap();
|
||||
assert_eq!(&got[..], b"ping");
|
||||
|
||||
stream_b
|
||||
.send_bytes(Bytes::from_static(b"pong"))
|
||||
.await
|
||||
.unwrap();
|
||||
let got = stream_a.next_timeout(5000).await.unwrap().unwrap();
|
||||
assert_eq!(&got[..], b"pong");
|
||||
|
||||
drop(stream_a);
|
||||
match stream_b.next_timeout(10_000).await {
|
||||
None | Some(Err(_)) => {}
|
||||
Some(Ok(data)) => panic!("unexpected data after close: {:?}", data),
|
||||
}
|
||||
}
|
||||
|
||||
// A writer that queues many frames and closes immediately must not cost the
|
||||
// reader any of them: every frame arrives intact, in order, before end-of-stream.
|
||||
// This is the client-side pin for the kcp-sys close-tail-drain semantics, through
|
||||
// the real BytesCodec framing rustdesk sessions use.
|
||||
#[tokio::test]
|
||||
async fn test_kcp_stream_close_delivers_all_frames() {
|
||||
let ((_guard_a, mut tx), (_guard_b, mut rx)) = establish().await;
|
||||
|
||||
const N: usize = 50;
|
||||
let payload = vec![7u8; 32 * 1024];
|
||||
for _ in 0..N {
|
||||
tx.send_bytes(Bytes::from(payload.clone())).await.unwrap();
|
||||
}
|
||||
drop(tx);
|
||||
|
||||
let mut got = 0usize;
|
||||
loop {
|
||||
match rx.next_timeout(10_000).await {
|
||||
Some(Ok(data)) => {
|
||||
assert_eq!(data.len(), payload.len(), "frame boundary broken");
|
||||
assert!(data.iter().all(|&b| b == 7), "frame content corrupted");
|
||||
got += 1;
|
||||
}
|
||||
// BrokenPipe (kcp reader end) or timeout-None both end the stream.
|
||||
None | Some(Err(_)) => break,
|
||||
}
|
||||
}
|
||||
assert_eq!(got, N, "graceful close lost frames");
|
||||
}
|
||||
|
||||
// Socket errors on the connected UDP socket (ICMP unreachable after the peer
|
||||
// vanishes) are advisory: the io loop must treat them as loss - keep accepting
|
||||
// writes, keep running - rather than tearing the session down. Whether the OS
|
||||
// actually surfaces ECONNREFUSED here is platform-dependent; either way the
|
||||
// session must stay alive for this window.
|
||||
#[tokio::test]
|
||||
async fn test_kcp_io_treats_socket_errors_as_loss() {
|
||||
let ((_guard_a, mut stream_a), (guard_b, stream_b)) = establish().await;
|
||||
|
||||
// Kill the peer entirely: endpoint stops, socket closes.
|
||||
drop(stream_b);
|
||||
drop(guard_b);
|
||||
tokio::time::sleep(Duration::from_millis(50)).await;
|
||||
|
||||
for _ in 0..10 {
|
||||
stream_a
|
||||
.send_bytes(Bytes::from_static(b"into the void"))
|
||||
.await
|
||||
.expect("socket errors must be treated as loss, not stream failure");
|
||||
tokio::time::sleep(Duration::from_millis(20)).await;
|
||||
}
|
||||
}
|
||||
|
||||
// The connect deadline must hold when nothing answers: no hang, prompt error.
|
||||
#[tokio::test]
|
||||
async fn test_kcp_connect_timeout_without_peer() {
|
||||
let (a, _b) = connected_pair().await;
|
||||
let start = tokio::time::Instant::now();
|
||||
let res = KcpStream::connect(a, Duration::from_millis(600)).await;
|
||||
assert!(res.is_err(), "connect must fail with no peer endpoint");
|
||||
assert!(
|
||||
start.elapsed() < Duration::from_secs(5),
|
||||
"connect did not honor its deadline"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ use crate::ui_session_interface::{InvokeUiSession, Session};
|
||||
use crate::{client::get_key_state, common::GrabState};
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use hbb_common::log;
|
||||
use hbb_common::message_proto::*;
|
||||
use base::message_proto::*;
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
use rdev::KeyCode;
|
||||
use rdev::{Event, EventType, Key};
|
||||
|
||||
@@ -2,6 +2,7 @@ use hbb_common::regex::Regex;
|
||||
use std::ops::Deref;
|
||||
|
||||
mod ar;
|
||||
mod az;
|
||||
mod be;
|
||||
mod bg;
|
||||
mod ca;
|
||||
@@ -51,6 +52,7 @@ mod ta;
|
||||
mod ge;
|
||||
mod fi;
|
||||
mod ml;
|
||||
mod gl;
|
||||
|
||||
pub const LANGS: &[(&str, &str)] = &[
|
||||
("en", "English"),
|
||||
@@ -84,6 +86,7 @@ pub const LANGS: &[(&str, &str)] = &[
|
||||
("ur", "اردو"),
|
||||
("fa", "فارسی"),
|
||||
("ca", "Català"),
|
||||
("gl", "Galego"),
|
||||
("el", "Ελληνικά"),
|
||||
("sv", "Svenska"),
|
||||
("sq", "Shqip"),
|
||||
@@ -103,6 +106,7 @@ pub const LANGS: &[(&str, &str)] = &[
|
||||
("ml", "മലയാളം"),
|
||||
("hi", "हिंदी"),
|
||||
("gu", "ગુજરાતી"),
|
||||
("az", "Azərbaycan dili"),
|
||||
];
|
||||
|
||||
pub(crate) fn cjk_ui_unavailable() -> bool {
|
||||
@@ -217,6 +221,8 @@ pub fn translate_locale(name: String, locale: &str) -> String {
|
||||
"ml" => ml::T.deref(),
|
||||
"hi" => hi::T.deref(),
|
||||
"gu" => gu::T.deref(),
|
||||
"gl" => gl::T.deref(),
|
||||
"az" => az::T.deref(),
|
||||
_ => en::T.deref(),
|
||||
};
|
||||
let (name, placeholder_value) = extract_placeholder(&name);
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "لقطة الشاشة للشاشات المدمجة غير مدعومة"),
|
||||
("screenshot-action-tip", "إجراء لقطة الشاشة"),
|
||||
("Save as", "حفظ باسم"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "تصدير"),
|
||||
("Export Logs", "تصدير السجلات"),
|
||||
("Import Folder", "استيراد مجلد"),
|
||||
("Copy to clipboard", "نسخ إلى الحافظة"),
|
||||
("Enable remote printer", "تمكين الطابعة عن بُعد"),
|
||||
("Downloading {}", "جارٍ تنزيل {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "تفعيل"),
|
||||
("Reuse one connection for port forwarding", "إعادة استخدام اتصال واحد لإعادة توجيه المنافذ"),
|
||||
("port-forward-mux-tip", "تمرير جميع اتصالات إعادة توجيه المنافذ عبر اتصال واحد بالجهاز الآخر، بدلاً من الاتصال وتسجيل الدخول من جديد لكل اتصال."),
|
||||
("Enable WebRTC P2P connection", "تمكين اتصال نظير إلى نظير عبر WebRTC"),
|
||||
("Enable TCP hole punching", "تمكين تقنية حفر الثغرات عبر TCP"),
|
||||
("The screen sharing request was declined on the remote device", "تم رفض طلب مشاركة الشاشة على الجهاز البعيد"),
|
||||
("The screen sharing request timed out on the remote device", "انتهت مهلة طلب مشاركة الشاشة على الجهاز البعيد"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "يتعذّر على RustDesk الوصول إلى جلسة سطح المكتب على الجهاز البعيد، تأكد من أن جلسة سطح المكتب تعمل وأن RustDesk يمكنه استخدامها"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "بوابة سطح المكتب على الجهاز البعيد تفتقر إلى إمكانية لازمة لمشاركة الشاشة أو التحكم عن بُعد، قد لا تكون واجهتها الخلفية مثبتة"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "تمت الموافقة على مشاركة الشاشة على الجهاز البعيد، لكن تعذّر فتح اتصال PipeWire"),
|
||||
("The screen sharing request ended without completing on the remote device", "انتهى طلب مشاركة الشاشة على الجهاز البعيد دون أن يكتمل"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "تعذّر على RustDesk الحصول على شاشة قابلة للاستخدام من XDG Desktop Portal، قد تكون مكتبة PipeWire قديمة جدًا"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "تعذّر على RustDesk تحميل مكوّن GStreamer اللازم لالتقاط الشاشة ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
774
src/lang/az.rs
Normal file
774
src/lang/az.rs
Normal file
@@ -0,0 +1,774 @@
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
[
|
||||
("Status", "Vəziyyət"),
|
||||
("Your Desktop", "Masaüstünüz"),
|
||||
("desk_tip", "Masaüstünüzə bu ID və parol ilə giriş etmək olar."),
|
||||
("Password", "Parol"),
|
||||
("Ready", "Hazır"),
|
||||
("Established", "Quruldu"),
|
||||
("connecting_status", "RustDesk şəbəkəsinə qoşulur..."),
|
||||
("Enable service", "Xidməti aktivləşdir"),
|
||||
("Start service", "Xidməti başlat"),
|
||||
("Service is running", "Xidmət işləyir"),
|
||||
("Service is not running", "Xidmət işləmir"),
|
||||
("not_ready_status", "Hazır deyil. Əlaqənizi yoxlayın"),
|
||||
("Control Remote Desktop", "Uzaq masaüstünü idarə et"),
|
||||
("Transfer file", "Fayl ötür"),
|
||||
("Connect", "Qoşul"),
|
||||
("Recent sessions", "Son sessiyalar"),
|
||||
("Address book", "Ünvan kitabı"),
|
||||
("Confirmation", "Təsdiq"),
|
||||
("TCP tunneling", "TCP tunelləmə"),
|
||||
("Remove", "Çıxar"),
|
||||
("Refresh random password", "Təsadüfi parolu yenilə"),
|
||||
("Set your own password", "Öz parolunuzu təyin edin"),
|
||||
("Enable keyboard/mouse", "Klaviaturanı/siçanı aktivləşdir"),
|
||||
("Enable clipboard", "Mübadilə buferini aktivləşdir"),
|
||||
("Enable file transfer", "Fayl ötürülməsini aktivləşdir"),
|
||||
("Enable TCP tunneling", "TCP tunelləməni aktivləşdir"),
|
||||
("IP Whitelisting", "IP ağ siyahısı"),
|
||||
("ID/Relay Server", "ID/Relay serveri"),
|
||||
("Import server config", "Server konfiqurasiyasını idxal et"),
|
||||
("Export Server Config", "Server konfiqurasiyasını ixrac et"),
|
||||
("Import server configuration successfully", "Server konfiqurasiyası uğurla idxal edildi"),
|
||||
("Export server configuration successfully", "Server konfiqurasiyası uğurla ixrac edildi"),
|
||||
("Invalid server configuration", "Yanlış server konfiqurasiyası"),
|
||||
("Clipboard is empty", "Mübadilə buferi boşdur"),
|
||||
("Stop service", "Xidməti dayandır"),
|
||||
("Change ID", "ID-ni dəyiş"),
|
||||
("Your new ID", "Yeni ID-niz"),
|
||||
("length %min% to %max%", "uzunluq %min% ilə %max% arasında"),
|
||||
("starts with a letter", "hərflə başlayır"),
|
||||
("allowed characters", "icazə verilən simvollar"),
|
||||
("id_change_tip", "Yalnız a-z, A-Z, 0-9, - (defis) və _ (alt xətt) simvollarına icazə verilir. İlk hərf a-z, A-Z olmalıdır. Uzunluq 6 ilə 16 arasında."),
|
||||
("Website", "Veb sayt"),
|
||||
("About", "Haqqında"),
|
||||
("Slogan_tip", "Bu qarışıq dünyada ürəklə hazırlanıb!"),
|
||||
("Privacy Statement", "Məxfilik bəyanatı"),
|
||||
("Mute", "Səssiz"),
|
||||
("Build Date", "Yığılma tarixi"),
|
||||
("Version", "Versiya"),
|
||||
("Home", "Əsas səhifə"),
|
||||
("Audio Input", "Audio girişi"),
|
||||
("Enhancements", "Təkmilləşdirmələr"),
|
||||
("Hardware Codec", "Aparat kodeki"),
|
||||
("Adaptive bitrate", "Adaptiv bitreyt"),
|
||||
("ID Server", "ID serveri"),
|
||||
("Relay Server", "Relay serveri"),
|
||||
("API Server", "API serveri"),
|
||||
("invalid_http", "http:// və ya https:// ilə başlamalıdır"),
|
||||
("Invalid IP", "Yanlış IP"),
|
||||
("Invalid format", "Yanlış format"),
|
||||
("server_not_support", "Server hələ dəstəkləmir"),
|
||||
("Not available", "Əlçatan deyil"),
|
||||
("Too frequent", "Çox tez-tez"),
|
||||
("Cancel", "Ləğv et"),
|
||||
("Skip", "Keç"),
|
||||
("Close", "Bağla"),
|
||||
("Retry", "Yenidən cəhd et"),
|
||||
("OK", "OK"),
|
||||
("Password Required", "Parol tələb olunur"),
|
||||
("Please enter your password", "Parolunuzu daxil edin"),
|
||||
("Remember password", "Parolu yadda saxla"),
|
||||
("Wrong Password", "Yanlış parol"),
|
||||
("Do you want to enter again?", "Yenidən daxil etmək istəyirsiniz?"),
|
||||
("Connection Error", "Əlaqə xətası"),
|
||||
("Error", "Xəta"),
|
||||
("Reset by the peer", "Qarşı tərəf əlaqəni sıfırladı"),
|
||||
("Connecting...", "Qoşulur..."),
|
||||
("Connection in progress. Please wait.", "Əlaqə qurulur. Gözləyin."),
|
||||
("Please try 1 minute later", "1 dəqiqə sonra cəhd edin"),
|
||||
("Login Error", "Giriş xətası"),
|
||||
("Successful", "Uğurlu"),
|
||||
("Connected, waiting for image...", "Qoşuldu, şəkil gözlənilir..."),
|
||||
("Name", "Ad"),
|
||||
("Type", "Növ"),
|
||||
("Modified", "Dəyişdirilib"),
|
||||
("Size", "Ölçü"),
|
||||
("Show Hidden Files", "Gizli faylları göstər"),
|
||||
("Receive", "Qəbul et"),
|
||||
("Send", "Göndər"),
|
||||
("Refresh File", "Faylı yenilə"),
|
||||
("Local", "Lokal"),
|
||||
("Remote", "Uzaq"),
|
||||
("Remote Computer", "Uzaq kompüter"),
|
||||
("Local Computer", "Lokal kompüter"),
|
||||
("Confirm Delete", "Silinməni təsdiqlə"),
|
||||
("Delete", "Sil"),
|
||||
("Properties", "Xüsusiyyətlər"),
|
||||
("Multi Select", "Çoxlu seçim"),
|
||||
("Select All", "Hamısını seç"),
|
||||
("Unselect All", "Seçimi ləğv et"),
|
||||
("Empty Directory", "Boş qovluq"),
|
||||
("Not an empty directory", "Qovluq boş deyil"),
|
||||
("Are you sure you want to delete this file?", "Bu faylı silmək istədiyinizə əminsiniz?"),
|
||||
("Are you sure you want to delete this empty directory?", "Bu boş qovluğu silmək istədiyinizə əminsiniz?"),
|
||||
("Are you sure you want to delete the file of this directory?", "Bu qovluğun faylını silmək istədiyinizə əminsiniz?"),
|
||||
("Do this for all conflicts", "Bunu bütün ziddiyyətlər üçün et"),
|
||||
("This is irreversible!", "Bu geri qaytarıla bilməz!"),
|
||||
("Deleting", "Silinir"),
|
||||
("files", "fayl"),
|
||||
("Waiting", "Gözlənilir"),
|
||||
("Finished", "Bitdi"),
|
||||
("Speed", "Sürət"),
|
||||
("Custom Image Quality", "Fərdi şəkil keyfiyyəti"),
|
||||
("Privacy mode", "Məxfilik rejimi"),
|
||||
("Block user input", "İstifadəçi girişini blokla"),
|
||||
("Unblock user input", "İstifadəçi girişinin blokunu aç"),
|
||||
("Adjust Window", "Pəncərəni uyğunlaşdır"),
|
||||
("Original", "Orijinal"),
|
||||
("Shrink", "Kiçilt"),
|
||||
("Stretch", "Uzat"),
|
||||
("Scrollbar", "Sürüşdürmə zolağı"),
|
||||
("ScrollAuto", "Avtomatik sürüşdürmə"),
|
||||
("Good image quality", "Yaxşı şəkil keyfiyyəti"),
|
||||
("Balanced", "Balanslı"),
|
||||
("Optimize reaction time", "Reaksiya vaxtını optimallaşdır"),
|
||||
("Custom", "Fərdi"),
|
||||
("Show remote cursor", "Uzaq kursoru göstər"),
|
||||
("Show quality monitor", "Keyfiyyət monitorunu göstər"),
|
||||
("Disable clipboard", "Mübadilə buferini söndür"),
|
||||
("Lock after session end", "Sessiya bitdikdən sonra kilidlə"),
|
||||
("Insert Ctrl + Alt + Del", "Ctrl + Alt + Del göndər"),
|
||||
("Insert Lock", "Kilid göndər"),
|
||||
("Refresh", "Yenilə"),
|
||||
("ID does not exist", "ID mövcud deyil"),
|
||||
("Failed to connect to rendezvous server", "Rendezvous serverinə qoşulmaq alınmadı"),
|
||||
("Please try later", "Sonra cəhd edin"),
|
||||
("Remote desktop is offline", "Uzaq masaüstü oflayndır"),
|
||||
("Key mismatch", "Açar uyğun gəlmir"),
|
||||
("Timeout", "Vaxt bitdi"),
|
||||
("Failed to connect to relay server", "Relay serverinə qoşulmaq alınmadı"),
|
||||
("Failed to connect via rendezvous server", "Rendezvous serveri vasitəsilə qoşulmaq alınmadı"),
|
||||
("Failed to connect via relay server", "Relay serveri vasitəsilə qoşulmaq alınmadı"),
|
||||
("Failed to make direct connection to remote desktop", "Uzaq masaüstünə birbaşa əlaqə qurmaq alınmadı"),
|
||||
("Set Password", "Parolu təyin et"),
|
||||
("OS Password", "Əməliyyat sistemi parolu"),
|
||||
("install_tip", "UAC səbəbindən RustDesk bəzi hallarda uzaq tərəf kimi düzgün işləyə bilmir. UAC-dan yayınmaq üçün aşağıdakı düyməyə basaraq RustDesk-i sistemə quraşdırın."),
|
||||
("Click to upgrade", "Yeniləmək üçün klikləyin"),
|
||||
("Configure", "Konfiqurasiya et"),
|
||||
("config_acc", "Masaüstünüzü uzaqdan idarə etmək üçün RustDesk-ə \"Əlçatanlıq\" icazələrini verməlisiniz."),
|
||||
("config_screen", "Masaüstünüzə uzaqdan giriş üçün RustDesk-ə \"Ekran Yazısı\" icazələrini verməlisiniz."),
|
||||
("Installing ...", "Quraşdırılır ..."),
|
||||
("Install", "Quraşdır"),
|
||||
("Installation", "Quraşdırma"),
|
||||
("Installation Path", "Quraşdırma yolu"),
|
||||
("Create start menu shortcuts", "Başlat menyusu qısayolları yarat"),
|
||||
("Create desktop icon", "Masaüstü ikonu yarat"),
|
||||
("agreement_tip", "Quraşdırmanı başlatmaqla lisenziya müqaviləsini qəbul edirsiniz."),
|
||||
("Accept and Install", "Qəbul et və quraşdır"),
|
||||
("End-user license agreement", "Son istifadəçi lisenziya müqaviləsi"),
|
||||
("Generating ...", "Yaradılır ..."),
|
||||
("Your installation is lower version.", "Quraşdırdığınız versiya köhnədir."),
|
||||
("not_close_tcp_tip", "Tuneldən istifadə edərkən bu pəncərəni bağlamayın"),
|
||||
("Listening ...", "Dinlənilir ..."),
|
||||
("Remote Host", "Uzaq host"),
|
||||
("Remote Port", "Uzaq port"),
|
||||
("Action", "Əməliyyat"),
|
||||
("Add", "Əlavə et"),
|
||||
("Local Port", "Lokal port"),
|
||||
("Local Address", "Lokal ünvan"),
|
||||
("Change Local Port", "Lokal portu dəyiş"),
|
||||
("setup_server_tip", "Daha sürətli əlaqə üçün öz serverinizi qurun"),
|
||||
("Too short, at least 6 characters.", "Çox qısadır, ən azı 6 simvol olmalıdır."),
|
||||
("The confirmation is not identical.", "Təsdiq eyni deyil."),
|
||||
("Permissions", "İcazələr"),
|
||||
("Accept", "Qəbul et"),
|
||||
("Dismiss", "İmtina et"),
|
||||
("Disconnect", "Əlaqəni kəs"),
|
||||
("Enable file copy and paste", "Fayl kopyalama və yapışdırmanı aktivləşdir"),
|
||||
("Connected", "Qoşuldu"),
|
||||
("Direct and encrypted connection", "Birbaşa və şifrələnmiş əlaqə"),
|
||||
("Relayed and encrypted connection", "Relay üzərindən şifrələnmiş əlaqə"),
|
||||
("Direct and unencrypted connection", "Birbaşa və şifrələnməmiş əlaqə"),
|
||||
("Relayed and unencrypted connection", "Relay üzərindən şifrələnməmiş əlaqə"),
|
||||
("Enter Remote ID", "Uzaq ID-ni daxil edin"),
|
||||
("Enter your password", "Parolunuzu daxil edin"),
|
||||
("Logging in...", "Giriş edilir..."),
|
||||
("Enable RDP session sharing", "RDP sessiya paylaşımını aktivləşdir"),
|
||||
("Auto Login", "Avtomatik giriş (yalnız \"Sessiya bitdikdən sonra kilidlə\" seçilibsə işləyir)"),
|
||||
("Enable direct IP access", "Birbaşa IP girişini aktivləşdir"),
|
||||
("Rename", "Adını dəyiş"),
|
||||
("Space", "Boşluq"),
|
||||
("Create desktop shortcut", "Masaüstü qısayolu yarat"),
|
||||
("Change Path", "Yolu dəyiş"),
|
||||
("Create Folder", "Qovluq yarat"),
|
||||
("Please enter the folder name", "Qovluğun adını daxil edin"),
|
||||
("Fix it", "Düzəlt"),
|
||||
("Warning", "Xəbərdarlıq"),
|
||||
("Login screen using Wayland is not supported", "Wayland ilə giriş ekranı dəstəklənmir"),
|
||||
("Reboot required", "Yenidən başlatma tələb olunur"),
|
||||
("Unsupported display server", "Dəstəklənməyən displey serveri"),
|
||||
("x11 expected", "x11 gözlənilir"),
|
||||
("Port", "Port"),
|
||||
("Settings", "Parametrlər"),
|
||||
("Username", "İstifadəçi adı"),
|
||||
("Invalid port", "Yanlış port"),
|
||||
("Closed manually by the peer", "Qarşı tərəf əl ilə bağladı"),
|
||||
("Enable remote configuration modification", "Uzaqdan konfiqurasiya dəyişikliyini aktivləşdir"),
|
||||
("Run without install", "Quraşdırmadan işə sal"),
|
||||
("Connect via relay", "Relay vasitəsilə qoşul"),
|
||||
("Always connect via relay", "Həmişə relay vasitəsilə qoşul"),
|
||||
("whitelist_tip", "Yalnız ağ siyahıdakı IP mənə giriş edə bilər"),
|
||||
("Login", "Giriş"),
|
||||
("Verify", "Doğrula"),
|
||||
("Remember me", "Məni xatırla"),
|
||||
("Trust this device", "Bu cihaza etibar et"),
|
||||
("Verification code", "Doğrulama kodu"),
|
||||
("verification_tip", "Qeydiyyatdan keçmiş e-poçt ünvanına doğrulama kodu göndərildi, girişi davam etdirmək üçün kodu daxil edin."),
|
||||
("Logout", "Çıxış"),
|
||||
("Tags", "Etiketlər"),
|
||||
("Search ID", "ID axtar"),
|
||||
("whitelist_sep", "Vergül, nöqtəli vergül, boşluq və ya yeni sətirlə ayrılır"),
|
||||
("Add ID", "ID əlavə et"),
|
||||
("Add Tag", "Etiket əlavə et"),
|
||||
("Unselect all tags", "Bütün etiketlərin seçimini ləğv et"),
|
||||
("Network error", "Şəbəkə xətası"),
|
||||
("Username missed", "İstifadəçi adı yazılmayıb"),
|
||||
("Password missed", "Parol yazılmayıb"),
|
||||
("Wrong credentials", "Yanlış istifadəçi adı və ya parol"),
|
||||
("The verification code is incorrect or has expired", "Doğrulama kodu yanlışdır və ya vaxtı bitib"),
|
||||
("Edit Tag", "Etiketi redaktə et"),
|
||||
("Forget Password", "Parolu unut"),
|
||||
("Favorites", "Seçilmişlər"),
|
||||
("Add to Favorites", "Seçilmişlərə əlavə et"),
|
||||
("Remove from Favorites", "Seçilmişlərdən çıxar"),
|
||||
("Empty", "Boş"),
|
||||
("Invalid folder name", "Yanlış qovluq adı"),
|
||||
("Socks5 Proxy", "Socks5 proksi"),
|
||||
("Socks5/Http(s) Proxy", "Socks5/Http(s) proksi"),
|
||||
("Discovered", "Aşkarlandı"),
|
||||
("install_daemon_tip", "Sistem açılışında başlaması üçün sistem xidmətini quraşdırmalısınız."),
|
||||
("Remote ID", "Uzaq ID"),
|
||||
("Paste", "Yapışdır"),
|
||||
("Paste here?", "Buraya yapışdırılsın?"),
|
||||
("Are you sure to close the connection?", "Əlaqəni bağlamaq istədiyinizə əminsiniz?"),
|
||||
("Download new version", "Yeni versiyanı endir"),
|
||||
("Touch mode", "Toxunuş rejimi"),
|
||||
("Mouse mode", "Siçan rejimi"),
|
||||
("One-Finger Tap", "Bir barmaqla toxunuş"),
|
||||
("Left Mouse", "Sol siçan düyməsi"),
|
||||
("One-Long Tap", "Bir barmaqla uzun toxunuş"),
|
||||
("Two-Finger Tap", "İki barmaqla toxunuş"),
|
||||
("Right Mouse", "Sağ siçan düyməsi"),
|
||||
("One-Finger Move", "Bir barmaqla hərəkət"),
|
||||
("Double Tap & Move", "İkiqat toxunuş və hərəkət"),
|
||||
("Mouse Drag", "Siçanla sürükləmə"),
|
||||
("Three-Finger vertically", "Üç barmaqla şaquli"),
|
||||
("Mouse Wheel", "Siçan çarxı"),
|
||||
("Two-Finger Move", "İki barmaqla hərəkət"),
|
||||
("Canvas Move", "Kətanın hərəkəti"),
|
||||
("Pinch to Zoom", "Barmaqlarla yaxınlaşdırma"),
|
||||
("Canvas Zoom", "Kətanın miqyası"),
|
||||
("Reset canvas", "Kətanı sıfırla"),
|
||||
("No permission of file transfer", "Fayl ötürülməsi üçün icazə yoxdur"),
|
||||
("Note", "Qeyd"),
|
||||
("Connection", "Əlaqə"),
|
||||
("Share screen", "Ekranı paylaş"),
|
||||
("Chat", "Söhbət"),
|
||||
("Total", "Ümumi"),
|
||||
("items", "element"),
|
||||
("Selected", "Seçilib"),
|
||||
("Screen Capture", "Ekran çəkilişi"),
|
||||
("Input Control", "Giriş idarəsi"),
|
||||
("Audio Capture", "Audio çəkilişi"),
|
||||
("Do you accept?", "Qəbul edirsiniz?"),
|
||||
("Open System Setting", "Sistem parametrini aç"),
|
||||
("How to get Android input permission?", "Android giriş icazəsi necə alınır?"),
|
||||
("android_input_permission_tip1", "Uzaq cihazın siçan və ya toxunuşla Android cihazınızı idarə etməsi üçün RustDesk-ə \"Əlçatanlıq\" xidmətindən istifadə icazəsi verməlisiniz."),
|
||||
("android_input_permission_tip2", "Növbəti sistem parametrləri səhifəsinə keçin, [Quraşdırılmış xidmətlər] bölməsini tapıb açın və [RustDesk Input] xidmətini işə salın."),
|
||||
("android_new_connection_tip", "Cari cihazınızı idarə etmək istəyən yeni idarəetmə sorğusu alındı."),
|
||||
("android_service_will_start_tip", "\"Ekran çəkilişi\"ni işə salmaq xidməti avtomatik başladacaq və digər cihazlara cihazınıza əlaqə sorğusu göndərməyə imkan verəcək."),
|
||||
("android_stop_service_tip", "Xidməti bağlamaq qurulmuş bütün əlaqələri avtomatik olaraq bağlayacaq."),
|
||||
("android_version_audio_tip", "Cari Android versiyası audio çəkilişini dəstəkləmir, Android 10 və ya daha yuxarı versiyaya yüksəldin."),
|
||||
("android_start_service_tip", "Ekran paylaşımı xidmətini başlatmaq üçün [Xidməti başlat] düyməsinə toxunun və ya [Ekran çəkilişi] icazəsini aktivləşdirin."),
|
||||
("android_permission_may_not_change_tip", "Qurulmuş əlaqələrin icazələri yenidən qoşulana qədər dərhal dəyişməyə bilər."),
|
||||
("Account", "Hesab"),
|
||||
("Overwrite", "Üzərinə yaz"),
|
||||
("This file exists, skip or overwrite this file?", "Bu fayl mövcuddur, keçilsin yoxsa üzərinə yazılsın?"),
|
||||
("Quit", "Çıx"),
|
||||
("Help", "Kömək"),
|
||||
("Failed", "Alınmadı"),
|
||||
("Succeeded", "Uğurlu oldu"),
|
||||
("Someone turns on privacy mode, exit", "Kimsə məxfilik rejimini açdı, çıxılır"),
|
||||
("Unsupported", "Dəstəklənmir"),
|
||||
("Peer denied", "Qarşı tərəf imtina etdi"),
|
||||
("Peer exit", "Qarşı tərəf çıxdı"),
|
||||
("Failed to turn off", "Söndürmək alınmadı"),
|
||||
("Turned off", "Söndürüldü"),
|
||||
("Language", "Dil"),
|
||||
("Keep RustDesk background service", "RustDesk fon xidmətini işlək saxla"),
|
||||
("Ignore Battery Optimizations", "Batareya optimallaşdırmalarını nəzərə alma"),
|
||||
("android_open_battery_optimizations_tip", "Bu funksiyanı söndürmək istəyirsinizsə, növbəti RustDesk tətbiq parametrləri səhifəsinə keçin, [Batareya] bölməsini tapıb açın və [Məhdudiyyətsiz] seçimini götürün"),
|
||||
("Start on boot", "Sistem açılışında başlat"),
|
||||
("Start the screen sharing service on boot, requires special permissions", "Ekran paylaşımı xidmətini sistem açılışında başlat, xüsusi icazələr tələb olunur"),
|
||||
("Connection not allowed", "Əlaqəyə icazə verilmir"),
|
||||
("Legacy mode", "Köhnə rejim"),
|
||||
("Map mode", "Xəritə rejimi"),
|
||||
("Translate mode", "Çevirmə rejimi"),
|
||||
("Use permanent password", "Daimi paroldan istifadə et"),
|
||||
("Use both passwords", "Hər iki paroldan istifadə et"),
|
||||
("Set permanent password", "Daimi parolu təyin et"),
|
||||
("Enable remote restart", "Uzaqdan yenidən başlatmanı aktivləşdir"),
|
||||
("Restart remote device", "Uzaq cihazı yenidən başlat"),
|
||||
("Are you sure you want to restart", "Yenidən başlatmaq istədiyinizə əminsiniz"),
|
||||
("Restarting remote device", "Uzaq cihaz yenidən başladılır"),
|
||||
("remote_restarting_tip", "Uzaq cihaz yenidən başladılır, bu mesaj qutusunu bağlayın və bir az sonra daimi parolla yenidən qoşulun"),
|
||||
("Copied", "Kopyalandı"),
|
||||
("Exit Fullscreen", "Tam ekrandan çıx"),
|
||||
("Fullscreen", "Tam ekran"),
|
||||
("Mobile Actions", "Mobil əməliyyatlar"),
|
||||
("Select Monitor", "Monitoru seç"),
|
||||
("Control Actions", "İdarəetmə əməliyyatları"),
|
||||
("Display Settings", "Ekran parametrləri"),
|
||||
("Ratio", "Nisbət"),
|
||||
("Image Quality", "Şəkil keyfiyyəti"),
|
||||
("Scroll Style", "Sürüşdürmə üslubu"),
|
||||
("Show Toolbar", "Alətlər panelini göstər"),
|
||||
("Hide Toolbar", "Alətlər panelini gizlət"),
|
||||
("Direct Connection", "Birbaşa əlaqə"),
|
||||
("Relay Connection", "Relay əlaqəsi"),
|
||||
("Secure Connection", "Təhlükəsiz əlaqə"),
|
||||
("Insecure Connection", "Təhlükəsiz olmayan əlaqə"),
|
||||
("Scale original", "Orijinal miqyas"),
|
||||
("Scale adaptive", "Uyğunlaşan miqyas"),
|
||||
("General", "Ümumi"),
|
||||
("Security", "Təhlükəsizlik"),
|
||||
("Theme", "Tema"),
|
||||
("Dark Theme", "Tünd tema"),
|
||||
("Light Theme", "Açıq tema"),
|
||||
("Dark", "Tünd"),
|
||||
("Light", "Açıq"),
|
||||
("Follow System", "Sistemə uyğun"),
|
||||
("Enable hardware codec", "Aparat kodekini aktivləşdir"),
|
||||
("Unlock Security Settings", "Təhlükəsizlik parametrlərinin kilidini aç"),
|
||||
("Enable audio", "Audionu aktivləşdir"),
|
||||
("Unlock Network Settings", "Şəbəkə parametrlərinin kilidini aç"),
|
||||
("Server", "Server"),
|
||||
("Direct IP Access", "Birbaşa IP girişi"),
|
||||
("Proxy", "Proksi"),
|
||||
("Apply", "Tətbiq et"),
|
||||
("Disconnect all devices?", "Bütün cihazlarla əlaqə kəsilsin?"),
|
||||
("Clear", "Təmizlə"),
|
||||
("Audio Input Device", "Audio giriş cihazı"),
|
||||
("Use IP Whitelisting", "IP ağ siyahısından istifadə et"),
|
||||
("Network", "Şəbəkə"),
|
||||
("Pin Toolbar", "Alətlər panelini sancaqla"),
|
||||
("Unpin Toolbar", "Alətlər panelinin sancağını çıxar"),
|
||||
("Recording", "Yazma"),
|
||||
("Directory", "Qovluq"),
|
||||
("Automatically record incoming sessions", "Gələn sessiyaları avtomatik yaz"),
|
||||
("Automatically record outgoing sessions", "Gedən sessiyaları avtomatik yaz"),
|
||||
("Change", "Dəyiş"),
|
||||
("Start session recording", "Sessiya yazısını başlat"),
|
||||
("Stop session recording", "Sessiya yazısını dayandır"),
|
||||
("Enable recording session", "Sessiya yazısını aktivləşdir"),
|
||||
("Enable LAN discovery", "LAN aşkarlanmasını aktivləşdir"),
|
||||
("Deny LAN discovery", "LAN aşkarlanmasına icazə vermə"),
|
||||
("Write a message", "Mesaj yazın"),
|
||||
("Prompt", "Sorğu"),
|
||||
("Please wait for confirmation of UAC...", "UAC təsdiqini gözləyin..."),
|
||||
("elevated_foreground_window_tip", "Uzaq masaüstünün cari pəncərəsi işləmək üçün daha yüksək səlahiyyət tələb edir, ona görə siçan və klaviaturadan müvəqqəti istifadə etmək mümkün deyil. Uzaq istifadəçidən cari pəncərəni kiçiltməsini xahiş edə və ya əlaqə idarəetmə pəncərəsindəki səlahiyyət yüksəltmə düyməsini basa bilərsiniz. Bu problemin qarşısını almaq üçün proqramı uzaq cihaza quraşdırmaq tövsiyə olunur."),
|
||||
("Disconnected", "Əlaqə kəsildi"),
|
||||
("Other", "Digər"),
|
||||
("Confirm before closing multiple tabs", "Çoxlu tabı bağlamazdan əvvəl təsdiq soruş"),
|
||||
("Keyboard Settings", "Klaviatura parametrləri"),
|
||||
("Full Access", "Tam giriş"),
|
||||
("Screen Share", "Ekran paylaşımı"),
|
||||
("ubuntu-21-04-required", "Wayland Ubuntu 21.04 və ya daha yuxarı versiya tələb edir."),
|
||||
("wayland-requires-higher-linux-version", "Wayland daha yuxarı Linux distributiv versiyası tələb edir. X11 masaüstünü sınayın və ya əməliyyat sisteminizi dəyişin."),
|
||||
("xdp-portal-unavailable", "Wayland ekran çəkilişi alınmadı. XDG Desktop Portal çökmüş və ya əlçatmaz ola bilər. `systemctl --user restart xdg-desktop-portal` ilə yenidən başlatmağı sınayın."),
|
||||
("JumpLink", "Bax"),
|
||||
("Please Select the screen to be shared(Operate on the peer side).", "Paylaşılacaq ekranı seçin(Qarşı tərəfdə edilir)."),
|
||||
("Show RustDesk", "RustDesk-i göstər"),
|
||||
("This PC", "Bu kompüter"),
|
||||
("or", "və ya"),
|
||||
("Elevate", "Səlahiyyəti yüksəlt"),
|
||||
("Zoom cursor", "Kursoru böyüt"),
|
||||
("Accept sessions via password", "Sessiyaları parolla qəbul et"),
|
||||
("Accept sessions via click", "Sessiyaları kliklə qəbul et"),
|
||||
("Accept sessions via both", "Sessiyaları hər ikisi ilə qəbul et"),
|
||||
("Please wait for the remote side to accept your session request...", "Uzaq tərəfin sessiya sorğunuzu qəbul etməsini gözləyin..."),
|
||||
("One-time Password", "Birdəfəlik parol"),
|
||||
("Use one-time password", "Birdəfəlik paroldan istifadə et"),
|
||||
("One-time password length", "Birdəfəlik parolun uzunluğu"),
|
||||
("Request access to your device", "Cihazınıza giriş sorğusu"),
|
||||
("Hide connection management window", "Əlaqə idarəetmə pəncərəsini gizlət"),
|
||||
("hide_cm_tip", "Gizlətməyə yalnız sessiyalar parolla qəbul edilirsə və daimi paroldan istifadə olunursa icazə verilir"),
|
||||
("wayland_experiment_tip", "Wayland dəstəyi eksperimental mərhələdədir, nəzarətsiz giriş lazımdırsa X11 işlədin."),
|
||||
("Right click to select tabs", "Tabları seçmək üçün sağ klikləyin"),
|
||||
("Skipped", "Keçildi"),
|
||||
("Add to address book", "Ünvan kitabına əlavə et"),
|
||||
("Group", "Qrup"),
|
||||
("Search", "Axtarış"),
|
||||
("Closed manually by web console", "Veb konsoldan əl ilə bağlandı"),
|
||||
("Local keyboard type", "Lokal klaviatura növü"),
|
||||
("Select local keyboard type", "Lokal klaviatura növünü seçin"),
|
||||
("software_render_tip", "Linux-da Nvidia video kartından istifadə edirsinizsə və qoşulduqdan dərhal sonra uzaq pəncərə bağlanırsa, açıq mənbəli Nouveau sürücüsünə keçmək və proqram təminatı ilə render seçmək kömək edə bilər. Proqramın yenidən başladılması tələb olunur."),
|
||||
("Always use software rendering", "Həmişə proqram təminatı ilə render işlət"),
|
||||
("config_input", "Uzaq masaüstünü klaviatura ilə idarə etmək üçün RustDesk-ə \"Giriş Monitorinqi\" icazələrini verməlisiniz."),
|
||||
("config_microphone", "Uzaqdan danışmaq üçün RustDesk-ə \"Audio Yazısı\" icazələrini verməlisiniz."),
|
||||
("request_elevation_tip", "Uzaq tərəfdə kimsə varsa, səlahiyyət yüksəltmə də tələb edə bilərsiniz."),
|
||||
("Wait", "Gözlə"),
|
||||
("Elevation Error", "Səlahiyyət yüksəltmə xətası"),
|
||||
("Ask the remote user for authentication", "Uzaq istifadəçidən doğrulama istə"),
|
||||
("Choose this if the remote account is administrator", "Uzaq hesab administratordursa bunu seçin"),
|
||||
("Transmit the username and password of administrator", "Administratorun istifadəçi adını və parolunu ötür"),
|
||||
("still_click_uac_tip", "Yenə də uzaq istifadəçinin işləyən RustDesk-in UAC pəncərəsində OK düyməsini basması tələb olunur."),
|
||||
("Request Elevation", "Səlahiyyət yüksəltmə tələb et"),
|
||||
("wait_accept_uac_tip", "Uzaq istifadəçinin UAC dialoqunu qəbul etməsini gözləyin."),
|
||||
("Elevate successfully", "Səlahiyyət uğurla yüksəldildi"),
|
||||
("uppercase", "böyük hərf"),
|
||||
("lowercase", "kiçik hərf"),
|
||||
("digit", "rəqəm"),
|
||||
("special character", "xüsusi simvol"),
|
||||
("length>=8", "uzunluq>=8"),
|
||||
("Weak", "Zəif"),
|
||||
("Medium", "Orta"),
|
||||
("Strong", "Güclü"),
|
||||
("Switch Sides", "Tərəfləri dəyiş"),
|
||||
("Please confirm if you want to share your desktop?", "Masaüstünüzü paylaşmaq istədiyinizi təsdiqləyin?"),
|
||||
("Display", "Ekran"),
|
||||
("Default View Style", "Standart baxış üslubu"),
|
||||
("Default Scroll Style", "Standart sürüşdürmə üslubu"),
|
||||
("Default Image Quality", "Standart şəkil keyfiyyəti"),
|
||||
("Default Codec", "Standart kodek"),
|
||||
("Bitrate", "Bitreyt"),
|
||||
("FPS", "FPS"),
|
||||
("Auto", "Avtomatik"),
|
||||
("Other Default Options", "Digər standart seçimlər"),
|
||||
("Voice call", "Səsli zəng"),
|
||||
("Text chat", "Mətn söhbəti"),
|
||||
("Stop voice call", "Səsli zəngi dayandır"),
|
||||
("relay_hint_tip", "Birbaşa qoşulmaq mümkün olmaya bilər; relay vasitəsilə qoşulmağı sınaya bilərsiniz. Bundan başqa, ilk cəhddə relay işlətmək istəyirsinizsə, ID-yə \"/r\" şəkilçisi əlavə edin və ya son sessiyalar kartında varsa \"Həmişə relay vasitəsilə qoşul\" seçimini işarələyin."),
|
||||
("Reconnect", "Yenidən qoşul"),
|
||||
("Codec", "Kodek"),
|
||||
("Resolution", "Ayırdetmə"),
|
||||
("No transfers in progress", "Davam edən ötürülmə yoxdur"),
|
||||
("Set one-time password length", "Birdəfəlik parolun uzunluğunu təyin et"),
|
||||
("RDP Settings", "RDP parametrləri"),
|
||||
("Sort by", "Sıralama"),
|
||||
("New Connection", "Yeni əlaqə"),
|
||||
("Restore", "Bərpa et"),
|
||||
("Minimize", "Kiçilt"),
|
||||
("Maximize", "Böyüt"),
|
||||
("Your Device", "Cihazınız"),
|
||||
("empty_recent_tip", "Təəssüf, son sessiya yoxdur!\nYenisini planlaşdırmaq vaxtıdır."),
|
||||
("empty_favorite_tip", "Hələ seçilmiş cihaz yoxdur?\nGəlin qoşulacaq birini tapıb seçilmişlərə əlavə edək!"),
|
||||
("empty_lan_tip", "Görünür, hələ heç bir cihaz aşkarlanmayıb."),
|
||||
("empty_address_book_tip", "Görünür, ünvan kitabınızda hazırda heç bir cihaz yoxdur."),
|
||||
("Empty Username", "Boş istifadəçi adı"),
|
||||
("Empty Password", "Boş parol"),
|
||||
("Me", "Mən"),
|
||||
("identical_file_tip", "Bu fayl qarşı tərəfdəki ilə eynidir."),
|
||||
("show_monitors_tip", "Monitorları alətlər panelində göstər"),
|
||||
("View Mode", "Baxış rejimi"),
|
||||
("verify_rustdesk_password_tip", "RustDesk parolunu doğrula"),
|
||||
("No need to elevate", "Səlahiyyəti yüksəltməyə ehtiyac yoxdur"),
|
||||
("System Sound", "Sistem səsi"),
|
||||
("Default", "Standart"),
|
||||
("New RDP", "Yeni RDP"),
|
||||
("Fingerprint", "Barmaq izi"),
|
||||
("Copy Fingerprint", "Barmaq izini kopyala"),
|
||||
("no fingerprints", "Barmaq izi yoxdur"),
|
||||
("Update", "Yenilə"),
|
||||
("resolution_original_tip", "Orijinal ayırdetmə"),
|
||||
("resolution_fit_local_tip", "Lokal ayırdetməyə uyğunlaşdır"),
|
||||
("resolution_custom_tip", "Fərdi ayırdetmə"),
|
||||
("Collapse toolbar", "Alətlər panelini yığ"),
|
||||
("Accept and Elevate", "Qəbul et və səlahiyyəti yüksəlt"),
|
||||
("accept_and_elevate_btn_tooltip", "Əlaqəni qəbul et və UAC icazələrini yüksəlt."),
|
||||
("clipboard_wait_response_timeout_tip", "Kopyalama cavabı gözlənilərkən vaxt bitdi."),
|
||||
("Incoming connection", "Gələn əlaqə"),
|
||||
("Outgoing connection", "Gedən əlaqə"),
|
||||
("Exit", "Çıx"),
|
||||
("Open", "Aç"),
|
||||
("logout_tip", "Çıxmaq istədiyinizə əminsiniz?"),
|
||||
("Service", "Xidmət"),
|
||||
("Start", "Başlat"),
|
||||
("Stop", "Dayandır"),
|
||||
("exceed_max_devices", "İdarə olunan cihazların maksimum sayına çatmısınız."),
|
||||
("Sync with recent sessions", "Son sessiyalarla sinxronlaşdır"),
|
||||
("Sort tags", "Etiketləri sırala"),
|
||||
("Open connection in new tab", "Əlaqəni yeni tabda aç"),
|
||||
("Move tab to new window", "Tabı yeni pəncərəyə köçür"),
|
||||
("Can not be empty", "Boş ola bilməz"),
|
||||
("Already exists", "Artıq mövcuddur"),
|
||||
("Change Password", "Parolu dəyiş"),
|
||||
("Refresh Password", "Parolu yenilə"),
|
||||
("ID", "ID"),
|
||||
("Grid View", "Tor görünüşü"),
|
||||
("List View", "Siyahı görünüşü"),
|
||||
("Select", "Seç"),
|
||||
("Toggle Tags", "Etiketləri aç/bağla"),
|
||||
("pull_ab_failed_tip", "Ünvan kitabını yeniləmək alınmadı"),
|
||||
("push_ab_failed_tip", "Ünvan kitabını serverlə sinxronlaşdırmaq alınmadı"),
|
||||
("synced_peer_readded_tip", "Son sessiyalarda olan cihazlar ünvan kitabına geri sinxronlaşdırılacaq."),
|
||||
("Change Color", "Rəngi dəyiş"),
|
||||
("Primary Color", "Əsas rəng"),
|
||||
("HSV Color", "HSV rəngi"),
|
||||
("Installation Successful!", "Quraşdırma uğurlu oldu!"),
|
||||
("Installation failed!", "Quraşdırma alınmadı!"),
|
||||
("Reverse mouse wheel", "Siçan çarxının istiqamətini tərsinə çevir"),
|
||||
("{} sessions", "{} sessiya"),
|
||||
("scam_title", "SİZİ ALDADA BİLƏRLƏR!"),
|
||||
("scam_text1", "Tanımadığınız və ETİBAR ETMƏDİYİNİZ biri telefonda sizdən RustDesk işlətməyi və xidməti başlatmağı xahiş edirsə, davam etməyin və dərhal telefonu bağlayın."),
|
||||
("scam_text2", "Böyük ehtimalla o, pulunuzu və ya digər şəxsi məlumatlarınızı oğurlamağa çalışan fırıldaqçıdır."),
|
||||
("Don't show again", "Bir daha göstərmə"),
|
||||
("I Agree", "Razıyam"),
|
||||
("Decline", "Rədd et"),
|
||||
("Timeout in minutes", "Dəqiqə ilə gözləmə müddəti"),
|
||||
("auto_disconnect_option_tip", "İstifadəçi fəaliyyət göstərmədikdə gələn sessiyaları avtomatik bağla"),
|
||||
("Connection failed due to inactivity", "Fəaliyyətsizliyə görə əlaqə avtomatik kəsildi"),
|
||||
("Check for software update on startup", "Başlanğıcda proqram yeniləməsini yoxla"),
|
||||
("upgrade_rustdesk_server_pro_to_{}_tip", "RustDesk Server Pro-nu {} və ya daha yeni versiyaya yüksəldin!"),
|
||||
("pull_group_failed_tip", "Qrupu yeniləmək alınmadı"),
|
||||
("Filter by intersection", "Kəsişməyə görə süz"),
|
||||
("Remove wallpaper during incoming sessions", "Gələn sessiyalar zamanı divar kağızını götür"),
|
||||
("Test", "Sına"),
|
||||
("display_is_plugged_out_msg", "Ekran ayrıldı, birinci ekrana keçilir."),
|
||||
("No displays", "Ekran yoxdur"),
|
||||
("Open in new window", "Yeni pəncərədə aç"),
|
||||
("Show displays as individual windows", "Ekranları ayrı pəncərələr kimi göstər"),
|
||||
("Use all my displays for the remote session", "Uzaq sessiya üçün bütün ekranlarımı işlət"),
|
||||
("selinux_tip", "Cihazınızda SELinux aktivdir, bu, RustDesk-in idarə olunan tərəf kimi düzgün işləməsinə mane ola bilər."),
|
||||
("Change view", "Görünüşü dəyiş"),
|
||||
("Big tiles", "Böyük xanalar"),
|
||||
("Small tiles", "Kiçik xanalar"),
|
||||
("List", "Siyahı"),
|
||||
("Virtual display", "Virtual ekran"),
|
||||
("Plug out all", "Hamısını ayır"),
|
||||
("True color (4:4:4)", "Tam rəng (4:4:4)"),
|
||||
("Enable blocking user input", "İstifadəçi girişinin bloklanmasını aktivləşdir"),
|
||||
("id_input_tip", "ID, birbaşa IP və ya portla birlikdə domen (<domain>:<port>) daxil edə bilərsiniz.\nBaşqa serverdəki cihaza giriş etmək istəyirsinizsə, server ünvanını əlavə edin (<id>@<server_address>?key=<key_value>), məsələn,\n9123456234@192.168.16.1:21117?key=5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=.\nİctimai serverdəki cihaza giriş etmək istəyirsinizsə, \"<id>@public\" daxil edin, ictimai server üçün açar lazım deyil.\n\nİlk əlaqədə relay istifadəsini məcbur etmək istəyirsinizsə, ID-nin sonuna \"/r\" əlavə edin, məsələn, \"9123456234/r\"."),
|
||||
("privacy_mode_impl_mag_tip", "Rejim 1"),
|
||||
("privacy_mode_impl_virtual_display_tip", "Rejim 2"),
|
||||
("Enter privacy mode", "Məxfilik rejiminə keç"),
|
||||
("Exit privacy mode", "Məxfilik rejimindən çıx"),
|
||||
("idd_not_support_under_win10_2004_tip", "Dolayı ekran sürücüsü dəstəklənmir. Windows 10, versiya 2004 və ya daha yenisi tələb olunur."),
|
||||
("input_source_1_tip", "Giriş mənbəyi 1"),
|
||||
("input_source_2_tip", "Giriş mənbəyi 2"),
|
||||
("Swap control-command key", "Control və command düymələrini dəyişdir"),
|
||||
("swap-left-right-mouse", "Sol və sağ siçan düymələrini dəyişdir"),
|
||||
("2FA code", "2FA kodu"),
|
||||
("More", "Daha çox"),
|
||||
("enable-2fa-title", "İkifaktorlu doğrulamanı aktivləşdir"),
|
||||
("enable-2fa-desc", "Doğrulayıcınızı indi qurun. Telefonunuzda və ya kompüterinizdə Authy, Microsoft və ya Google Authenticator kimi doğrulayıcı tətbiqdən istifadə edə bilərsiniz.\n\nQR kodu tətbiqinizlə skan edin və ikifaktorlu doğrulamanı aktivləşdirmək üçün tətbiqin göstərdiyi kodu daxil edin."),
|
||||
("wrong-2fa-code", "Kod doğrulana bilmir. Kodun və lokal vaxt parametrlərinin düzgün olduğunu yoxlayın"),
|
||||
("enter-2fa-title", "İkifaktorlu doğrulama"),
|
||||
("Email verification code must be 6 characters.", "E-poçt doğrulama kodu 6 simvol olmalıdır."),
|
||||
("2FA code must be 6 digits.", "2FA kodu 6 rəqəm olmalıdır."),
|
||||
("Multiple Windows sessions found", "Bir neçə Windows sessiyası tapıldı"),
|
||||
("Please select the session you want to connect to", "Qoşulmaq istədiyiniz sessiyanı seçin"),
|
||||
("powered_by_me", "RustDesk ilə işləyir"),
|
||||
("outgoing_only_desk_tip", "Bu, fərdiləşdirilmiş buraxılışdır.\nSiz digər cihazlara qoşula bilərsiniz, lakin digər cihazlar sizin cihazınıza qoşula bilməz."),
|
||||
("preset_password_warning", "Bu fərdiləşdirilmiş buraxılış öncədən təyin edilmiş parolla gəlir. Bu parolu bilən hər kəs cihazınıza tam nəzarət edə bilər. Bunu gözləmirdinizsə, proqramı dərhal silin."),
|
||||
("Security Alert", "Təhlükəsizlik xəbərdarlığı"),
|
||||
("My address book", "Ünvan kitabım"),
|
||||
("Personal", "Şəxsi"),
|
||||
("Owner", "Sahib"),
|
||||
("Set shared password", "Paylaşılan parolu təyin et"),
|
||||
("Exist in", "Mövcuddur"),
|
||||
("Read-only", "Yalnız oxu"),
|
||||
("Read/Write", "Oxu/Yaz"),
|
||||
("Full Control", "Tam nəzarət"),
|
||||
("share_warning_tip", "Yuxarıdakı sahələr paylaşılır və başqaları tərəfindən görünür."),
|
||||
("Everyone", "Hər kəs"),
|
||||
("ab_web_console_tip", "Ətraflı məlumat veb konsolda"),
|
||||
("allow-only-conn-window-open-tip", "Əlaqəyə yalnız RustDesk pəncərəsi açıq olduqda icazə ver"),
|
||||
("no_need_privacy_mode_no_physical_displays_tip", "Fiziki ekran yoxdur, məxfilik rejiminə ehtiyac yoxdur."),
|
||||
("Follow remote cursor", "Uzaq kursoru izlə"),
|
||||
("Follow remote window focus", "Uzaq pəncərənin fokusunu izlə"),
|
||||
("default_proxy_tip", "Standart protokol və port Socks5 və 1080-dir"),
|
||||
("no_audio_input_device_tip", "Audio giriş cihazı tapılmadı."),
|
||||
("Incoming", "Gələn"),
|
||||
("Outgoing", "Gedən"),
|
||||
("Clear Wayland screen selection", "Wayland ekran seçimini təmizlə"),
|
||||
("clear_Wayland_screen_selection_tip", "Ekran seçimini təmizlədikdən sonra paylaşılacaq ekranı yenidən seçə bilərsiniz."),
|
||||
("confirm_clear_Wayland_screen_selection_tip", "Wayland ekran seçimini təmizləmək istədiyinizə əminsiniz?"),
|
||||
("android_new_voice_call_tip", "Yeni səsli zəng sorğusu alındı. Qəbul etsəniz, audio səsli ünsiyyətə keçəcək."),
|
||||
("texture_render_tip", "Şəkillərin daha hamar olması üçün tekstura renderindən istifadə edin. Render problemləri ilə qarşılaşsanız bu seçimi söndürməyi sınaya bilərsiniz."),
|
||||
("Use texture rendering", "Tekstura renderindən istifadə et"),
|
||||
("Floating window", "Üzən pəncərə"),
|
||||
("floating_window_tip", "RustDesk fon xidmətini işlək saxlamağa kömək edir"),
|
||||
("Keep screen on", "Ekranı açıq saxla"),
|
||||
("Never", "Heç vaxt"),
|
||||
("During controlled", "İdarə olunarkən"),
|
||||
("During service is on", "Xidmət işləyərkən"),
|
||||
("Capture screen using DirectX", "Ekranı DirectX ilə çək"),
|
||||
("Back", "Geri"),
|
||||
("Apps", "Tətbiqlər"),
|
||||
("Volume up", "Səsi artır"),
|
||||
("Volume down", "Səsi azalt"),
|
||||
("Power", "Güc"),
|
||||
("Telegram bot", "Telegram botu"),
|
||||
("enable-bot-tip", "Bu funksiyanı aktivləşdirsəniz, 2FA kodunu botunuzdan ala bilərsiniz. O, həm də əlaqə bildirişi kimi işləyə bilər."),
|
||||
("enable-bot-desc", "1. @BotFather ilə söhbət açın.\n2. \"/newbot\" əmrini göndərin. Bu addımı tamamladıqdan sonra token alacaqsınız.\n3. Yeni yaratdığınız botla söhbətə başlayın. Onu aktivləşdirmək üçün \"/hello\" kimi kəsik xətt (\"/\") ilə başlayan mesaj göndərin.\n"),
|
||||
("cancel-2fa-confirm-tip", "2FA-nı ləğv etmək istədiyinizə əminsiniz?"),
|
||||
("cancel-bot-confirm-tip", "Telegram botunu ləğv etmək istədiyinizə əminsiniz?"),
|
||||
("About RustDesk", "RustDesk haqqında"),
|
||||
("Send clipboard keystrokes", "Mübadilə buferi düymə vurmalarını göndər"),
|
||||
("network_error_tip", "Şəbəkə əlaqənizi yoxlayın, sonra yenidən cəhd düyməsini basın."),
|
||||
("Unlock with PIN", "PIN ilə kilidi aç"),
|
||||
("Requires at least {} characters", "Ən azı {} simvol tələb olunur"),
|
||||
("Wrong PIN", "Yanlış PIN"),
|
||||
("Set PIN", "PIN təyin et"),
|
||||
("Enable trusted devices", "Etibarlı cihazları aktivləşdir"),
|
||||
("Manage trusted devices", "Etibarlı cihazları idarə et"),
|
||||
("Platform", "Platforma"),
|
||||
("Days remaining", "Qalan günlər"),
|
||||
("enable-trusted-devices-tip", "Etibarlı cihazlarda 2FA doğrulamasını keç"),
|
||||
("Parent directory", "Yuxarı qovluq"),
|
||||
("Resume", "Davam et"),
|
||||
("Invalid file name", "Yanlış fayl adı"),
|
||||
("one-way-file-transfer-tip", "İdarə olunan tərəfdə birtərəfli fayl ötürülməsi aktivdir."),
|
||||
("Authentication Required", "Doğrulama tələb olunur"),
|
||||
("Authenticate", "Doğrula"),
|
||||
("web_id_input_tip", "Eyni serverdəki ID-ni daxil edə bilərsiniz, veb klientdə birbaşa IP girişi dəstəklənmir.\nBaşqa serverdəki cihaza giriş etmək istəyirsinizsə, server ünvanını əlavə edin (<id>@<server_address>?key=<key_value>), məsələn,\n9123456234@192.168.16.1:21117?key=5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=.\nİctimai serverdəki cihaza giriş etmək istəyirsinizsə, \"<id>@public\" daxil edin, ictimai server üçün açar lazım deyil."),
|
||||
("Download", "Endir"),
|
||||
("Upload folder", "Qovluq yüklə"),
|
||||
("Upload files", "Fayl yüklə"),
|
||||
("Clipboard is synchronized", "Mübadilə buferi sinxronlaşdırılıb"),
|
||||
("Update client clipboard", "Klientin mübadilə buferini yenilə"),
|
||||
("Untagged", "Etiketsiz"),
|
||||
("new-version-of-{}-tip", "{} proqramının yeni versiyası mövcuddur"),
|
||||
("Accessible devices", "Əlçatan cihazlar"),
|
||||
("upgrade_remote_rustdesk_client_to_{}_tip", "Uzaq tərəfdə RustDesk klientini {} və ya daha yeni versiyaya yüksəldin!"),
|
||||
("d3d_render_tip", "D3D render aktiv olduqda bəzi kompüterlərdə uzaq idarəetmə ekranı qara ola bilər."),
|
||||
("Use D3D rendering", "D3D renderindən istifadə et"),
|
||||
("Printer", "Printer"),
|
||||
("printer-os-requirement-tip", "Gedən çap funksiyası Windows 10 və ya daha yuxarı versiya tələb edir."),
|
||||
("printer-requires-installed-{}-client-tip", "Uzaqdan çapdan istifadə etmək üçün bu cihazda {} quraşdırılmalıdır."),
|
||||
("printer-{}-not-installed-tip", "{} Printeri quraşdırılmayıb."),
|
||||
("printer-{}-ready-tip", "{} Printeri quraşdırılıb və istifadəyə hazırdır."),
|
||||
("Install {} Printer", "{} Printerini quraşdır"),
|
||||
("Outgoing Print Jobs", "Gedən çap tapşırıqları"),
|
||||
("Incoming Print Jobs", "Gələn çap tapşırıqları"),
|
||||
("Incoming Print Job", "Gələn çap tapşırığı"),
|
||||
("use-the-default-printer-tip", "Standart printerdən istifadə et"),
|
||||
("use-the-selected-printer-tip", "Seçilmiş printerdən istifadə et"),
|
||||
("auto-print-tip", "Seçilmiş printerlə avtomatik çap et."),
|
||||
("print-incoming-job-confirm-tip", "Uzaq tərəfdən çap tapşırığı aldınız. Onu öz tərəfinizdə icra etmək istəyirsiniz?"),
|
||||
("remote-printing-disallowed-tile-tip", "Uzaqdan çapa icazə verilmir"),
|
||||
("remote-printing-disallowed-text-tip", "İdarə olunan tərəfin icazə parametrləri uzaqdan çapı qadağan edir."),
|
||||
("save-settings-tip", "Parametrləri yadda saxla"),
|
||||
("dont-show-again-tip", "Bunu bir daha göstərmə"),
|
||||
("Take screenshot", "Ekran görüntüsü al"),
|
||||
("Taking screenshot", "Ekran görüntüsü alınır"),
|
||||
("screenshot-merged-screen-not-supported-tip", "Bir neçə ekranın görüntüsünü birləşdirmək hazırda dəstəklənmir. Tək ekrana keçib yenidən cəhd edin."),
|
||||
("screenshot-action-tip", "Ekran görüntüsü ilə necə davam edəcəyinizi seçin."),
|
||||
("Save as", "Fərqli yadda saxla"),
|
||||
("Export", "İxrac et"),
|
||||
("Export Logs", "Jurnalları ixrac et"),
|
||||
("Import Folder", "Qovluq idxal et"),
|
||||
("Copy to clipboard", "Mübadilə buferinə kopyala"),
|
||||
("Enable remote printer", "Uzaq printeri aktivləşdir"),
|
||||
("Downloading {}", "{} endirilir"),
|
||||
("{} Update", "{} yeniləməsi"),
|
||||
("{}-to-update-tip", "{} indi bağlanacaq və yeni versiyanı quraşdıracaq."),
|
||||
("download-new-version-failed-tip", "Endirmə alınmadı. Yenidən cəhd edə və ya \"Endir\" düyməsini basıb buraxılış səhifəsindən endirərək əl ilə yeniləyə bilərsiniz."),
|
||||
("Auto update", "Avtomatik yeniləmə"),
|
||||
("update-failed-check-msi-tip", "Quraşdırma üsulunun yoxlanışı alınmadı. \"Endir\" düyməsini basıb buraxılış səhifəsindən endirin və əl ilə yeniləyin."),
|
||||
("websocket_tip", "WebSocket işlədilərkən yalnız relay əlaqələri dəstəklənir."),
|
||||
("Use WebSocket", "WebSocket işlət"),
|
||||
("Trackpad speed", "Trekped sürəti"),
|
||||
("Default trackpad speed", "Standart trekped sürəti"),
|
||||
("Numeric one-time password", "Rəqəmli birdəfəlik parol"),
|
||||
("Enable IPv6 P2P connection", "IPv6 P2P əlaqəsini aktivləşdir"),
|
||||
("Enable UDP hole punching", "UDP deşik açmanı aktivləşdir"),
|
||||
("View camera", "Kameraya bax"),
|
||||
("Enable camera", "Kameranı aktivləşdir"),
|
||||
("No cameras", "Kamera yoxdur"),
|
||||
("view_camera_unsupported_tip", "Uzaq cihaz kameraya baxışı dəstəkləmir."),
|
||||
("Terminal", "Terminal"),
|
||||
("Enable terminal", "Terminalı aktivləşdir"),
|
||||
("New tab", "Yeni tab"),
|
||||
("Keep terminal sessions on disconnect", "Əlaqə kəsiləndə terminal sessiyalarını saxla"),
|
||||
("Terminal (Run as administrator)", "Terminal (Administrator kimi işə sal)"),
|
||||
("terminal-admin-login-tip", "İdarə olunan tərəfin administrator istifadəçi adını və parolunu daxil edin."),
|
||||
("Failed to get user token.", "İstifadəçi tokenini almaq alınmadı."),
|
||||
("Incorrect username or password.", "Yanlış istifadəçi adı və ya parol."),
|
||||
("The user is not an administrator.", "İstifadəçi administrator deyil."),
|
||||
("Failed to check if the user is an administrator.", "İstifadəçinin administrator olduğunu yoxlamaq alınmadı."),
|
||||
("Supported only in the installed version.", "Yalnız quraşdırılmış versiyada dəstəklənir."),
|
||||
("elevation_username_tip", "İstifadəçi adını və ya domen\\istifadəçi_adı daxil edin"),
|
||||
("Preparing for installation ...", "Quraşdırmaya hazırlanır ..."),
|
||||
("Show my cursor", "Öz kursorumu göstər"),
|
||||
("Scale custom", "Fərdi miqyas"),
|
||||
("Custom scale slider", "Fərdi miqyas sürüşdürücüsü"),
|
||||
("Decrease", "Azalt"),
|
||||
("Increase", "Artır"),
|
||||
("Show virtual mouse", "Virtual siçanı göstər"),
|
||||
("Virtual mouse size", "Virtual siçanın ölçüsü"),
|
||||
("Small", "Kiçik"),
|
||||
("Large", "Böyük"),
|
||||
("Show virtual joystick", "Virtual coystiki göstər"),
|
||||
("Edit note", "Qeydi redaktə et"),
|
||||
("Alias", "Ləqəb"),
|
||||
("ScrollEdge", "Kənardan sürüşdürmə"),
|
||||
("Allow insecure TLS fallback", "Təhlükəsiz olmayan TLS ehtiyat rejiminə icazə ver"),
|
||||
("allow-insecure-tls-fallback-tip", "Standart olaraq RustDesk TLS işlədən protokollar üçün server sertifikatını yoxlayır.\nBu seçim aktiv olduqda, yoxlama alınmadığı halda RustDesk yoxlama addımını keçib davam edəcək."),
|
||||
("Disable UDP", "UDP-ni söndür"),
|
||||
("disable-udp-tip", "Yalnız TCP işlədilib işlədilməyəcəyini idarə edir.\nBu seçim aktiv olduqda RustDesk artıq UDP 21116 işlətməyəcək, əvəzində TCP 21116 işlədiləcək."),
|
||||
("server-oss-not-support-tip", "QEYD: RustDesk server OSS bu funksiyanı əhatə etmir."),
|
||||
("input note here", "qeydi buraya yazın"),
|
||||
("note-at-conn-end-tip", "Əlaqə bitəndə qeyd soruş"),
|
||||
("Show terminal extra keys", "Terminalın əlavə düymələrini göstər"),
|
||||
("Relative mouse mode", "Nisbi siçan rejimi"),
|
||||
("rel-mouse-not-supported-peer-tip", "Qoşulan qarşı tərəf nisbi siçan rejimini dəstəkləmir."),
|
||||
("rel-mouse-not-ready-tip", "Nisbi siçan rejimi hələ hazır deyil. Yenidən cəhd edin."),
|
||||
("rel-mouse-lock-failed-tip", "Kursoru kilidləmək alınmadı. Nisbi siçan rejimi söndürüldü."),
|
||||
("rel-mouse-exit-{}-tip", "Çıxmaq üçün {} basın."),
|
||||
("rel-mouse-permission-lost-tip", "Klaviatura icazəsi geri alındı. Nisbi siçan rejimi söndürüldü."),
|
||||
("Changelog", "Dəyişikliklər siyahısı"),
|
||||
("keep-awake-during-outgoing-sessions-label", "Gedən sessiyalar zamanı ekranı oyaq saxla"),
|
||||
("keep-awake-during-incoming-sessions-label", "Gələn sessiyalar zamanı ekranı oyaq saxla"),
|
||||
("Continue with {}", "{} ilə davam et"),
|
||||
("Display Name", "Görünən ad"),
|
||||
("password-hidden-tip", "Daimi parol təyin edilib (gizlədilib)."),
|
||||
("preset-password-in-use-tip", "Hazırda öncədən təyin edilmiş parol işlədilir."),
|
||||
("Enable privacy mode", "Məxfilik rejimini aktivləşdir"),
|
||||
("allow-remote-toolbar-docking-any-edge", "Uzaq alətlər panelinin pəncərənin istənilən kənarına birləşməsinə icazə ver"),
|
||||
("API Token", "API tokeni"),
|
||||
("Deploy", "Yerləşdir"),
|
||||
("Custom ID (optional)", "Fərdi ID (istəyə bağlı)"),
|
||||
("server_requires_deployment_tip", "Server bu cihazın açıq şəkildə yerləşdirilməsini tələb edir. İndi yerləşdirilsin?"),
|
||||
("The server does not require explicit deployment.", "Server açıq yerləşdirmə tələb etmir."),
|
||||
("Unknown response.", "Naməlum cavab."),
|
||||
("wayland-keyboard-input-disabled-tip", "Klaviatura girişinə icazə verilsin?"),
|
||||
("wayland-keyboard-input-consent-tip", "Bu uzaq kompüterdə yazdıqlarınızı (parollar da daxil olmaqla) oradakı digər tətbiqlər oxuya bilər."),
|
||||
("wayland-keyboard-input-applies-to-tip", "Bu seçim buna aiddir:"),
|
||||
("wayland-soft-keyboard-input-label", "Ekran klaviaturası girişi"),
|
||||
("wayland-keyboard-input-reset-choice-tip", "Klaviatura girişi seçimini sıfırla"),
|
||||
("remember-wayland-keyboard-choice-tip", "Bu uzaq kompüter üçün bir daha soruşma"),
|
||||
("Why this happens", "Bu niyə baş verir"),
|
||||
("Switch display", "Ekranı dəyiş"),
|
||||
("Show monitor switch button on the main toolbar", "Monitor dəyişdirmə düyməsini əsas alətlər panelində göstər"),
|
||||
("Show on the minimized toolbar", "Kiçildilmiş alətlər panelində göstər"),
|
||||
("All monitors", "Bütün monitorlar"),
|
||||
("#{} monitor", "#{} monitor"),
|
||||
("conn-e2ee-unavailable-tip", "Uçdan-uca şifrələmə doğrulana bilmədi.\nUzaq cihaz hələ qurulma mərhələsində ola bilər. Sonra yenidən cəhd edin.\nBu təkrarlanırsa, server etibarsız ola bilər.\nYenə də davam edilsin?"),
|
||||
("ID whitelisting", "ID ağ siyahısı"),
|
||||
("Use ID whitelisting", "ID ağ siyahısından istifadə et"),
|
||||
("id_whitelist_tip", "Yalnız ağ siyahıdakı ID-lər mənə giriş edə bilər"),
|
||||
("id_whitelist_wildcard_tip", "Joker simvollar dəstəklənir: '*' istənilən sayda simvola, '?' isə tam bir simvola uyğun gəlir"),
|
||||
("Invalid ID", "Yanlış ID"),
|
||||
("Your ID is blocked by the peer", "ID-niz qarşı tərəf tərəfindən bloklanıb"),
|
||||
("Your ip is blocked by the peer", "IP-niz qarşı tərəf tərəfindən bloklanıb"),
|
||||
("id_whitelist_caveat_tip", "ID qoşulan klient tərəfindən bildirilir. Bu ağ siyahı riski azaldır, lakin parolu və ya 2FA-nı əvəz etmir."),
|
||||
("whitelist_cidr_tip", "CIDR yazılışı dəstəklənir, məsələn 192.168.1.0/24"),
|
||||
("Continue", "Davam et"),
|
||||
("Browser didn't open? Use the url below to sign in.", "Brauzer açılmadı? Daxil olmaq üçün aşağıdakı URL-dən istifadə edin."),
|
||||
("Lock canvas", "Kətanı kilidlə"),
|
||||
("Sync clipboard between sessions", "Mübadilə buferini sessiyalar arasında sinxronlaşdır"),
|
||||
("sync-clipboard-between-sessions-tip", "Bir uzaq sessiyada kopyalanan mətn və ya şəkillər qoşulu olduğunuz digər sessiyaların mübadilə buferinə də göndərilir."),
|
||||
("terminal-clipboard-write-tip", "Terminaldakı tətbiq bu cihazın mübadilə buferinə mətn kopyalamaq istəyir. İcazə versəniz, bu icazə siz onu Parametrlərdə söndürənə qədər bütün əlaqələrdəki terminal tətbiqlərinə şamil olunur. Əl ilə kopyalama və yapışdırma buna daxil deyil."),
|
||||
("Allow terminal apps to copy to clipboard", "Terminal tətbiqlərinə mübadilə buferinə kopyalamağa icazə ver"),
|
||||
("Enable", "Aktivləşdir"),
|
||||
("Reuse one connection for port forwarding", "Port yönləndirmə üçün bir əlaqəni təkrar işlət"),
|
||||
("port-forward-mux-tip", "Port yönləndirmə xəritələnməsinin hər əlaqəsini qarşı tərəfə açılan tək əlaqə üzərindən daşıyır, hər biri üçün yenidən qoşulub giriş etmək əvəzinə."),
|
||||
("Enable WebRTC P2P connection", "WebRTC P2P əlaqəsini aktivləşdir"),
|
||||
("Enable TCP hole punching", "TCP deşik açmanı aktivləşdir"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Аб’яднанне здымкаў экранаў з некалькіх дысплэяў у дадзены момант не падтрымліваецца. Пераключыцеся на адзін з дысплэяў і паўтарыце дзеянне."),
|
||||
("screenshot-action-tip", "Выберыце, што рабіць з атрыманым здымкам экрана."),
|
||||
("Save as", "Захаваць у файл"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Экспартаваць"),
|
||||
("Export Logs", "Экспартаваць журналы"),
|
||||
("Import Folder", "Імпартаваць папку"),
|
||||
("Copy to clipboard", "Скапіяваць у буфер абмену"),
|
||||
("Enable remote printer", "Выкарыстоўваць аддалены прынтар"),
|
||||
("Downloading {}", "Ідзе спампоўванне {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Уключыць"),
|
||||
("Reuse one connection for port forwarding", "Выкарыстоўваць адно злучэнне для перанакіравання партоў"),
|
||||
("port-forward-mux-tip", "Перадаваць усе злучэнні аднаго перанакіравання партоў праз адно злучэнне з аддаленай прыладай замест паўторнага падлучэння і ўваходу для кожнага з іх."),
|
||||
("Enable WebRTC P2P connection", "Выкарыстоўваць падключэнне WebRTC P2P"),
|
||||
("Enable TCP hole punching", "Выкарыстоўваць TCP hole punching"),
|
||||
("The screen sharing request was declined on the remote device", "Запыт на абагульванне экрана быў адхілены на аддаленай прыладзе"),
|
||||
("The screen sharing request timed out on the remote device", "Час чакання запыту на абагульванне экрана на аддаленай прыладзе выйшаў"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk не можа атрымаць доступ да сеанса працоўнага стала на аддаленай прыладзе, праверце, ці запушчаны сеанс і ці даступны ён для RustDesk"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Партал працоўнага стала на аддаленай прыладзе не мае магчымасці, патрэбнай для абагульвання экрана або аддаленага кіравання, магчыма не ўсталяваны яго бэкенд"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Абагульванне экрана было дазволена на аддаленай прыладзе, але не ўдалося адкрыць злучэнне PipeWire"),
|
||||
("The screen sharing request ended without completing on the remote device", "Запыт на абагульванне экрана на аддаленай прыладзе завяршыўся, не будучы выкананым"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk не змог атрымаць прыдатны экран ад XDG Desktop Portal, магчыма бібліятэка PipeWire занадта старая"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk не змог загрузіць кампанент GStreamer, патрэбны для захопу экрана ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Обединяването на снимки от няколко екрана в момента не се поддържа. Моля, превключете към един екран и опитайте отново."),
|
||||
("screenshot-action-tip", "Моля, изберете как да продължите със снимката на екрана."),
|
||||
("Save as", "Запазване като"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Изнасяне"),
|
||||
("Export Logs", "Изнасяне на дневниците"),
|
||||
("Import Folder", "Внасяне на папка"),
|
||||
("Copy to clipboard", "Копиране в клипборда"),
|
||||
("Enable remote printer", "Позволяване на отдалечен принтер"),
|
||||
("Downloading {}", "Изтегляне на {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Активирай"),
|
||||
("Reuse one connection for port forwarding", "Използване на една връзка за пренасочване на портове"),
|
||||
("port-forward-mux-tip", "Всички връзки на едно пренасочване на портове минават през една връзка към отсрещния компютър, вместо да се свързвате и влизате отново за всяка от тях."),
|
||||
("Enable WebRTC P2P connection", "Позволяване на WebRTC P2P връзка"),
|
||||
("Enable TCP hole punching", "Позволяване на TCP hole punching"),
|
||||
("The screen sharing request was declined on the remote device", "Заявката за споделяне на екрана беше отхвърлена на отдалеченото устройство"),
|
||||
("The screen sharing request timed out on the remote device", "Заявката за споделяне на екрана на отдалеченото устройство изтече"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk не може да достигне сесията на работния плот на отдалеченото устройство, проверете дали сесията работи и дали RustDesk може да я използва"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Порталът на работния плот на отдалеченото устройство няма възможност, необходима за споделяне на екрана или отдалечено управление, може да липсва неговата реализация"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Споделянето на екрана беше одобрено на отдалеченото устройство, но връзката с PipeWire не можа да бъде отворена"),
|
||||
("The screen sharing request ended without completing on the remote device", "Заявката за споделяне на екрана на отдалеченото устройство приключи, без да бъде изпълнена"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk не можа да получи използваем екран от XDG Desktop Portal, библиотеката PipeWire може да е твърде стара"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk не можа да зареди компонент на GStreamer, необходим за заснемане на екрана ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Actualment no és possible combinar captures de pantalla de diverses pantalles. Canvieu a una sola pantalla i torneu a provar."),
|
||||
("screenshot-action-tip", "Seleccioneu com voleu continuar amb la captura de pantalla."),
|
||||
("Save as", "Anomena i desa"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Exporta"),
|
||||
("Export Logs", "Exporta els registres"),
|
||||
("Import Folder", "Importa una carpeta"),
|
||||
("Copy to clipboard", "Copia al porta-retalls"),
|
||||
("Enable remote printer", "Habilita l'impressora remota"),
|
||||
("Downloading {}", "Descarregant {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Habilita"),
|
||||
("Reuse one connection for port forwarding", "Reutilitza una connexió per a la redirecció de ports"),
|
||||
("port-forward-mux-tip", "Fa passar totes les connexions d'una redirecció de ports per una única connexió amb l'altre equip, en lloc de connectar i iniciar la sessió de nou per a cadascuna."),
|
||||
("Enable WebRTC P2P connection", "Habilita la connexió WebRTC P2P"),
|
||||
("Enable TCP hole punching", "Activa la perforació TCP"),
|
||||
("The screen sharing request was declined on the remote device", "La sol·licitud de compartició de pantalla s'ha rebutjat al dispositiu remot"),
|
||||
("The screen sharing request timed out on the remote device", "La sol·licitud de compartició de pantalla ha esgotat el temps al dispositiu remot"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "El RustDesk no pot accedir a la sessió d'escriptori del dispositiu remot; comproveu que hi ha una sessió en marxa i que el RustDesk hi pot accedir"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Al portal d'escriptori del dispositiu remot li falta una funcionalitat necessària per compartir la pantalla o per al control remot; potser no té cap implementació instal·lada"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "S'ha aprovat la compartició de pantalla al dispositiu remot, però no s'ha pogut obrir la connexió PipeWire"),
|
||||
("The screen sharing request ended without completing on the remote device", "La sol·licitud de compartició de pantalla al dispositiu remot ha acabat sense completar-se"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "El RustDesk no ha pogut obtenir cap pantalla utilitzable de l'XDG Desktop Portal; la biblioteca PipeWire pot ser massa antiga"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "El RustDesk no ha pogut carregar un component del GStreamer necessari per capturar la pantalla ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", "允许终端应用复制到剪贴板"),
|
||||
("Enable", "启用"),
|
||||
("Reuse one connection for port forwarding", "端口转发复用同一条连接"),
|
||||
("port-forward-mux-tip", "同一条端口转发规则上的所有连接共用一条到对方的连接,而不是每条连接都重新连接并登录一次。"),
|
||||
("Enable WebRTC P2P connection", "启用 WebRTC P2P 连接"),
|
||||
("Enable TCP hole punching", "启用 TCP 打洞"),
|
||||
("The screen sharing request was declined on the remote device", "远程设备上的用户拒绝了屏幕共享请求"),
|
||||
("The screen sharing request timed out on the remote device", "远程设备上的屏幕共享请求超时了"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk 无法访问远程设备的桌面会话,请确认桌面会话已启动并且 RustDesk 可以使用它"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "远程设备上的桌面门户缺少屏幕共享或远程控制所需的功能,可能没有安装它的后端"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "远程设备上已批准屏幕共享,但无法打开 PipeWire 连接"),
|
||||
("The screen sharing request ended without completing on the remote device", "远程设备上的屏幕共享请求已结束,但未完成"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk 无法从 XDG Desktop Portal 获取可用的屏幕,PipeWire 库可能过旧"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk 无法加载屏幕捕获所需的 GStreamer 组件 ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Sloučení snímků obrazovky z více displejů aktuálně není podporováno. Přepněte na jeden displej a zkuste to znovu."),
|
||||
("screenshot-action-tip", "Vyberte, jak pokračovat se snímkem obrazovky."),
|
||||
("Save as", "Uložit jako"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Exportovat"),
|
||||
("Export Logs", "Exportovat protokoly"),
|
||||
("Import Folder", "Importovat složku"),
|
||||
("Copy to clipboard", "Kopírovat do schránky"),
|
||||
("Enable remote printer", "Povolit vzdálenou tiskárnu"),
|
||||
("Downloading {}", "Stahuje se {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Povolit"),
|
||||
("Reuse one connection for port forwarding", "Znovu použít jedno připojení pro přesměrování portů"),
|
||||
("port-forward-mux-tip", "Vede všechna připojení jednoho přesměrování portů přes jediné připojení k protějšku místo opakovaného připojování a přihlašování pro každé z nich."),
|
||||
("Enable WebRTC P2P connection", "Povolit připojení WebRTC P2P"),
|
||||
("Enable TCP hole punching", "Povolit TCP hole punching"),
|
||||
("The screen sharing request was declined on the remote device", "Žádost o sdílení obrazovky byla na vzdáleném zařízení odmítnuta"),
|
||||
("The screen sharing request timed out on the remote device", "Vypršel časový limit žádosti o sdílení obrazovky na vzdáleném zařízení"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk nemůže získat přístup k relaci plochy na vzdáleném zařízení, ověřte, že relace běží a že ji RustDesk může použít"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Portálu plochy na vzdáleném zařízení chybí funkce potřebná pro sdílení obrazovky nebo vzdálené ovládání, jeho implementace možná není nainstalována"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Sdílení obrazovky bylo na vzdáleném zařízení schváleno, ale připojení PipeWire se nepodařilo otevřít"),
|
||||
("The screen sharing request ended without completing on the remote device", "Žádost o sdílení obrazovky na vzdáleném zařízení skončila, aniž by byla dokončena"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk nezískal z XDG Desktop Portal použitelnou obrazovku, knihovna PipeWire může být příliš stará"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk nemohl načíst komponentu GStreameru potřebnou k zachycení obrazovky ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Sammenfletning af skærmbilleder fra flere skærme understøttes ikke i øjeblikket. Skift venligst til en enkelt skærm og prøv igen."),
|
||||
("screenshot-action-tip", "Vælg venligst, hvordan du vil fortsætte med skærmbilledet."),
|
||||
("Save as", "Gem som"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Eksportér"),
|
||||
("Export Logs", "Eksportér logfiler"),
|
||||
("Import Folder", "Importér mappe"),
|
||||
("Copy to clipboard", "Kopiér til udklipsholder"),
|
||||
("Enable remote printer", "Aktivér fjernprinter"),
|
||||
("Downloading {}", "Downloader {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Aktivér"),
|
||||
("Reuse one connection for port forwarding", "Genbrug én forbindelse til portvideresendelse"),
|
||||
("port-forward-mux-tip", "Fører alle forbindelser i en portvideresendelse gennem én enkelt forbindelse til modparten i stedet for at forbinde og logge ind igen for hver enkelt."),
|
||||
("Enable WebRTC P2P connection", "Aktivér WebRTC P2P-forbindelse"),
|
||||
("Enable TCP hole punching", "Aktivér TCP hole punching"),
|
||||
("The screen sharing request was declined on the remote device", "Anmodningen om skærmdeling blev afvist på fjernenheden"),
|
||||
("The screen sharing request timed out on the remote device", "Anmodningen om skærmdeling fik timeout på fjernenheden"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk kan ikke nå skrivebordssessionen på fjernenheden, kontrollér at en session kører, og at RustDesk kan bruge den"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Skrivebordsportalen på fjernenheden mangler en funktion, der kræves til skærmdeling eller fjernstyring, dens backend er måske ikke installeret"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Skærmdeling blev godkendt på fjernenheden, men PipeWire-forbindelsen kunne ikke åbnes"),
|
||||
("The screen sharing request ended without completing on the remote device", "Anmodningen om skærmdeling på fjernenheden sluttede uden at blive gennemført"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk kunne ikke få en brugbar skærm fra XDG Desktop Portal, PipeWire-biblioteket er måske for gammelt"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk kunne ikke indlæse en GStreamer-komponent, der kræves til skærmoptagelse ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Das Zusammenführen von Screenshots von mehreren Bildschirmen wird derzeit nicht unterstützt. Bitte wechseln Sie zu einem einzelnen Bildschirm und versuchen Sie es erneut."),
|
||||
("screenshot-action-tip", "Bitte wählen Sie aus, wie Sie mit dem Screenshot fortfahren möchten."),
|
||||
("Save as", "Speichern unter"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Exportieren"),
|
||||
("Export Logs", "Protokolle exportieren"),
|
||||
("Import Folder", "Ordner importieren"),
|
||||
("Copy to clipboard", "In Zwischenablage kopieren"),
|
||||
("Enable remote printer", "Entfernten Drucker aktivieren"),
|
||||
("Downloading {}", "{} herunterladen"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Aktivieren"),
|
||||
("Reuse one connection for port forwarding", "Eine Verbindung für die Portweiterleitung wiederverwenden"),
|
||||
("port-forward-mux-tip", "Alle Verbindungen einer Portweiterleitung über eine einzige Verbindung zur Gegenstelle führen, statt sich für jede einzelne neu zu verbinden und anzumelden."),
|
||||
("Enable WebRTC P2P connection", "WebRTC-P2P-Verbindung aktivieren"),
|
||||
("Enable TCP hole punching", "TCP-Hole-Punching aktivieren"),
|
||||
("The screen sharing request was declined on the remote device", "Die Anfrage zur Bildschirmfreigabe wurde auf dem entfernten Gerät abgelehnt"),
|
||||
("The screen sharing request timed out on the remote device", "Bei der Anfrage zur Bildschirmfreigabe auf dem entfernten Gerät ist eine Zeitüberschreitung aufgetreten"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk kann die Desktop-Sitzung auf dem entfernten Gerät nicht erreichen. Prüfen Sie, ob eine Sitzung läuft und ob RustDesk sie nutzen kann"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Dem Desktop-Portal auf dem entfernten Gerät fehlt eine für Bildschirmfreigabe oder Fernsteuerung benötigte Fähigkeit, sein Backend ist möglicherweise nicht installiert"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Die Bildschirmfreigabe wurde auf dem entfernten Gerät genehmigt, aber die PipeWire-Verbindung konnte nicht geöffnet werden"),
|
||||
("The screen sharing request ended without completing on the remote device", "Die Anfrage zur Bildschirmfreigabe auf dem entfernten Gerät endete, ohne abgeschlossen zu werden"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk konnte vom XDG Desktop Portal keinen nutzbaren Bildschirm erhalten, die PipeWire-Bibliothek ist möglicherweise zu alt"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk konnte eine für die Bildschirmaufnahme benötigte GStreamer-Komponente nicht laden ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Η συγχώνευση στιγμιότυπων οθόνης από πολλές οθόνες δεν υποστηρίζεται προς το παρόν. Αλλάξτε σε μία μόνο οθόνη και δοκιμάστε ξανά."),
|
||||
("screenshot-action-tip", "Επιλέξτε πώς θα συνεχίσετε με το στιγμιότυπο οθόνης."),
|
||||
("Save as", "Αποθήκευση ως"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Εξαγωγή"),
|
||||
("Export Logs", "Εξαγωγή αρχείων καταγραφής"),
|
||||
("Import Folder", "Εισαγωγή φακέλου"),
|
||||
("Copy to clipboard", "Αντιγραφή στο πρόχειρο"),
|
||||
("Enable remote printer", "Ενεργοποίηση απομακρυσμένου εκτυπωτή"),
|
||||
("Downloading {}", "Γίνεται Λήψη {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Ενεργοποίηση"),
|
||||
("Reuse one connection for port forwarding", "Επαναχρησιμοποίηση μίας σύνδεσης για την προώθηση θυρών"),
|
||||
("port-forward-mux-tip", "Όλες οι συνδέσεις μιας προώθησης θυρών περνούν από μία μόνο σύνδεση προς τον απομακρυσμένο υπολογιστή, αντί να πραγματοποιείται νέα σύνδεση και ταυτοποίηση για κάθε μία."),
|
||||
("Enable WebRTC P2P connection", "Ενεργοποίηση σύνδεσης WebRTC P2P"),
|
||||
("Enable TCP hole punching", "Ενεργοποίηση διάτρησης οπών TCP"),
|
||||
("The screen sharing request was declined on the remote device", "Το αίτημα κοινής χρήσης οθόνης απορρίφθηκε στην απομακρυσμένη συσκευή"),
|
||||
("The screen sharing request timed out on the remote device", "Το αίτημα κοινής χρήσης οθόνης έληξε στην απομακρυσμένη συσκευή"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "Το RustDesk δεν μπορεί να προσεγγίσει τη συνεδρία επιφάνειας εργασίας στην απομακρυσμένη συσκευή, ελέγξτε ότι μια συνεδρία εκτελείται και ότι το RustDesk μπορεί να τη χρησιμοποιήσει"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Στην πύλη επιφάνειας εργασίας της απομακρυσμένης συσκευής λείπει μια δυνατότητα που απαιτείται για κοινή χρήση οθόνης ή απομακρυσμένο έλεγχο, ίσως δεν είναι εγκατεστημένο το υποσύστημά της"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Η κοινή χρήση οθόνης εγκρίθηκε στην απομακρυσμένη συσκευή, αλλά δεν ήταν δυνατό το άνοιγμα της σύνδεσης PipeWire"),
|
||||
("The screen sharing request ended without completing on the remote device", "Το αίτημα κοινής χρήσης οθόνης στην απομακρυσμένη συσκευή έληξε χωρίς να ολοκληρωθεί"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "Το RustDesk δεν μπόρεσε να λάβει αξιοποιήσιμη οθόνη από το XDG Desktop Portal, η βιβλιοθήκη PipeWire ίσως είναι πολύ παλιά"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "Το RustDesk δεν μπόρεσε να φορτώσει ένα στοιχείο του GStreamer που απαιτείται για την καταγραφή οθόνης ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -277,5 +277,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Your ip is blocked by the peer", "Your IP is blocked by the peer"),
|
||||
("sync-clipboard-between-sessions-tip", "Text or images copied in one remote session are also sent to the clipboard of your other connected sessions."),
|
||||
("terminal-clipboard-write-tip", "An app in the terminal wants to copy text to this device's clipboard. If granted, this permission applies to terminal apps in all connections until you turn it off in Settings. Manual copy and paste are unaffected."),
|
||||
("port-forward-mux-tip", "Carry every connection of a port-forward mapping over a single connection to the peer, instead of connecting and logging in again for each one."),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Kunfandi ekrankopiojn de pluraj ekranoj aktuale ne estas subtenata. Bonvolu ŝanĝi al unu ekrano kaj reprovi."),
|
||||
("screenshot-action-tip", "Bonvolu elekti kiel daŭrigi kun la ekrankopio."),
|
||||
("Save as", "Konservi kiel"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Eksporti"),
|
||||
("Export Logs", "Eksporti protokolojn"),
|
||||
("Import Folder", "Importi dosierujon"),
|
||||
("Copy to clipboard", "Kopii al la poŝo"),
|
||||
("Enable remote printer", "Ebligi foran presilon"),
|
||||
("Downloading {}", "Elŝutas {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Ebligi"),
|
||||
("Reuse one connection for port forwarding", "Reuzi unu konekton por pordo-plusendado"),
|
||||
("port-forward-mux-tip", "Ĉiuj konektoj de unu pordo-plusendado iras tra unu sola konekto al la alia komputilo, anstataŭ konekti kaj ensaluti denove por ĉiu el ili."),
|
||||
("Enable WebRTC P2P connection", "Ebligi WebRTC P2P-konekton"),
|
||||
("Enable TCP hole punching", "Ebligi TCP-trapikadon"),
|
||||
("The screen sharing request was declined on the remote device", "La peto pri ekrandividado estis rifuzita sur la fora aparato"),
|
||||
("The screen sharing request timed out on the remote device", "La peto pri ekrandividado eltempiĝis sur la fora aparato"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk ne povas atingi la labortablan seancon sur la fora aparato, kontrolu ke seanco funkcias kaj ke RustDesk povas uzi ĝin"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Al la labortabla portalo sur la fora aparato mankas kapablo necesa por ekrandividado aŭ fora regado, ĝia realigo eble ne estas instalita"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Ekrandividado estis aprobita sur la fora aparato, sed la konekto PipeWire ne malfermiĝis"),
|
||||
("The screen sharing request ended without completing on the remote device", "La peto pri ekrandividado sur la fora aparato finiĝis sen kompletiĝi"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk ne povis akiri uzeblan ekranon de XDG Desktop Portal, la biblioteko PipeWire eble estas tro malnova"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk ne povis ŝargi komponanton de GStreamer necesan por ekrankapto ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "La fusión de capturas de pantalla de múltiples monitores no está soportada. Por favor, cambie a un monitor e inténtelo de nuevo."),
|
||||
("screenshot-action-tip", "Por favor, seleccione cómo continuar con la captura de pantalla."),
|
||||
("Save as", "Guardar como"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Exportar"),
|
||||
("Export Logs", "Exportar registros"),
|
||||
("Import Folder", "Importar carpeta"),
|
||||
("Copy to clipboard", "Copiar al portapapeles"),
|
||||
("Enable remote printer", "Habilitar impresora remota"),
|
||||
("Downloading {}", "Descargando {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Habilitar"),
|
||||
("Reuse one connection for port forwarding", "Reutilizar una conexión para la redirección de puertos"),
|
||||
("port-forward-mux-tip", "Llevar todas las conexiones de una redirección de puertos por una única conexión con el otro equipo, en lugar de conectar e iniciar sesión de nuevo para cada una."),
|
||||
("Enable WebRTC P2P connection", "Habilitar conexión WebRTC P2P"),
|
||||
("Enable TCP hole punching", "Habilitar perforación de agujero TCP"),
|
||||
("The screen sharing request was declined on the remote device", "La solicitud de compartir pantalla fue rechazada en el dispositivo remoto"),
|
||||
("The screen sharing request timed out on the remote device", "La solicitud de compartir pantalla ha agotado el tiempo de espera en el dispositivo remoto"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk no puede acceder a la sesión de escritorio del dispositivo remoto; compruebe que hay una sesión en marcha y que RustDesk puede usarla"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Al portal de escritorio del dispositivo remoto le falta una función necesaria para compartir la pantalla o para el control remoto; puede que no tenga instalada su implementación"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Se aprobó compartir la pantalla en el dispositivo remoto, pero no se pudo abrir la conexión PipeWire"),
|
||||
("The screen sharing request ended without completing on the remote device", "La solicitud de compartir pantalla en el dispositivo remoto terminó sin completarse"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk no ha podido obtener una pantalla utilizable del XDG Desktop Portal; la biblioteca PipeWire puede ser demasiado antigua"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk no ha podido cargar un componente de GStreamer necesario para capturar la pantalla ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Mitme kuva kuvatõmmiste ühendamine pole praegu toetatud. Palun lülitu ühele kuvale ja proovi uuesti."),
|
||||
("screenshot-action-tip", "Palun vali, kuidas kuvatõmmisega jätkata."),
|
||||
("Save as", "Salvesta kui"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Ekspordi"),
|
||||
("Export Logs", "Ekspordi logid"),
|
||||
("Import Folder", "Impordi kaust"),
|
||||
("Copy to clipboard", "Kopeeri lõikelauale"),
|
||||
("Enable remote printer", "Luba kaugprinter"),
|
||||
("Downloading {}", "Allalaadimine: {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Luba"),
|
||||
("Reuse one connection for port forwarding", "Kasuta pordi suunamiseks üht ühendust"),
|
||||
("port-forward-mux-tip", "Juhib ühe pordisuunamise kõik ühendused ühe teise arvutiga loodud ühenduse kaudu, selle asemel et iga ühenduse jaoks uuesti ühenduda ja sisse logida."),
|
||||
("Enable WebRTC P2P connection", "Luba WebRTC P2P-ühendus"),
|
||||
("Enable TCP hole punching", "Luba TCP-augustamine"),
|
||||
("The screen sharing request was declined on the remote device", "Ekraani jagamise taotlus lükati kaugseadmes tagasi"),
|
||||
("The screen sharing request timed out on the remote device", "Ekraani jagamise taotlus aegus kaugseadmes"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk ei pääse kaugseadmes töölauaseansini, kontrollige, kas seanss töötab ja kas RustDesk saab seda kasutada"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Kaugseadme töölauaportaalil puudub ekraani jagamiseks või kaugjuhtimiseks vajalik võimalus, selle taustarakendus ei pruugi olla paigaldatud"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Ekraani jagamine kiideti kaugseadmes heaks, kuid PipeWire'i ühendust ei õnnestunud avada"),
|
||||
("The screen sharing request ended without completing on the remote device", "Ekraani jagamise taotlus kaugseadmes lõppes ilma lõpule jõudmata"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk ei saanud XDG Desktop Portalilt kasutatavat ekraani, PipeWire'i teek võib olla liiga vana"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk ei suutnud laadida ekraani jäädvustamiseks vajalikku GStreameri komponenti ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Pantaila anitzen pantaila-argazkiak bateratzea ez da onartzen une honetan. Aldatu pantaila bakarrera eta saiatu berriro."),
|
||||
("screenshot-action-tip", "Hautatu pantaila-argazkiarekin nola jarraitu."),
|
||||
("Save as", "Gorde honela"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Esportatu"),
|
||||
("Export Logs", "Esportatu erregistroak"),
|
||||
("Import Folder", "Inportatu karpeta"),
|
||||
("Copy to clipboard", "Kopiatu arbelera"),
|
||||
("Enable remote printer", "Gaitu urruneko inprimagailua"),
|
||||
("Downloading {}", "{} deskargatzen"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Gaitu"),
|
||||
("Reuse one connection for port forwarding", "Berrerabili konexio bakarra portuen birbideratzerako"),
|
||||
("port-forward-mux-tip", "Portu-birbideratze baten konexio guztiak beste ordenagailurako konexio bakar batetik eramaten ditu, bakoitzerako berriro konektatu eta saioa hasi beharrean."),
|
||||
("Enable WebRTC P2P connection", "Gaitu WebRTC P2P konexioa"),
|
||||
("Enable TCP hole punching", "Gaitu TCP zulo-egitea"),
|
||||
("The screen sharing request was declined on the remote device", "Pantaila partekatzeko eskaera baztertu egin da urruneko gailuan"),
|
||||
("The screen sharing request timed out on the remote device", "Pantaila partekatzeko eskaerak denbora-muga gainditu du urruneko gailuan"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk-ek ezin du urruneko gailuko mahaigaineko saioa atzitu, egiaztatu saio bat martxan dagoela eta RustDesk-ek erabil dezakeela"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Urruneko gailuko mahaigaineko atariari pantaila partekatzeko edo urrunetik kontrolatzeko behar den gaitasun bat falta zaio, agian ez dago haren backend-a instalatuta"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Pantaila partekatzea onartu da urruneko gailuan, baina ezin izan da PipeWire konexioa ireki"),
|
||||
("The screen sharing request ended without completing on the remote device", "Urruneko gailuko pantaila partekatzeko eskaera osatu gabe amaitu da"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk-ek ezin izan du pantaila erabilgarririk lortu XDG Desktop Portal-etik, PipeWire liburutegia zaharregia izan daiteke"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk-ek ezin izan du pantaila kapturatzeko beharrezkoa den GStreamer osagai bat kargatu ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "ادغام تصاویر از نمایشگرهای متعدد در حال حاضر پشتیبانی نمی شود. لطفاً به یک صفحه نمایش واحد تغییر دهید و دوباره امتحان کنید."),
|
||||
("screenshot-action-tip", "لطفاً نحوه ادامه با تصویر را انتخاب کنید."),
|
||||
("Save as", "ذخیره به عنوان"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "خروجی گرفتن"),
|
||||
("Export Logs", "خروجی گرفتن از گزارشها"),
|
||||
("Import Folder", "درونریزی پوشه"),
|
||||
("Copy to clipboard", "در کلیپ بورد کپی کنید"),
|
||||
("Enable remote printer", "چاپگر از راه دور را فعال کنید"),
|
||||
("Downloading {}", "بارگیری {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "فعالسازی"),
|
||||
("Reuse one connection for port forwarding", "استفاده مجدد از یک اتصال برای هدایت پورت"),
|
||||
("port-forward-mux-tip", "همه اتصالهای یک هدایت پورت از یک اتصال واحد به دستگاه مقابل عبور میکنند، بهجای اتصال و ورود دوباره برای هر کدام."),
|
||||
("Enable WebRTC P2P connection", "فعالسازی اتصال همتابههمتای WebRTC"),
|
||||
("Enable TCP hole punching", "فعالسازی تکنیک TCP hole punching"),
|
||||
("The screen sharing request was declined on the remote device", "درخواست اشتراکگذاری صفحه در دستگاه راه دور رد شد"),
|
||||
("The screen sharing request timed out on the remote device", "مهلت درخواست اشتراکگذاری صفحه در دستگاه راه دور به پایان رسید"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk نمیتواند به نشست میزکار دستگاه راه دور دسترسی پیدا کند، بررسی کنید که نشست میزکار در حال اجرا باشد و RustDesk بتواند از آن استفاده کند"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "درگاه میزکار در دستگاه راه دور قابلیت لازم برای اشتراکگذاری صفحه یا کنترل از راه دور را ندارد، شاید پیادهسازی آن نصب نشده باشد"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "اشتراکگذاری صفحه در دستگاه راه دور تأیید شد، اما اتصال PipeWire باز نشد"),
|
||||
("The screen sharing request ended without completing on the remote device", "درخواست اشتراکگذاری صفحه در دستگاه راه دور بدون تکمیل شدن پایان یافت"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk نتوانست صفحهای قابل استفاده از XDG Desktop Portal دریافت کند، ممکن است کتابخانه PipeWire خیلی قدیمی باشد"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk نتوانست مؤلفه GStreamer موردنیاز برای ضبط صفحه را بارگذاری کند ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Yhdistetyn näytön kuvakaappaus ei ole tuettu"),
|
||||
("screenshot-action-tip", "Valitse, mitä haluat tehdä kuvakaappaukselle"),
|
||||
("Save as", "Tallenna nimellä"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Vie"),
|
||||
("Export Logs", "Vie lokit"),
|
||||
("Import Folder", "Tuo kansio"),
|
||||
("Copy to clipboard", "Kopioi leikepöydälle"),
|
||||
("Enable remote printer", "Ota etätulostin käyttöön"),
|
||||
("Downloading {}", "Ladataan {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Ota käyttöön"),
|
||||
("Reuse one connection for port forwarding", "Käytä yhtä yhteyttä portin edelleenohjaukseen"),
|
||||
("port-forward-mux-tip", "Välittää kaikki yhden portin edelleenohjauksen yhteydet yhden vastapuoleen avatun yhteyden kautta sen sijaan, että jokaista varten muodostettaisiin yhteys ja kirjauduttaisiin uudelleen."),
|
||||
("Enable WebRTC P2P connection", "Ota WebRTC P2P yhteys käyttöön"),
|
||||
("Enable TCP hole punching", "Ota käyttöön TCP hole punching tekniikka"),
|
||||
("The screen sharing request was declined on the remote device", "Näytön jakamispyyntö hylättiin etälaitteessa"),
|
||||
("The screen sharing request timed out on the remote device", "Näytön jakamispyyntö aikakatkaistiin etälaitteessa"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk ei tavoita etälaitteen työpöytäistuntoa, tarkista että istunto on käynnissä ja että RustDesk voi käyttää sitä"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Etälaitteen työpöytäportaalista puuttuu näytön jakamiseen tai etäohjaukseen tarvittava ominaisuus, sen taustaosaa ei ehkä ole asennettu"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Näytön jakaminen hyväksyttiin etälaitteessa, mutta PipeWire-yhteyttä ei voitu avata"),
|
||||
("The screen sharing request ended without completing on the remote device", "Näytön jakamispyyntö etälaitteessa päättyi ilman että se saatiin valmiiksi"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk ei saanut XDG Desktop Portalilta käyttökelpoista näyttöä, PipeWire-kirjasto voi olla liian vanha"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk ei voinut ladata näytön kaappaukseen tarvittavaa GStreamer-osaa ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "Actuellement, la prise de capture d’écran ne prend pas en charge les affichages multiples. Veuillez réessayer après avoir sélectionné un seul affichage."),
|
||||
("screenshot-action-tip", "Veuillez choisir l’action à effectuer avec la capture d’écran."),
|
||||
("Save as", "Enregistrer sous"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "Exporter"),
|
||||
("Export Logs", "Exporter les journaux"),
|
||||
("Import Folder", "Importer un dossier"),
|
||||
("Copy to clipboard", "Copier dans le presse-papier"),
|
||||
("Enable remote printer", "Activer l’impression à distance"),
|
||||
("Downloading {}", "Téléchargement de {}"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "Activer"),
|
||||
("Reuse one connection for port forwarding", "Réutiliser une seule connexion pour la redirection de ports"),
|
||||
("port-forward-mux-tip", "Faire passer toutes les connexions d'une redirection de ports par une seule connexion vers le pair, au lieu de se connecter et de s'authentifier à nouveau pour chacune."),
|
||||
("Enable WebRTC P2P connection", "Activer la connexion P2P WebRTC"),
|
||||
("Enable TCP hole punching", "Activer le « hole punching » TCP"),
|
||||
("The screen sharing request was declined on the remote device", "La demande de partage d'écran a été refusée sur l'appareil distant"),
|
||||
("The screen sharing request timed out on the remote device", "La demande de partage d'écran a expiré sur l'appareil distant"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk ne peut pas accéder à la session de bureau de l'appareil distant, vérifiez qu'une session est ouverte et que RustDesk peut l'utiliser"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Il manque au portail de bureau de l'appareil distant une fonctionnalité nécessaire au partage d'écran ou au contrôle à distance, son backend n'est peut-être pas installé"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Le partage d'écran a été approuvé sur l'appareil distant, mais la connexion PipeWire n'a pas pu être ouverte"),
|
||||
("The screen sharing request ended without completing on the remote device", "La demande de partage d'écran sur l'appareil distant s'est terminée sans aboutir"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk n'a pas pu obtenir d'écran exploitable auprès du XDG Desktop Portal, la bibliothèque PipeWire est peut-être trop ancienne"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk n'a pas pu charger un composant GStreamer nécessaire à la capture d'écran ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "რამდენიმე ეკრანის სურათის გაერთიანება ამჟამად მხარდაჭერილი არ არის. გადართეთ ერთ ეკრანზე და სცადეთ ხელახლა."),
|
||||
("screenshot-action-tip", "აირჩიეთ, როგორ გავაგრძელოთ ეკრანის სურათთან მუშაობა."),
|
||||
("Save as", "შენახვა როგორც"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "ექსპორტი"),
|
||||
("Export Logs", "ჟურნალების ექსპორტი"),
|
||||
("Import Folder", "საქაღალდის იმპორტი"),
|
||||
("Copy to clipboard", "ბუფერში კოპირება"),
|
||||
("Enable remote printer", "დისტანციური პრინტერის ჩართვა"),
|
||||
("Downloading {}", "მიმდინარეობს {}-ის ჩამოტვირთვა"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "ჩართვა"),
|
||||
("Reuse one connection for port forwarding", "პორტის გადამისამართებისთვის ერთი კავშირის ხელახლა გამოყენება"),
|
||||
("port-forward-mux-tip", "ერთი პორტის გადამისამართების ყველა კავშირი გადის მეორე კომპიუტერთან დამყარებული ერთი კავშირით, ნაცვლად იმისა, რომ თითოეულისთვის თავიდან დაუკავშირდეს და შევიდეს სისტემაში."),
|
||||
("Enable WebRTC P2P connection", "WebRTC P2P კავშირის ჩართვა"),
|
||||
("Enable TCP hole punching", "TCP hole punching-ის ჩართვა"),
|
||||
("The screen sharing request was declined on the remote device", "ეკრანის გაზიარების მოთხოვნა უარყოფილია დისტანციურ მოწყობილობაზე"),
|
||||
("The screen sharing request timed out on the remote device", "ეკრანის გაზიარების მოთხოვნას ვადა გაუვიდა დისტანციურ მოწყობილობაზე"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk-ს არ შეუძლია დისტანციური მოწყობილობის სამუშაო მაგიდის სესიასთან წვდომა, შეამოწმეთ, რომ სესია გაშვებულია და RustDesk-ს შეუძლია მისი გამოყენება"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "დისტანციური მოწყობილობის სამუშაო მაგიდის პორტალს აკლია ეკრანის გაზიარებისთვის ან დისტანციური მართვისთვის საჭირო შესაძლებლობა, შესაძლოა მისი ბექენდი დაინსტალირებული არ არის"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "ეკრანის გაზიარება დამტკიცდა დისტანციურ მოწყობილობაზე, მაგრამ PipeWire-ის კავშირის გახსნა ვერ მოხერხდა"),
|
||||
("The screen sharing request ended without completing on the remote device", "ეკრანის გაზიარების მოთხოვნა დისტანციურ მოწყობილობაზე დასრულდა შეუსრულებლად"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk-მა ვერ მიიღო გამოსადეგი ეკრანი XDG Desktop Portal-იდან, PipeWire-ის ბიბლიოთეკა შესაძლოა ძალიან ძველია"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk-მა ვერ ჩატვირთა ეკრანის ჩაწერისთვის საჭირო GStreamer-ის კომპონენტი ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
782
src/lang/gl.rs
Normal file
782
src/lang/gl.rs
Normal file
@@ -0,0 +1,782 @@
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
[
|
||||
("Status", "Estado"),
|
||||
("Your Desktop", "O teu escritorio"),
|
||||
("desk_tip", "Pódese acceder ao teu escritorio con este ID e contrasinal."),
|
||||
("Password", "Contrasinal"),
|
||||
("Ready", "Listo"),
|
||||
("Established", "Establecido"),
|
||||
("connecting_status", "Conectando á rede de RustDesk..."),
|
||||
("Enable service", "Activar o servizo"),
|
||||
("Start service", "Iniciar o servizo"),
|
||||
("Service is running", "O servizo está a executarse"),
|
||||
("Service is not running", "O servizo non se está a executar"),
|
||||
("not_ready_status", "Non está listo. Comproba a túa conexión"),
|
||||
("Control Remote Desktop", "Controlar o escritorio remoto"),
|
||||
("Transfer file", "Transferir ficheiro"),
|
||||
("Connect", "Conectar"),
|
||||
("Recent sessions", "Sesións recentes"),
|
||||
("Address book", "Caderno de enderezos"),
|
||||
("Confirmation", "Confirmación"),
|
||||
("TCP tunneling", "Tunelización TCP"),
|
||||
("Remove", "Retirar"),
|
||||
("Refresh random password", "Actualizar o contrasinal aleatorio"),
|
||||
("Set your own password", "Establecer o teu propio contrasinal"),
|
||||
("Enable keyboard/mouse", "Activar teclado/rato"),
|
||||
("Enable clipboard", "Activar portapapeis"),
|
||||
("Enable file transfer", "Activar transferencia de ficheiros"),
|
||||
("Enable TCP tunneling", "Activar tunelización TCP"),
|
||||
("IP Whitelisting", "Lista branca de IP"),
|
||||
("ID/Relay Server", "Servidor de ID/retransmisión"),
|
||||
("Import server config", "Importar configuración do servidor"),
|
||||
("Export Server Config", "Exportar configuración do servidor"),
|
||||
("Import server configuration successfully", "A configuración do servidor importouse correctamente"),
|
||||
("Export server configuration successfully", "A configuración do servidor exportouse correctamente"),
|
||||
("Invalid server configuration", "Configuración do servidor non válida"),
|
||||
("Clipboard is empty", "O portapapeis está baleiro"),
|
||||
("Stop service", "Deter o servizo"),
|
||||
("Change ID", "Cambiar ID"),
|
||||
("Your new ID", "O teu novo ID"),
|
||||
("length %min% to %max%", "lonxitude de %min% a %max%"),
|
||||
("starts with a letter", "comeza cunha letra"),
|
||||
("allowed characters", "caracteres permitidos"),
|
||||
("id_change_tip", "Só se permiten caracteres a-z, A-Z, 0-9, - (guión) e _ (guión baixo). A primeira letra debe ser a-z, A-Z. Lonxitude entre 6 e 16."),
|
||||
("Website", "Sitio web"),
|
||||
("About", "Sobre"),
|
||||
("Slogan_tip", "Feito con agarimo neste mundo caótico!"),
|
||||
("Privacy Statement", "Declaración de privacidade"),
|
||||
("Mute", "Silenciar"),
|
||||
("Build Date", "Data de compilación"),
|
||||
("Version", "Versión"),
|
||||
("Home", "Inicio"),
|
||||
("Audio Input", "Entrada de audio"),
|
||||
("Enhancements", "Melloras"),
|
||||
("Hardware Codec", "Códec por hardware"),
|
||||
("Adaptive bitrate", "Taxa de bits adaptativa"),
|
||||
("ID Server", "Servidor de ID"),
|
||||
("Relay Server", "Servidor de retransmisión"),
|
||||
("API Server", "Servidor de API"),
|
||||
("invalid_http", "debe comezar con http:// ou https://"),
|
||||
("Invalid IP", "IP non válida"),
|
||||
("Invalid format", "Formato non válido"),
|
||||
("server_not_support", "Aínda non admitido polo servidor"),
|
||||
("Not available", "Non dispoñíbel"),
|
||||
("Too frequent", "Demasiado frecuente"),
|
||||
("Cancel", "Cancelar"),
|
||||
("Skip", "Omitir"),
|
||||
("Close", "Pechar"),
|
||||
("Retry", "Tentar de novo"),
|
||||
("OK", "Aceptar"),
|
||||
("Password Required", "Requírese contrasinal"),
|
||||
("Please enter your password", "Por favor, introduce o teu contrasinal"),
|
||||
("Remember password", "Lembrar o contrasinal"),
|
||||
("Wrong Password", "Contrasinal incorrecto"),
|
||||
("Do you want to enter again?", "Queres tentalo de novo?"),
|
||||
("Connection Error", "Erro de conexión"),
|
||||
("Error", "Erro"),
|
||||
("Reset by the peer", "Restablecido polo par"),
|
||||
("Connecting...", "Conectando..."),
|
||||
("Connection in progress. Please wait.", "Conexión en curso. Por favor, agarda."),
|
||||
("Please try 1 minute later", "Por favor, téntao 1 minuto máis tarde"),
|
||||
("Login Error", "Erro de inicio de sesión"),
|
||||
("Successful", "Feito correctamente"),
|
||||
("Connected, waiting for image...", "Conectado, agardando pola imaxe..."),
|
||||
("Name", "Nome"),
|
||||
("Type", "Tipo"),
|
||||
("Modified", "Modificado"),
|
||||
("Size", "Tamaño"),
|
||||
("Show Hidden Files", "Amosar ficheiros ocultos"),
|
||||
("Receive", "Recibir"),
|
||||
("Send", "Enviar"),
|
||||
("Refresh File", "Actualizar ficheiro"),
|
||||
("Local", "Local"),
|
||||
("Remote", "Remoto"),
|
||||
("Remote Computer", "Computador remoto"),
|
||||
("Local Computer", "Computador local"),
|
||||
("Confirm Delete", "Confirmar eliminación"),
|
||||
("Delete", "Eliminar"),
|
||||
("Properties", "Propiedades"),
|
||||
("Multi Select", "Selección múltiple"),
|
||||
("Select All", "Seleccionar todo"),
|
||||
("Unselect All", "Deseleccionar todo"),
|
||||
("Empty Directory", "Directorio baleiro"),
|
||||
("Not an empty directory", "Non é un directorio baleiro"),
|
||||
("Are you sure you want to delete this file?", "Tes a certeza de que queres eliminar este ficheiro?"),
|
||||
("Are you sure you want to delete this empty directory?", "Tes a certeza de que queres eliminar este directorio baleiro?"),
|
||||
("Are you sure you want to delete the file of this directory?", "Tes a certeza de que queres eliminar o ficheiro deste directorio?"),
|
||||
("Do this for all conflicts", "Facer isto para todos os conflitos"),
|
||||
("This is irreversible!", "Isto é irreversíbel!"),
|
||||
("Deleting", "Eliminando"),
|
||||
("files", "ficheiros"),
|
||||
("Waiting", "Agardando"),
|
||||
("Finished", "Rematado"),
|
||||
("Speed", "Velocidade"),
|
||||
("Custom Image Quality", "Calidade de imaxe personalizada"),
|
||||
("Privacy mode", "Modo de privacidade"),
|
||||
("Block user input", "Bloquear a entrada do usuario"),
|
||||
("Unblock user input", "Desbloquear a entrada do usuario"),
|
||||
("Adjust Window", "Axustar ventá"),
|
||||
("Original", "Orixinal"),
|
||||
("Shrink", "Reducir"),
|
||||
("Stretch", "Axustar"),
|
||||
("Scrollbar", "Barra de desprazamento"),
|
||||
("ScrollAuto", "Desprazamento automático"),
|
||||
("Good image quality", "Boa calidade de imaxe"),
|
||||
("Balanced", "Equilibrada"),
|
||||
("Optimize reaction time", "Optimizar tempo de reacción"),
|
||||
("Custom", "Personalizado"),
|
||||
("Show remote cursor", "Amosar o cursor remoto"),
|
||||
("Show quality monitor", "Amosar o monitor de calidade"),
|
||||
("Disable clipboard", "Desactivar portapapeis"),
|
||||
("Lock after session end", "Bloquear tras rematar a sesión"),
|
||||
("Insert Ctrl + Alt + Del", "Inserir Ctrl + Alt + Supr"),
|
||||
("Insert Lock", "Inserir bloqueo"),
|
||||
("Refresh", "Actualizar"),
|
||||
("ID does not exist", "O ID non existe"),
|
||||
("Failed to connect to rendezvous server", "Produciuse un fallo ao conectar co servidor de cita (rendezvous)"),
|
||||
("Please try later", "Por favor, téntao máis tarde"),
|
||||
("Remote desktop is offline", "O escritorio remoto está desconectado"),
|
||||
("Key mismatch", "As chaves non coinciden"),
|
||||
("Timeout", "Tempo de espera esgotado"),
|
||||
("Failed to connect to relay server", "Produciuse un fallo ao conectar co servidor de retransmisión"),
|
||||
("Failed to connect via rendezvous server", "Produciuse un fallo ao conectar a través do servidor de cita (rendezvous)"),
|
||||
("Failed to connect via relay server", "Produciuse un fallo ao conectar a través do servidor de retransmisión"),
|
||||
("Failed to make direct connection to remote desktop", "Produciuse un fallo ao realizar a conexión directa co escritorio remoto"),
|
||||
("Set Password", "Establecer contrasinal"),
|
||||
("OS Password", "Contrasinal do SO"),
|
||||
("install_tip", "Debido ao UAC, RustDesk non pode funcionar axeitadamente como lado remoto nalgúns casos. Para evitar o UAC, preme o botón de abaixo para instalar RustDesk no sistema."),
|
||||
("Click to upgrade", "Preme para anovar"),
|
||||
("Configure", "Configurar"),
|
||||
("config_acc", "Para poder controlar o teu escritorio remotamente, cómpre conceder a RustDesk permisos de «Accesibilidade»."),
|
||||
("config_screen", "Para poder acceder ao teu escritorio remotamente, cómpre conceder a RustDesk permisos de «Gravación de pantalla»."),
|
||||
("Installing ...", "Instalando..."),
|
||||
("Install", "Instalar"),
|
||||
("Installation", "Instalación"),
|
||||
("Installation Path", "Ruta de instalación"),
|
||||
("Create start menu shortcuts", "Crear atallos no menú de inicio"),
|
||||
("Create desktop icon", "Crear icona no escritorio"),
|
||||
("agreement_tip", "Ao iniciar a instalación, aceptas o acordo de licenza."),
|
||||
("Accept and Install", "Aceptar e instalar"),
|
||||
("End-user license agreement", "Acordo de licenza de usuario final"),
|
||||
("Generating ...", "Xerando..."),
|
||||
("Your installation is lower version.", "A túa instalación é dunha versión anterior."),
|
||||
("not_close_tcp_tip", "Non peches esta ventá mentres esteas a usar o túnel"),
|
||||
("Listening ...", "Escoitando..."),
|
||||
("Remote Host", "Equipo remoto"),
|
||||
("Remote Port", "Porto remoto"),
|
||||
("Action", "Acción"),
|
||||
("Add", "Engadir"),
|
||||
("Local Port", "Porto local"),
|
||||
("Local Address", "Enderezo local"),
|
||||
("Change Local Port", "Cambiar o porto local"),
|
||||
("setup_server_tip", "Para unha conexión máis rápida, configura o teu propio servidor"),
|
||||
("Too short, at least 6 characters.", "Demasiado curto, polo menos 6 caracteres."),
|
||||
("The confirmation is not identical.", "A confirmación non é idéntica."),
|
||||
("Permissions", "Permisos"),
|
||||
("Accept", "Aceptar"),
|
||||
("Dismiss", "Descartar"),
|
||||
("Disconnect", "Desconectar"),
|
||||
("Enable file copy and paste", "Activar copiar e pegar ficheiros"),
|
||||
("Connected", "Conectado"),
|
||||
("Direct and encrypted connection", "Conexión directa e cifrada"),
|
||||
("Relayed and encrypted connection", "Conexión retransmitida e cifrada"),
|
||||
("Direct and unencrypted connection", "Conexión directa e sen cifrar"),
|
||||
("Relayed and unencrypted connection", "Conexión retransmitida e sen cifrar"),
|
||||
("Enter Remote ID", "Introduce o ID remoto"),
|
||||
("Enter your password", "Introduce o teu contrasinal"),
|
||||
("Logging in...", "Iniciando sesión..."),
|
||||
("Enable RDP session sharing", "Activar compartir sesións de RDP"),
|
||||
("Auto Login", "Acceso automático (só válido se activas «Bloquear tras rematar a sesión»)"),
|
||||
("Enable direct IP access", "Activar acceso directo por IP"),
|
||||
("Rename", "Renomear"),
|
||||
("Space", "Espazo"),
|
||||
("Create desktop shortcut", "Crear atallo no escritorio"),
|
||||
("Change Path", "Cambiar a ruta"),
|
||||
("Create Folder", "Crear cartafol"),
|
||||
("Please enter the folder name", "Por favor, introduce o nome do cartafol"),
|
||||
("Fix it", "Solucionalo"),
|
||||
("Warning", "Aviso"),
|
||||
("Login screen using Wayland is not supported", "Non se admite a pantalla de inicio de sesión con Wayland"),
|
||||
("Reboot required", "Cómpre reiniciar"),
|
||||
("Unsupported display server", "Servidor de pantalla non admitido"),
|
||||
("x11 expected", "Esperábase X11"),
|
||||
("Port", "Porto"),
|
||||
("Settings", "Axustes"),
|
||||
("Username", "Nome de usuario"),
|
||||
("Invalid port", "Porto non válido"),
|
||||
("Closed manually by the peer", "Pechado manualmente polo par"),
|
||||
("Enable remote configuration modification", "Activar a modificación remota da configuración"),
|
||||
("Run without install", "Executar sen instalar"),
|
||||
("Connect via relay", "Conectar mediante retransmisión"),
|
||||
("Always connect via relay", "Conectar sempre mediante retransmisión"),
|
||||
("whitelist_tip", "Só as IP da lista branca poden acceder a min"),
|
||||
("Login", "Iniciar sesión"),
|
||||
("Verify", "Verificar"),
|
||||
("Remember me", "Lembrarme"),
|
||||
("Trust this device", "Confiar neste dispositivo"),
|
||||
("Verification code", "Código de verificación"),
|
||||
("verification_tip", "Enviouse un código de verificación ao enderezo de correo electrónico rexistrado, introduce o código para continuar co inicio de sesión."),
|
||||
("Logout", "Pechar sesión"),
|
||||
("Tags", "Etiquetas"),
|
||||
("Search ID", "Buscar ID"),
|
||||
("whitelist_sep", "Separadas por coma, punto e coma, espazos ou salto de liña"),
|
||||
("Add ID", "Engadir ID"),
|
||||
("Add Tag", "Engadir etiqueta"),
|
||||
("Unselect all tags", "Deseleccionar todas as etiquetas"),
|
||||
("Network error", "Erro de rede"),
|
||||
("Username missed", "Falta o nome de usuario"),
|
||||
("Password missed", "Falta o contrasinal"),
|
||||
("Wrong credentials", "Nome de usuario ou contrasinal incorrectos"),
|
||||
("The verification code is incorrect or has expired", "O código de verificación é incorrecto ou caducou"),
|
||||
("Edit Tag", "Editar etiqueta"),
|
||||
("Forget Password", "Esquecín o contrasinal"),
|
||||
("Favorites", "Favoritos"),
|
||||
("Add to Favorites", "Engadir a favoritos"),
|
||||
("Remove from Favorites", "Retirar de favoritos"),
|
||||
("Empty", "Baleiro"),
|
||||
("Invalid folder name", "Nome de cartafol non válido"),
|
||||
("Socks5 Proxy", "Proxy Socks5"),
|
||||
("Socks5/Http(s) Proxy", "Proxy Socks5/Http(s)"),
|
||||
("Discovered", "Descubertos"),
|
||||
("install_daemon_tip", "Para iniciar no arranque do sistema, cómpre instalar o servizo do sistema."),
|
||||
("Remote ID", "ID remoto"),
|
||||
("Paste", "Pegar"),
|
||||
("Paste here?", "Pegar aquí?"),
|
||||
("Are you sure to close the connection?", "Tes a certeza de que queres pechar a conexión?"),
|
||||
("Download new version", "Descargar a nova versión"),
|
||||
("Touch mode", "Modo táctil"),
|
||||
("Mouse mode", "Modo de rato"),
|
||||
("One-Finger Tap", "Toque cun dedo"),
|
||||
("Left Mouse", "Botón esquerdo do rato"),
|
||||
("One-Long Tap", "Toque longo cun dedo"),
|
||||
("Two-Finger Tap", "Toque con dous dedos"),
|
||||
("Right Mouse", "Botón dereito do rato"),
|
||||
("One-Finger Move", "Mover cun dedo"),
|
||||
("Double Tap & Move", "Dobre toque e mover"),
|
||||
("Mouse Drag", "Arrastrar co rato"),
|
||||
("Three-Finger vertically", "Tres dedos en vertical"),
|
||||
("Mouse Wheel", "Roda do rato"),
|
||||
("Two-Finger Move", "Mover con dous dedos"),
|
||||
("Canvas Move", "Mover lenzo"),
|
||||
("Pinch to Zoom", "Picar para achegar"),
|
||||
("Canvas Zoom", "Zoom do lenzo"),
|
||||
("Reset canvas", "Restablecer lenzo"),
|
||||
("No permission of file transfer", "Sen permiso de transferencia de ficheiros"),
|
||||
("Note", "Nota"),
|
||||
("Connection", "Conexión"),
|
||||
("Share screen", "Compartir pantalla"),
|
||||
("Chat", "Conversa"),
|
||||
("Total", "Total"),
|
||||
("items", "elementos"),
|
||||
("Selected", "Seleccionado"),
|
||||
("Screen Capture", "Captura de pantalla"),
|
||||
("Input Control", "Control de entrada"),
|
||||
("Audio Capture", "Captura de audio"),
|
||||
("Do you accept?", "Aceptas?"),
|
||||
("Open System Setting", "Abrir axustes do sistema"),
|
||||
("How to get Android input permission?", "Como obter permisos de entrada en Android?"),
|
||||
("android_input_permission_tip1", "Para que un dispositivo remoto poida controlar o teu dispositivo Android mediante rato ou táctil, cómpre permitirlle a RustDesk usar o servizo de «Accesibilidade»."),
|
||||
("android_input_permission_tip2", "Por favor, vai á páxina de axustes do sistema seguinte, busca e entra en [Servizos instalados], e activa o servizo [Entrada de RustDesk]."),
|
||||
("android_new_connection_tip", "Recibiuse unha nova solicitude de control que desexa controlar o teu dispositivo actual."),
|
||||
("android_service_will_start_tip", "Activar «Captura de pantalla» iniciará automaticamente o servizo, permitindo que outros dispositivos soliciten conectarse ao teu dispositivo."),
|
||||
("android_stop_service_tip", "Pechar o servizo pechará automaticamente todas as conexións establecidas."),
|
||||
("android_version_audio_tip", "A versión actual de Android non admite a captura de audio. Por favor, actualiza a Android 10 ou superior."),
|
||||
("android_start_service_tip", "Toca en [Iniciar servizo] ou activa o permiso de [Captura de pantalla] para iniciar o servizo de compartir pantalla."),
|
||||
("android_permission_may_not_change_tip", "Os permisos para as conexións establecidas poden non cambiar ao instante ata que se reconecte."),
|
||||
("Account", "Conta"),
|
||||
("Overwrite", "Sobrescribir"),
|
||||
("This file exists, skip or overwrite this file?", "Este ficheiro xa existe, queres omitilo ou sobrescribilo?"),
|
||||
("Quit", "Saír"),
|
||||
("Help", "Axuda"),
|
||||
("Failed", "Fallou"),
|
||||
("Succeeded", "Feito correctamente"),
|
||||
("Someone turns on privacy mode, exit", "Alguén activou o modo de privacidade, saíndo"),
|
||||
("Unsupported", "Non admitido"),
|
||||
("Peer denied", "O par denegou a conexión"),
|
||||
("Peer exit", "O par saíu"),
|
||||
("Failed to turn off", "Produciuse un fallo ao desactivar"),
|
||||
("Turned off", "Desactivado"),
|
||||
("Language", "Idioma"),
|
||||
("Keep RustDesk background service", "Manter o servizo de RustDesk en segundo plano"),
|
||||
("Ignore Battery Optimizations", "Ignorar as optimizacións de batería"),
|
||||
("android_open_battery_optimizations_tip", "Se queres desactivar esta función, vai á páxina seguinte de axustes do aplicativo RustDesk, busca e entra en [Batería] e desmarca [Sen restricións]"),
|
||||
("Start on boot", "Iniciar no arranque"),
|
||||
("Start the screen sharing service on boot, requires special permissions", "Iniciar o servizo de compartir pantalla no arranque; require permisos especiais"),
|
||||
("Connection not allowed", "Conexión non permitida"),
|
||||
("Legacy mode", "Modo herdado"),
|
||||
("Map mode", "Modo mapa"),
|
||||
("Translate mode", "Modo tradución"),
|
||||
("Use permanent password", "Usar contrasinal permanente"),
|
||||
("Use both passwords", "Usar ambos os contrasinais"),
|
||||
("Set permanent password", "Establecer contrasinal permanente"),
|
||||
("Enable remote restart", "Activar o reinicio remoto"),
|
||||
("Restart remote device", "Reiniciar o dispositivo remoto"),
|
||||
("Are you sure you want to restart", "Tes a certeza de que queres reiniciar?"),
|
||||
("Restarting remote device", "Reiniciando o dispositivo remoto"),
|
||||
("remote_restarting_tip", "O dispositivo remoto estase a reiniciar. Pecha esta caixa de mensaxe e reconéctate co contrasinal permanente despois dun momento."),
|
||||
("Copied", "Copiado"),
|
||||
("Exit Fullscreen", "Saír de pantalla completa"),
|
||||
("Fullscreen", "Pantalla completa"),
|
||||
("Mobile Actions", "Accións móbiles"),
|
||||
("Select Monitor", "Seleccionar monitor"),
|
||||
("Control Actions", "Accións de control"),
|
||||
("Display Settings", "Axustes de pantalla"),
|
||||
("Ratio", "Proporción"),
|
||||
("Image Quality", "Calidade da imaxe"),
|
||||
("Scroll Style", "Estilo de desprazamento"),
|
||||
("Show Toolbar", "Amosar a barra de ferramentas"),
|
||||
("Hide Toolbar", "Agochar a barra de ferramentas"),
|
||||
("Direct Connection", "Conexión directa"),
|
||||
("Relay Connection", "Conexión por retransmisión"),
|
||||
("Secure Connection", "Conexión segura"),
|
||||
("Insecure Connection", "Conexión non segura"),
|
||||
("Scale original", "Escala orixinal"),
|
||||
("Scale adaptive", "Escala adaptativa"),
|
||||
("General", "Xeral"),
|
||||
("Security", "Seguranza"),
|
||||
("Theme", "Tema"),
|
||||
("Dark Theme", "Tema escuro"),
|
||||
("Light Theme", "Tema claro"),
|
||||
("Dark", "Escuro"),
|
||||
("Light", "Claro"),
|
||||
("Follow System", "Seguir o sistema"),
|
||||
("Enable hardware codec", "Activar códec por hardware"),
|
||||
("Unlock Security Settings", "Desbloquear os axustes de seguranza"),
|
||||
("Enable audio", "Activar audio"),
|
||||
("Unlock Network Settings", "Desbloquear os axustes de rede"),
|
||||
("Server", "Servidor"),
|
||||
("Direct IP Access", "Acceso directo por IP"),
|
||||
("Proxy", "Proxy"),
|
||||
("Apply", "Aplicar"),
|
||||
("Disconnect all devices?", "Desconectar todos os dispositivos?"),
|
||||
("Clear", "Limpar"),
|
||||
("Audio Input Device", "Dispositivo de entrada de audio"),
|
||||
("Use IP Whitelisting", "Usar lista branca de IP"),
|
||||
("Network", "Rede"),
|
||||
("Pin Toolbar", "Fixar a barra de ferramentas"),
|
||||
("Unpin Toolbar", "Desfixar a barra de ferramentas"),
|
||||
("Recording", "Gravación"),
|
||||
("Directory", "Directorio"),
|
||||
("Automatically record incoming sessions", "Gravar automaticamente as sesións entrantes"),
|
||||
("Automatically record outgoing sessions", "Gravar automaticamente as sesións saíntes"),
|
||||
("Change", "Cambiar"),
|
||||
("Start session recording", "Iniciar a gravación da sesión"),
|
||||
("Stop session recording", "Deter a gravación da sesión"),
|
||||
("Enable recording session", "Activar a gravación de sesións"),
|
||||
("Enable LAN discovery", "Activar detección na rede local (LAN)"),
|
||||
("Deny LAN discovery", "Denegar detección na rede local (LAN)"),
|
||||
("Write a message", "Escribe unha mensaxe"),
|
||||
("Prompt", "Aviso"),
|
||||
("Please wait for confirmation of UAC...", "Por favor, agarda pola confirmación do UAC..."),
|
||||
("elevated_foreground_window_tip", "A ventá actual do escritorio remoto require maiores privilexios para operar, polo que non se pode usar o rato e o teclado temporalmente. Podes pedir ao usuario remoto que minimice a ventá actual ou premer o botón de elevación na ventá de xestión de conexións. Para evitar este problema, recoméndase instalar o software no dispositivo remoto."),
|
||||
("Disconnected", "Desconectado"),
|
||||
("Other", "Outro"),
|
||||
("Confirm before closing multiple tabs", "Confirmar antes de pechar varias pestanas"),
|
||||
("Keyboard Settings", "Axustes do teclado"),
|
||||
("Full Access", "Acceso completo"),
|
||||
("Screen Share", "Compartición de pantalla"),
|
||||
("ubuntu-21-04-required", "Wayland require Ubuntu 21.04 ou superior."),
|
||||
("wayland-requires-higher-linux-version", "Wayland require unha versión superior da distribución de Linux. Por favor, proba co escritorio X11 ou cambia de sistema operativo."),
|
||||
("xdp-portal-unavailable", "Fallou a captura de pantalla en Wayland. É posíbel que o XDG Desktop Portal fallase ou non estea dispoñíbel. Tenta inicialo de novo con `systemctl --user restart xdg-desktop-portal`."),
|
||||
("JumpLink", "Ver"),
|
||||
("Please Select the screen to be shared(Operate on the peer side).", "Por favor, selecciona a pantalla que se vai compartir (operar no lado do par)."),
|
||||
("Show RustDesk", "Amosar RustDesk"),
|
||||
("This PC", "Este equipo"),
|
||||
("or", "ou"),
|
||||
("Elevate", "Elevar"),
|
||||
("Zoom cursor", "Zoom no cursor"),
|
||||
("Accept sessions via password", "Aceptar sesións mediante contrasinal"),
|
||||
("Accept sessions via click", "Aceptar sesións mediante clic"),
|
||||
("Accept sessions via both", "Aceptar sesións mediante ambos os dous"),
|
||||
("Please wait for the remote side to accept your session request...", "Por favor, agarda a que o lado remoto acepte a túa solicitude de sesión..."),
|
||||
("One-time Password", "Contrasinal dun só uso"),
|
||||
("Use one-time password", "Usar contrasinal dun só uso"),
|
||||
("One-time password length", "Lonxitude do contrasinal dun só uso"),
|
||||
("Request access to your device", "Solicitar acceso ao teu dispositivo"),
|
||||
("Hide connection management window", "Agochar a ventá de xestión da conexión"),
|
||||
("hide_cm_tip", "Só se permite agochar se se aceptan sesións mediante contrasinal e se usa contrasinal permanente"),
|
||||
("wayland_experiment_tip", "A compatibilidade con Wayland está en fase experimental; usa X11 se precisas acceso desatendido."),
|
||||
("Right click to select tabs", "Clic co botón dereito para seleccionar pestanas"),
|
||||
("Skipped", "Omitido"),
|
||||
("Add to address book", "Engadir ao caderno de enderezos"),
|
||||
("Group", "Grupo"),
|
||||
("Search", "Buscar"),
|
||||
("Closed manually by web console", "Pechado manualmente desde a consola web"),
|
||||
("Local keyboard type", "Tipo de teclado local"),
|
||||
("Select local keyboard type", "Seleccionar o tipo de teclado local"),
|
||||
("software_render_tip", "Se usas unha tarxeta gráfica Nvidia en Linux e a ventá remota péchase inmediatamente tras conectar, cambiar ao controlador de código aberto Nouveau e elixir renderizado por software pode axudar. Requírese reiniciar o software."),
|
||||
("Always use software rendering", "Empregar sempre renderizado por software"),
|
||||
("config_input", "Para poder controlar o escritorio remoto co teclado, cómpre conceder a RustDesk permisos de «Monitorización de entrada»."),
|
||||
("config_microphone", "Para poder falar remotamente, cómpre conceder a RustDesk permisos de «Gravar audio»."),
|
||||
("request_elevation_tip", "Tamén podes solicitar a elevación de privilexios se hai alguén no lado remoto."),
|
||||
("Wait", "Agardar"),
|
||||
("Elevation Error", "Erro de elevación"),
|
||||
("Ask the remote user for authentication", "Pedir autenticación ao usuario remoto"),
|
||||
("Choose this if the remote account is administrator", "Elixe isto se a conta remota é de administrador"),
|
||||
("Transmit the username and password of administrator", "Transmitir o nome de usuario e o contrasinal do administrador"),
|
||||
("still_click_uac_tip", "Aínda require que o usuario remoto prema Aceptar na ventá de UAC de RustDesk en execución."),
|
||||
("Request Elevation", "Solicitar elevación"),
|
||||
("wait_accept_uac_tip", "Por favor, agarda a que o usuario remoto acepte o diálogo de UAC."),
|
||||
("Elevate successfully", "Elevouse correctamente"),
|
||||
("uppercase", "maiúscula"),
|
||||
("lowercase", "minúscula"),
|
||||
("digit", "díxito"),
|
||||
("special character", "carácter especial"),
|
||||
("length>=8", "lonxitude>=8"),
|
||||
("Weak", "Débil"),
|
||||
("Medium", "Media"),
|
||||
("Strong", "Forte"),
|
||||
("Switch Sides", "Intercambiar lados"),
|
||||
("Please confirm if you want to share your desktop?", "Por favor, confirma se queres compartir o teu escritorio"),
|
||||
("Display", "Pantalla"),
|
||||
("Default View Style", "Estilo de visualización predeterminado"),
|
||||
("Default Scroll Style", "Estilo de desprazamento predeterminado"),
|
||||
("Default Image Quality", "Calidade de imaxe predeterminada"),
|
||||
("Default Codec", "Códec predeterminado"),
|
||||
("Bitrate", "Taxa de bits"),
|
||||
("FPS", "FPS"),
|
||||
("Auto", "Automático"),
|
||||
("Other Default Options", "Outras opcións predeterminadas"),
|
||||
("Voice call", "Chamada de voz"),
|
||||
("Text chat", "Conversa de texto"),
|
||||
("Stop voice call", "Deter chamada de voz"),
|
||||
("relay_hint_tip", "Quizais non sexa posíbel conectar directamente; podes tentar conectar mediante retransmisión. Ademais, se queres usar a retransmisión no primeiro intento, podes engadir o sufixo «/r» ao ID ou seleccionar a opción «Conectar sempre mediante retransmisión» na tarxeta de sesións recentes se existe."),
|
||||
("Reconnect", "Reconectar"),
|
||||
("Codec", "Códec"),
|
||||
("Resolution", "Resolución"),
|
||||
("No transfers in progress", "Non hai transferencias en curso"),
|
||||
("Set one-time password length", "Establecer lonxitude do contrasinal dun só uso"),
|
||||
("RDP Settings", "Axustes de RDP"),
|
||||
("Sort by", "Ordenar por"),
|
||||
("New Connection", "Nova conexión"),
|
||||
("Restore", "Restaurar"),
|
||||
("Minimize", "Minimizar"),
|
||||
("Maximize", "Maximizar"),
|
||||
("Your Device", "O teu dispositivo"),
|
||||
("empty_recent_tip", "Vaites, non hai sesións recentes!\nÉ hora de planificar unha nova."),
|
||||
("empty_favorite_tip", "Aínda non tes pares favoritos?\nBusquemos alguén con quen conectar e engádeo aos teus favoritos!"),
|
||||
("empty_lan_tip", "Oh non, parece que aínda non descubrimos ningún par."),
|
||||
("empty_address_book_tip", "Vaites, parece que actualmente non hai pares listados no teu caderno de enderezos."),
|
||||
("Empty Username", "Nome de usuario baleiro"),
|
||||
("Empty Password", "Contrasinal baleiro"),
|
||||
("Me", "Eu"),
|
||||
("identical_file_tip", "Este ficheiro é idéntico ao do par."),
|
||||
("show_monitors_tip", "Amosar monitores na barra de ferramentas"),
|
||||
("View Mode", "Modo de visualización"),
|
||||
("verify_rustdesk_password_tip", "Verificar o contrasinal de RustDesk"),
|
||||
("No need to elevate", "Non é necesario elevar"),
|
||||
("System Sound", "Son do sistema"),
|
||||
("Default", "Predeterminado"),
|
||||
("New RDP", "Novo RDP"),
|
||||
("Fingerprint", "Pegada dixital"),
|
||||
("Copy Fingerprint", "Copiar pegada dixital"),
|
||||
("no fingerprints", "Non hai pegadas dixitais"),
|
||||
("Update", "Actualizar"),
|
||||
("resolution_original_tip", "Resolución orixinal"),
|
||||
("resolution_fit_local_tip", "Axustar á resolución local"),
|
||||
("resolution_custom_tip", "Resolución personalizada"),
|
||||
("Collapse toolbar", "Pregar a barra de ferramentas"),
|
||||
("Accept and Elevate", "Aceptar e elevar"),
|
||||
("accept_and_elevate_btn_tooltip", "Aceptar a conexión e elevar permisos de UAC."),
|
||||
("clipboard_wait_response_timeout_tip", "Esgotouse o tempo de espera pola resposta de copia."),
|
||||
("Incoming connection", "Conexión entrante"),
|
||||
("Outgoing connection", "Conexión saínte"),
|
||||
("Exit", "Saír"),
|
||||
("Open", "Abrir"),
|
||||
("logout_tip", "Tes a certeza de que queres pechar sesión?"),
|
||||
("Service", "Servizo"),
|
||||
("Start", "Iniciar"),
|
||||
("Stop", "Deter"),
|
||||
("exceed_max_devices", "Acadaches o número máximo de dispositivos xestionados."),
|
||||
("Sync with recent sessions", "Sincronizar coas sesións recentes"),
|
||||
("Sort tags", "Ordenar etiquetas"),
|
||||
("Open connection in new tab", "Abrir conexión nunha nova pestana"),
|
||||
("Move tab to new window", "Mover a pestana a unha nova ventá"),
|
||||
("Can not be empty", "Non pode estar baleiro"),
|
||||
("Already exists", "Xa existe"),
|
||||
("Change Password", "Cambiar contrasinal"),
|
||||
("Refresh Password", "Actualizar contrasinal"),
|
||||
("ID", "ID"),
|
||||
("Grid View", "Vista en grade"),
|
||||
("List View", "Vista en lista"),
|
||||
("Select", "Seleccionar"),
|
||||
("Toggle Tags", "Alternar etiquetas"),
|
||||
("pull_ab_failed_tip", "Produciuse un fallo ao actualizar o caderno de enderezos"),
|
||||
("push_ab_failed_tip", "Produciuse un fallo ao sincronizar o caderno de enderezos co servidor"),
|
||||
("synced_peer_readded_tip", "Os dispositivos presentes nas sesións recentes sincronizaranse de novo no caderno de enderezos."),
|
||||
("Change Color", "Cambiar cor"),
|
||||
("Primary Color", "Cor primaria"),
|
||||
("HSV Color", "Cor HSV"),
|
||||
("Installation Successful!", "Instalación correcta!"),
|
||||
("Installation failed!", "A instalación fallou!"),
|
||||
("Reverse mouse wheel", "Inverter a roda do rato"),
|
||||
("{} sessions", "{} sesións"),
|
||||
("scam_title", "Poderías estar a sufrir unha ESTAFA!"),
|
||||
("scam_text1", "Se estás ao teléfono con alguén que NON coñeces E no que NON confías que che pediu que uses RustDesk e inicies o servizo, non continúes e colga inmediatamente."),
|
||||
("scam_text2", "É probábel que sexa un estafador que tenta roubar os teus cartos ou outra información privada."),
|
||||
("Don't show again", "Non amosar de novo"),
|
||||
("I Agree", "Estou de acordo"),
|
||||
("Decline", "Rexeitar"),
|
||||
("Timeout in minutes", "Tempo límite en minutos"),
|
||||
("auto_disconnect_option_tip", "Pechar automaticamente as sesións entrantes por inactividade do usuario"),
|
||||
("Connection failed due to inactivity", "Desconectouse automaticamente por inactividade"),
|
||||
("Check for software update on startup", "Comprobar se hai actualizacións de software ao arrancar"),
|
||||
("upgrade_rustdesk_server_pro_to_{}_tip", "Por favor, anova RustDesk Server Pro á versión {} ou máis recente!"),
|
||||
("pull_group_failed_tip", "Produciuse un fallo ao actualizar o grupo"),
|
||||
("Filter by intersection", "Filtrar por intersección"),
|
||||
("Remove wallpaper during incoming sessions", "Retirar o fondo de escritorio durante as sesións entrantes"),
|
||||
("Test", "Proba"),
|
||||
("display_is_plugged_out_msg", "Desconectouse a pantalla, cambiando á primeira pantalla."),
|
||||
("No displays", "Non hai pantallas"),
|
||||
("Open in new window", "Abrir nunha nova ventá"),
|
||||
("Show displays as individual windows", "Amosar pantallas como ventás individuais"),
|
||||
("Use all my displays for the remote session", "Usar todas as miñas pantallas para a sesión remota"),
|
||||
("selinux_tip", "SELinux está activado no teu dispositivo, o que podería impedir que RustDesk funcione axeitadamente como lado controlado."),
|
||||
("Change view", "Cambiar vista"),
|
||||
("Big tiles", "Mosaicos grandes"),
|
||||
("Small tiles", "Mosaicos pequenos"),
|
||||
("List", "Lista"),
|
||||
("Virtual display", "Pantalla virtual"),
|
||||
("Plug out all", "Desconectar todo"),
|
||||
("True color (4:4:4)", "Cor verdadeira (4:4:4)"),
|
||||
("Enable blocking user input", "Activar bloqueo de entrada do usuario"),
|
||||
("id_input_tip", "Podes introducir un ID, unha IP directa ou un dominio cun porto (<dominio>:<porto>).\nSe queres acceder a un dispositivo noutro servidor, engade o enderezo do servidor (<id>@<enderezo_servidor>?key=<valor_chave>), por exemplo:\n9123456234@192.168.16.1:21117?key=5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=.\nSe queres acceder a un dispositivo nun servidor público, introduce «<id>@public»; a chave non é precisa para o servidor público.\n\nSe queres forzar o uso dunha conexión por retransmisión no primeiro intento, engade «/r» ao final do ID, por exemplo: «9123456234/r»."),
|
||||
("privacy_mode_impl_mag_tip", "Modo 1"),
|
||||
("privacy_mode_impl_virtual_display_tip", "Modo 2"),
|
||||
("Enter privacy mode", "Entrar en modo de privacidade"),
|
||||
("Exit privacy mode", "Saír do modo de privacidade"),
|
||||
("idd_not_support_under_win10_2004_tip", "O controlador de pantalla indirecta non é admitido. Requírese Windows 10, versión 2004 ou posterior."),
|
||||
("input_source_1_tip", "Fonte de entrada 1"),
|
||||
("input_source_2_tip", "Fonte de entrada 2"),
|
||||
("Swap control-command key", "Intercambiar teclas Control e Command"),
|
||||
("swap-left-right-mouse", "Intercambiar botóns esquerdo e dereito do rato"),
|
||||
("2FA code", "Código 2FA"),
|
||||
("More", "Máis"),
|
||||
("enable-2fa-title", "Activar a autenticación de dous factores"),
|
||||
("enable-2fa-desc", "Por favor, configura o teu autenticador agora. Podes usar un aplicativo de autenticación como Authy, Microsoft Authenticator ou Google Authenticator no teu teléfono ou computador.\n\nEscanea o código QR co teu aplicativo e introduce o código que este amose para activar a autenticación de dous factores."),
|
||||
("wrong-2fa-code", "Non se puido verificar o código. Comproba que o código e os axustes da hora local sexan correctos"),
|
||||
("enter-2fa-title", "Autenticación de dous factores"),
|
||||
("Email verification code must be 6 characters.", "O código de verificación por correo electrónico debe ter 6 caracteres."),
|
||||
("2FA code must be 6 digits.", "O código 2FA debe ter 6 díxitos."),
|
||||
("Multiple Windows sessions found", "Atopáronse múltiples sesións de Windows"),
|
||||
("Please select the session you want to connect to", "Por favor, selecciona a sesión á que te queres conectar"),
|
||||
("powered_by_me", "Desenvolvido con RustDesk"),
|
||||
("outgoing_only_desk_tip", "Esta é unha edición personalizada.\nPodes conectarte a outros dispositivos, mais outros dispositivos non poden conectarse ao teu."),
|
||||
("preset_password_warning", "Esta edición personalizada inclúe un contrasinal predefinido. Calquera que coñeza este contrasinal poderá obter o control total do teu dispositivo. Se non agardabas isto, desinstala o software de inmediato."),
|
||||
("Security Alert", "Alerta de seguranza"),
|
||||
("My address book", "O meu caderno de enderezos"),
|
||||
("Personal", "Persoal"),
|
||||
("Owner", "Propietario"),
|
||||
("Set shared password", "Establecer contrasinal compartido"),
|
||||
("Exist in", "Existe en"),
|
||||
("Read-only", "Só lectura"),
|
||||
("Read/Write", "Lectura/Escrita"),
|
||||
("Full Control", "Control total"),
|
||||
("share_warning_tip", "Os campos superiores son compartidos e visíbeis para outros."),
|
||||
("Everyone", "Todos"),
|
||||
("ab_web_console_tip", "Máis información na consola web"),
|
||||
("allow-only-conn-window-open-tip", "Só permitir a conexión se a ventá de RustDesk está aberta"),
|
||||
("no_need_privacy_mode_no_physical_displays_tip", "Non hai pantallas físicas, non fai falta usar o modo de privacidade."),
|
||||
("Follow remote cursor", "Seguir o cursor remoto"),
|
||||
("Follow remote window focus", "Seguir o foco da ventá remota"),
|
||||
("default_proxy_tip", "O protocolo e porto predeterminados son Socks5 e 1080"),
|
||||
("no_audio_input_device_tip", "Non se atopou ningún dispositivo de entrada de audio."),
|
||||
("Incoming", "Entrante"),
|
||||
("Outgoing", "Saínte"),
|
||||
("Clear Wayland screen selection", "Limpar selección de pantalla de Wayland"),
|
||||
("clear_Wayland_screen_selection_tip", "Tras limpar a selección de pantalla, podes seleccionar de novo a pantalla que queres compartir."),
|
||||
("confirm_clear_Wayland_screen_selection_tip", "Tes a certeza de que queres limpar a selección de pantalla de Wayland?"),
|
||||
("android_new_voice_call_tip", "Recibiuse unha nova solicitude de chamada de voz. Se aceptas, o audio cambiará a comunicación por voz."),
|
||||
("texture_render_tip", "Empregar a renderización de texturas para facer as imaxes máis suaves. Podes tentar desactivar esta opción se atopas problemas de renderización."),
|
||||
("Use texture rendering", "Usar renderización de texturas"),
|
||||
("Floating window", "Ventá flotante"),
|
||||
("floating_window_tip", "Axuda a manter o servizo de RustDesk en segundo plano"),
|
||||
("Keep screen on", "Manter a pantalla acesa"),
|
||||
("Never", "Nunca"),
|
||||
("During controlled", "Mentres está controlado"),
|
||||
("During service is on", "Mentres o servizo estea activo"),
|
||||
("Capture screen using DirectX", "Capturar pantalla usando DirectX"),
|
||||
("Back", "Atrás"),
|
||||
("Apps", "Aplicativos"),
|
||||
("Volume up", "Subir volume"),
|
||||
("Volume down", "Baixar volume"),
|
||||
("Power", "Enerxía"),
|
||||
("Telegram bot", "Bot de Telegram"),
|
||||
("enable-bot-tip", "Se activas esta función, poderás recibir o código 2FA desde o teu bot. Tamén pode funcionar como notificación de conexión."),
|
||||
("enable-bot-desc", "1. Abre unha conversa con @BotFather.\n2. Envía a orde «/newbot». Recibirás un token tras completar este paso.\n3. Inicia unha conversa co teu bot acabado de crear. Envía unha mensaxe que comece cunha barra inclinada («/») como «/hello» para activalo.\n"),
|
||||
("cancel-2fa-confirm-tip", "Tes a certeza de que queres cancelar o 2FA?"),
|
||||
("cancel-bot-confirm-tip", "Tes a certeza de que queres cancelar o bot de Telegram?"),
|
||||
("About RustDesk", "Sobre RustDesk"),
|
||||
("Send clipboard keystrokes", "Enviar pulsacións de teclas do portapapeis"),
|
||||
("network_error_tip", "Por favor, comproba a túa conexión de rede e despois preme en tentar de novo."),
|
||||
("Unlock with PIN", "Desbloquear con PIN"),
|
||||
("Requires at least {} characters", "Require polo menos {} caracteres"),
|
||||
("Wrong PIN", "PIN incorrecto"),
|
||||
("Set PIN", "Establecer PIN"),
|
||||
("Enable trusted devices", "Activar dispositivos de confianza"),
|
||||
("Manage trusted devices", "Xestionar dispositivos de confianza"),
|
||||
("Platform", "Plataforma"),
|
||||
("Days remaining", "Días restantes"),
|
||||
("enable-trusted-devices-tip", "Omitir a verificación 2FA en dispositivos de confianza"),
|
||||
("Parent directory", "Directorio pai"),
|
||||
("Resume", "Continuar"),
|
||||
("Invalid file name", "Nome de ficheiro non válido"),
|
||||
("one-way-file-transfer-tip", "A transferencia unidireccional de ficheiros está activada no lado controlado."),
|
||||
("Authentication Required", "Requírese autenticación"),
|
||||
("Authenticate", "Autenticar"),
|
||||
("web_id_input_tip", "Podes introducir un ID no mesmo servidor; o acceso directo por IP non é admitido no cliente web.\nSe queres acceder a un dispositivo noutro servidor, engade o enderezo do servidor (<id>@<enderezo_servidor>?key=<valor_chave>), por exemplo:\n9123456234@192.168.16.1:21117?key=5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM=.\nSe queres acceder a un dispositivo nun servidor público, introduce «<id>@public»; a chave non é precisa para o servidor público."),
|
||||
("Download", "Descargar"),
|
||||
("Upload folder", "Subir cartafol"),
|
||||
("Upload files", "Subir ficheiros"),
|
||||
("Clipboard is synchronized", "O portapapeis está sincronizado"),
|
||||
("Update client clipboard", "Actualizar o portapapeis do cliente"),
|
||||
("Untagged", "Sen etiquetar"),
|
||||
("new-version-of-{}-tip", "Hai unha nova versión dispoñíbel de {}"),
|
||||
("Accessible devices", "Dispositivos accesíbeis"),
|
||||
("upgrade_remote_rustdesk_client_to_{}_tip", "Por favor, anova o cliente de RustDesk á versión {} ou máis recente no lado remoto!"),
|
||||
("d3d_render_tip", "Cando se activa a renderización D3D, a pantalla de control remoto pode quedar en negro nalgúns equipos."),
|
||||
("Use D3D rendering", "Usar renderización D3D"),
|
||||
("Printer", "Impresora"),
|
||||
("printer-os-requirement-tip", "A función de saída de impresora require Windows 10 ou superior."),
|
||||
("printer-requires-installed-{}-client-tip", "Para usar a impresión remota, cómpre instalar {} neste dispositivo."),
|
||||
("printer-{}-not-installed-tip", "A impresora {} non está instalada."),
|
||||
("printer-{}-ready-tip", "A impresora {} está instalada e lista para usar."),
|
||||
("Install {} Printer", "Instalar a impresora {}"),
|
||||
("Outgoing Print Jobs", "Traballos de impresión saíntes"),
|
||||
("Incoming Print Jobs", "Traballos de impresión entrantes"),
|
||||
("Incoming Print Job", "Traballo de impresión entrante"),
|
||||
("use-the-default-printer-tip", "Usar a impresora predeterminada"),
|
||||
("use-the-selected-printer-tip", "Usar a impresora seleccionada"),
|
||||
("auto-print-tip", "Imprimir automaticamente usando a impresora seleccionada."),
|
||||
("print-incoming-job-confirm-tip", "Recibiches un traballo de impresión desde o equipo remoto. Queres executalo no teu equipo?"),
|
||||
("remote-printing-disallowed-tile-tip", "Impresión remota non permitida"),
|
||||
("remote-printing-disallowed-text-tip", "Os axustes de permisos do lado controlado denegan a impresión remota."),
|
||||
("save-settings-tip", "Gardar axustes"),
|
||||
("dont-show-again-tip", "Non amosar isto de novo"),
|
||||
("Take screenshot", "Facer captura de pantalla"),
|
||||
("Taking screenshot", "Facendo captura de pantalla"),
|
||||
("screenshot-merged-screen-not-supported-tip", "A combinación de capturas de pantalla de múltiples pantallas non é admitida actualmente. Por favor, cambia a unha soa pantalla e téntao de novo."),
|
||||
("screenshot-action-tip", "Por favor, selecciona como continuar coa captura de pantalla."),
|
||||
("Save as", "Gardar como"),
|
||||
("Export", "Exportar"),
|
||||
("Export Logs", "Exportar rexistros"),
|
||||
("Import Folder", "Importar cartafol"),
|
||||
("Copy to clipboard", "Copiar no portapapeis"),
|
||||
("Enable remote printer", "Activar impresora remota"),
|
||||
("Downloading {}", "Descargando {}"),
|
||||
("{} Update", "Actualización de {}"),
|
||||
("{}-to-update-tip", "{} pecharase agora e instalará a nova versión."),
|
||||
("download-new-version-failed-tip", "Produciuse un fallo na descarga. Podes tentalo de novo ou premer o botón «Descargar» para descargar desde a páxina de lanzamentos e anovar manualmente."),
|
||||
("Auto update", "Actualización automática"),
|
||||
("update-failed-check-msi-tip", "Produciuse un fallo na comprobación do método de instalación. Por favor, preme o botón «Descargar» para descargar desde a páxina de lanzamentos e anovar manualmente."),
|
||||
("websocket_tip", "Ao usar WebSocket, só se admiten conexións por retransmisión."),
|
||||
("Use WebSocket", "Usar WebSocket"),
|
||||
("Trackpad speed", "Velocidade do panel táctil"),
|
||||
("Default trackpad speed", "Velocidade predeterminada do panel táctil"),
|
||||
("Numeric one-time password", "Contrasinal numérico dun só uso"),
|
||||
("Enable IPv6 P2P connection", "Activar conexión P2P por IPv6"),
|
||||
("Enable UDP hole punching", "Activar perforación de portos UDP"),
|
||||
("View camera", "Ver cámara"),
|
||||
("Enable camera", "Activar cámara"),
|
||||
("No cameras", "Non hai cámaras"),
|
||||
("view_camera_unsupported_tip", "O dispositivo remoto non admite ver a cámara."),
|
||||
("Terminal", "Terminal"),
|
||||
("Enable terminal", "Activar terminal"),
|
||||
("New tab", "Nova pestana"),
|
||||
("Keep terminal sessions on disconnect", "Manter as sesións de terminal ao desconectar"),
|
||||
("Terminal (Run as administrator)", "Terminal (executar como administrador)"),
|
||||
("terminal-admin-login-tip", "Por favor, introduce o nome de usuario e contrasinal de administrador do lado controlado."),
|
||||
("Failed to get user token.", "Produciuse un fallo ao obter o token de usuario."),
|
||||
("Incorrect username or password.", "Nome de usuario ou contrasinal incorrectos."),
|
||||
("The user is not an administrator.", "O usuario non é administrador."),
|
||||
("Failed to check if the user is an administrator.", "Produciuse un fallo ao comprobar se o usuario é administrador."),
|
||||
("Supported only in the installed version.", "Só é admitido na versión instalada."),
|
||||
("elevation_username_tip", "Introduce nome de usuario ou dominio\\usuario"),
|
||||
("Preparing for installation ...", "Preparando para a instalación..."),
|
||||
("Show my cursor", "Amosar o meu cursor"),
|
||||
("Scale custom", "Escala personalizada"),
|
||||
("Custom scale slider", "Control desprazábel de escala personalizada"),
|
||||
("Decrease", "Diminuír"),
|
||||
("Increase", "Aumentar"),
|
||||
("Show virtual mouse", "Amosar rato virtual"),
|
||||
("Virtual mouse size", "Tamaño do rato virtual"),
|
||||
("Small", "Pequeno"),
|
||||
("Large", "Grande"),
|
||||
("Show virtual joystick", "Amosar mando virtual"),
|
||||
("Edit note", "Editar nota"),
|
||||
("Alias", "Alias"),
|
||||
("ScrollEdge", "Bordo de desprazamento"),
|
||||
("Allow insecure TLS fallback", "Permitir retroceso inseguro a TLS"),
|
||||
("allow-insecure-tls-fallback-tip", "De maneira predeterminada, RustDesk verifica o certificado do servidor para os protocolos que usan TLS.\nCon esta opción activada, RustDesk omitirá o paso de verificación e continuará en caso de fallo de verificación."),
|
||||
("Disable UDP", "Desactivar UDP"),
|
||||
("disable-udp-tip", "Controla se usar só TCP.\nCando esta opción estea activada, RustDesk xa non usará o porto UDP 21116; no seu lugar usarase o porto TCP 21116."),
|
||||
("server-oss-not-support-tip", "NOTA: O servidor de código aberto (OSS) de RustDesk non inclúe esta funcionalidade."),
|
||||
("input note here", "escribe a nota aquí"),
|
||||
("note-at-conn-end-tip", "Pedir unha nota ao rematar a conexión"),
|
||||
("Show terminal extra keys", "Amosar teclas adicionais do terminal"),
|
||||
("Relative mouse mode", "Modo de rato relativo"),
|
||||
("rel-mouse-not-supported-peer-tip", "O modo de rato relativo non é admitido polo par conectado."),
|
||||
("rel-mouse-not-ready-tip", "O modo de rato relativo aínda non está listo. Por favor, téntao de novo."),
|
||||
("rel-mouse-lock-failed-tip", "Produciuse un fallo ao bloquear o cursor. Desactivouse o modo de rato relativo."),
|
||||
("rel-mouse-exit-{}-tip", "Preme {} para saír."),
|
||||
("rel-mouse-permission-lost-tip", "Revogouse o permiso de teclado. Desactivouse o modo de rato relativo."),
|
||||
("Changelog", "Rexistro de cambios"),
|
||||
("keep-awake-during-outgoing-sessions-label", "Manter a pantalla acesa durante as sesións saíntes"),
|
||||
("keep-awake-during-incoming-sessions-label", "Manter a pantalla acesa durante as sesións entrantes"),
|
||||
("Continue with {}", "Continuar con {}"),
|
||||
("Display Name", "Nome para amosar"),
|
||||
("password-hidden-tip", "O contrasinal permanente está configurado (agochado)."),
|
||||
("preset-password-in-use-tip", "O contrasinal predefinido está actualmente en uso."),
|
||||
("Enable privacy mode", "Activar modo de privacidade"),
|
||||
("allow-remote-toolbar-docking-any-edge", "Permitir ancorar a barra de ferramentas remota en calquera bordo da ventá"),
|
||||
("API Token", "Token da API"),
|
||||
("Deploy", "Despregar"),
|
||||
("Custom ID (optional)", "ID personalizado (opcional)"),
|
||||
("server_requires_deployment_tip", "O servidor require que este dispositivo sexa despregado explicitamente. Despregar agora?"),
|
||||
("The server does not require explicit deployment.", "O servidor non require despregamento explícito."),
|
||||
("Unknown response.", "Resposta descoñecida."),
|
||||
("wayland-keyboard-input-disabled-tip", "Permitir entrada de teclado?"),
|
||||
("wayland-keyboard-input-consent-tip", "O que escribas neste computador remoto (incluídos os contrasinais) podería ser lido por outros aplicativos nel."),
|
||||
("wayland-keyboard-input-applies-to-tip", "Esta opción aplícase a:"),
|
||||
("wayland-soft-keyboard-input-label", "Entrada de teclado en pantalla"),
|
||||
("wayland-keyboard-input-reset-choice-tip", "Restablecer opción de entrada de teclado"),
|
||||
("remember-wayland-keyboard-choice-tip", "Non preguntar de novo para este computador remoto"),
|
||||
("Why this happens", "Por que acontece isto?"),
|
||||
("Switch display", "Cambiar de pantalla"),
|
||||
("Show monitor switch button on the main toolbar", "Amosar o botón de cambio de monitor na barra de ferramentas principal"),
|
||||
("Show on the minimized toolbar", "Amosar na barra de ferramentas minimizada"),
|
||||
("All monitors", "Todos os monitores"),
|
||||
("#{} monitor", "Monitor #{}"),
|
||||
("conn-e2ee-unavailable-tip", "Non se puido verificar o cifrado de extremo a extremo.\nO dispositivo remoto aínda se pode estar a configurar. Téntao máis tarde.\nSe isto segue a ocorrer, é posíbel que o servidor non sexa de confianza.\nQueres continuar de todos os xeitos?"),
|
||||
("ID whitelisting", "Lista branca de ID"),
|
||||
("Use ID whitelisting", "Usar lista branca de ID"),
|
||||
("id_whitelist_tip", "Só os ID da lista branca poden acceder a min"),
|
||||
("id_whitelist_wildcard_tip", "Admítense caracteres comodín: '*' coincide con calquera número de caracteres, '?' coincide exactamente cun carácter"),
|
||||
("Invalid ID", "ID non válido"),
|
||||
("Your ID is blocked by the peer", "O teu ID está bloqueado polo par"),
|
||||
("Your ip is blocked by the peer", "A túa IP está bloqueada polo par"),
|
||||
("id_whitelist_caveat_tip", "O ID é comunicado polo cliente que se conecta. Esta lista branca reduce a exposición e non substitúe o contrasinal nin o 2FA."),
|
||||
("whitelist_cidr_tip", "Admítese a notación CIDR, por exemplo: 192.168.1.0/24"),
|
||||
("Continue", "Continuar"),
|
||||
("Browser didn't open? Use the url below to sign in.", "Non se abriu o navegador? Usa o URL de abaixo para iniciar sesión."),
|
||||
("Lock canvas", "Bloquear lenzo"),
|
||||
("Sync clipboard between sessions", "Sincronizar o portapapeis entre sesións"),
|
||||
("sync-clipboard-between-sessions-tip", "O texto ou as imaxes copiadas nunha sesión remota tamén se envían ao portapapeis das túas outras sesións conectadas."),
|
||||
("terminal-clipboard-write-tip", "Un aplicativo no terminal quere copiar texto no portapapeis deste dispositivo. Se se concede, este permiso aplicarase aos aplicativos de terminal en todas as conexións ata que o desactives en Axustes. O copiar e pegar manual non se ven afectados."),
|
||||
("Allow terminal apps to copy to clipboard", "Permitir que os aplicativos de terminal copien no portapapeis"),
|
||||
("Enable", "Activar"),
|
||||
("Reuse one connection for port forwarding", "Reutilizar unha conexión para o reenvío de portos"),
|
||||
("port-forward-mux-tip", "Canalizar todas as conexións dun mapeo de reenvío de portos a través dunha única conexión co par, en lugar de conectar e iniciar sesión de novo para cada unha."),
|
||||
("Enable WebRTC P2P connection", "Activar conexión P2P por WebRTC"),
|
||||
("Enable TCP hole punching", "Activar perforación de portos TCP"),
|
||||
("The screen sharing request was declined on the remote device", "A solicitude de compartir pantalla foi rexeitada no dispositivo remoto"),
|
||||
("The screen sharing request timed out on the remote device", "A solicitude de compartir pantalla esgotou o tempo no dispositivo remoto"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk non pode acceder á sesión de escritorio do dispositivo remoto, comprobe que hai unha sesión en marcha e que RustDesk pode usala"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "Ao portal de escritorio do dispositivo remoto fáltalle unha funcionalidade necesaria para compartir a pantalla ou para o control remoto, pode que non teña instalada a súa implementación"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "Aprobouse compartir a pantalla no dispositivo remoto, pero non se puido abrir a conexión PipeWire"),
|
||||
("The screen sharing request ended without completing on the remote device", "A solicitude de compartir pantalla no dispositivo remoto rematou sen completarse"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk non puido obter unha pantalla utilizable do XDG Desktop Portal, a biblioteca PipeWire pode ser demasiado antiga"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk non puido cargar un compoñente de GStreamer necesario para capturar a pantalla ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
@@ -659,9 +659,9 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("screenshot-merged-screen-not-supported-tip", "મર્જ કરેલ સ્ક્રીનશોટ સપોર્ટેડ નથી."),
|
||||
("screenshot-action-tip", "સ્ક્રીનશોટ પછીની ક્રિયા"),
|
||||
("Save as", "તરીકે સાચવો"),
|
||||
("Export", ""),
|
||||
("Export Logs", ""),
|
||||
("Import Folder", ""),
|
||||
("Export", "એક્સપોર્ટ કરો"),
|
||||
("Export Logs", "લોગ એક્સપોર્ટ કરો"),
|
||||
("Import Folder", "ફોલ્ડર ઇમ્પોર્ટ કરો"),
|
||||
("Copy to clipboard", "ક્લિપબોર્ડમાં કોપી કરો"),
|
||||
("Enable remote printer", "રિમોટ પ્રિન્ટર સક્ષમ કરો"),
|
||||
("Downloading {}", "{} ડાઉનલોડ થઈ રહ્યું છે"),
|
||||
@@ -766,5 +766,17 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("terminal-clipboard-write-tip", ""),
|
||||
("Allow terminal apps to copy to clipboard", ""),
|
||||
("Enable", "સક્ષમ કરો"),
|
||||
("Reuse one connection for port forwarding", "પોર્ટ ફોરવર્ડિંગ માટે એક જ કનેક્શન ફરી વાપરો"),
|
||||
("port-forward-mux-tip", "એક પોર્ટ ફોરવર્ડિંગનાં બધાં કનેક્શન સામેના કમ્પ્યુટર સાથેના એક જ કનેક્શન મારફતે જાય છે, દરેક માટે ફરીથી કનેક્ટ અને લોગિન કરવાને બદલે."),
|
||||
("Enable WebRTC P2P connection", "WebRTC P2P કનેક્શન સક્ષમ કરો"),
|
||||
("Enable TCP hole punching", "TCP હોલ પંચિંગ સક્ષમ કરો"),
|
||||
("The screen sharing request was declined on the remote device", "રિમોટ ઉપકરણ પર સ્ક્રીન શેરિંગ વિનંતી નકારવામાં આવી"),
|
||||
("The screen sharing request timed out on the remote device", "રિમોટ ઉપકરણ પર સ્ક્રીન શેરિંગ વિનંતીનો સમય સમાપ્ત થયો"),
|
||||
("RustDesk cannot reach the desktop session on the remote device, check that a desktop session is running and that RustDesk can use it", "RustDesk રિમોટ ઉપકરણના ડેસ્કટોપ સત્ર સુધી પહોંચી શકતું નથી, ખાતરી કરો કે ડેસ્કટોપ સત્ર ચાલુ છે અને RustDesk તેનો ઉપયોગ કરી શકે છે"),
|
||||
("The desktop portal on the remote device is missing a capability needed for screen sharing or remote control, its backend may not be installed", "રિમોટ ઉપકરણ પરના ડેસ્કટોપ પોર્ટલમાં સ્ક્રીન શેરિંગ અથવા રિમોટ કંટ્રોલ માટે જરૂરી ક્ષમતા નથી, તેનું બેકએન્ડ કદાચ ઇન્સ્ટોલ કરેલું નથી"),
|
||||
("Screen sharing was approved on the remote device, but the PipeWire connection could not be opened", "રિમોટ ઉપકરણ પર સ્ક્રીન શેરિંગ મંજૂર થયું, પરંતુ PipeWire કનેક્શન ખોલી શકાયું નહીં"),
|
||||
("The screen sharing request ended without completing on the remote device", "રિમોટ ઉપકરણ પર સ્ક્રીન શેરિંગ વિનંતી પૂર્ણ થયા વિના સમાપ્ત થઈ"),
|
||||
("RustDesk could not obtain a usable screen from the XDG Desktop Portal, the PipeWire library may be too old", "RustDesk XDG Desktop Portal પાસેથી ઉપયોગી સ્ક્રીન મેળવી શક્યું નથી, PipeWire લાઇબ્રેરી કદાચ ઘણી જૂની છે"),
|
||||
("RustDesk could not load a GStreamer component needed for screen capture ({})", "RustDesk સ્ક્રીન કૅપ્ચર માટે જરૂરી GStreamer ઘટક લોડ કરી શક્યું નથી ({})"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user