mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-20 11:23:14 +03:00
* bump webrtc fork: one IPv6 host candidate per interface and prefix ICE gathered every IPv6 address on every interface. Beside the temporary address that privacy extensions rotate, a prefix usually carries a stable one, often derived from the MAC, that the OS never picks as a source: a host candidate for it hands the peer an identifier that outlives every rotation and that nothing else this machine sends out ever shows. RFC 8445 §5.1.1.1 has the trackable addresses of an interface and prefix left out once a privacy one is gathered. There is no portable way to tell the two apart, so the fork's `local_interfaces` stands in for that rule with a best-effort approximation: of an interface's addresses in one prefix, it asks the OS which one it sends from - a UDP `connect` inside the group's own prefix, nothing sent, nothing outside this machine's own prefixes involved - and if the answer is one of them, keeps that one alone. If the answer is none of them, the whole group is kept, as it was: the probe is bound to no interface, so where Ethernet and Wi-Fi share a LAN the route picks one of them and the answer for the other is an address it does not hold, and the enumeration order would be no better a guess - on macOS its first address is the stable one. Every other interface and prefix keeps its address, a VPN's unique-local one among them. Two static addresses in one prefix keep one, the recorded price of the stand-in; the interface a shared prefix's route bypasses keeps both of its addresses, a gap the stand-in leaves open rather than a regression. The Windows enumeration, which named every adapter "" with no mask, now carries the adapter's name and on-link prefix, without which Ethernet and Wi-Fi on one LAN would have been a single group. That reaches IPv4 too: its addresses carry the adapter's name and mask where they were "" at /32, so the candidates gathered are the same but `interface_filter` sees the real names. hbb_common is untouched: its fe80::/10 filter still applies to what the fork keeps. Two more fork commits ride along, found by the same review. SCTP never reported a DATA chunk received again: `handle_data` asks `can_push` before `push`, and `push` was where a duplicate was noted, so the no-cwnd sender's reordering window, which widens on reported duplicates, never heard of one from another of these endpoints; and the SACK, its gap blocks and now its duplicates unbounded, could outgrow the MTU the DATA chunks keep to under a thousand chunks in flight with holes among them. Duplicates are now listed and SACKed at once (RFC 9260 §6.2), and the SACK reports the lowest gap blocks that fit (§6.7). And the Windows adapter struct, split into nested parts, read `Ipv6IfIndex` eight bytes late on x64 - only into a scope id that `Interface::convert` drops, so nothing gathered wrongly, but the field an interface-bound probe would need; it is flat now, with a compile-time check written for Rust 1.75, the version this crate builds with - `offset_of!` would have wanted 1.77. rustdesk-org/webrtc 80d5a20..49c89bd8, six commits: the heuristic, the fail-open it grew in review, its comments brought in line with that, the SCTP duplicates and SACK bound, the flat Windows adapter struct, and its check made to build on 1.75. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns * pin hbb_common to main 7a5ad52 0eb1759..7a5ad52, six commits: the message cap's tests on WebSocket and WebRTC with the fragmented WebSocket message bounded too (e999dce, f0f1548); hyper_util's debug logs out of the default filters (#608); and `new_direct_udp_for_unverified`, the controller's UDP socket on the resolver's preferred address for the rendezvous server, with a second for the lookup and without the TCP connection `test_target` opens and drops to prove it - while `new_direct_udp_for`, `new_udp_for` and `rebind_udp_for`, which the controlled side's punch reply and its registration live on, keep that proof (f688d41, 0bc8336, 7a5ad52). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns * ipv6 punch: ask the kernel for the route without resolving a name first `test_ipv6` is awaited on the connection path by both sides of a punch, and before it looked for a public IPv6 address in the background it resolved the STUN hosts' names inline - racing the four, so that one resolver that hangs would not decide. It could still: `select_ok` returns the first success or the last failure, so with no resolver answering the probe waits for the slowest lookup to give up, as long as the system resolver takes, once a minute, on the first connection of that minute. The name was never needed. `connect` on a UDP socket sends nothing; it has the kernel pick a route and a source address for the destination, and any global address serves, so the probe now names one - the one libwebrtc's QueryDefaultLocalAddress asks for - and touches no network at all: a bind, a connect, a local_addr. A machine without an IPv6 route learns so from the connect's error, at once, as before. Two smaller things beside it. The minute's gate read the timestamp under one lock and set it under another, so two connections arriving together both found it over and both probed; it is one critical section now. And the background STUN probe, bounded so far by the STUN client's own ten seconds and the resolver's, has a deadline of its own, five seconds: a probe that outlived the minute could write an earlier network's address over a later probe's. Test: the route probe completes within a second, an address found or not. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns * controller: the NAT test takes the resolver's address for the server `new_direct_udp_for` learned which address to send the UDP NAT test to by opening a TCP connection to the rendezvous server and dropping it - a handshake, one round trip, on every connection the controller starts, right before `_start_inner` opens the connection it keeps to the same host. The NAT test now takes the resolver's preferred address, `new_direct_udp_for_unverified`, which spends no round trip proving it and gives its lookup a second: an address the server does not answer on costs this connection its UDP punch, which the TCP punch and the relay cover, as they do whenever the test finds no port. The controlled side's punch reply keeps `new_direct_udp_for` and its proof - a reply sent to such an address is a device online and unreachable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019aokqJuhjvB3kijXtAg5Ns --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
287 lines
11 KiB
TOML
287 lines
11 KiB
TOML
[package]
|
|
name = "rustdesk"
|
|
version = "1.5.0"
|
|
authors = ["rustdesk <info@rustdesk.com>"]
|
|
edition = "2021"
|
|
build= "build.rs"
|
|
description = "RustDesk Remote Desktop"
|
|
default-run = "rustdesk"
|
|
rust-version = "1.75"
|
|
|
|
[lib]
|
|
name = "librustdesk"
|
|
crate-type = ["cdylib", "staticlib", "rlib"]
|
|
|
|
[[bin]]
|
|
name = "naming"
|
|
path = "src/naming.rs"
|
|
|
|
[[bin]]
|
|
name = "service"
|
|
path = "src/service.rs"
|
|
|
|
[features]
|
|
inline = []
|
|
use_samplerate = ["samplerate", "libsamplerate-sys"]
|
|
use_rubato = ["rubato"]
|
|
use_dasp = ["dasp"]
|
|
flutter = ["flutter_rust_bridge"]
|
|
default = ["use_dasp"]
|
|
hwcodec = ["scrap/hwcodec"]
|
|
vram = ["scrap/vram"]
|
|
mediacodec = ["scrap/mediacodec"]
|
|
drm = ["scrap/drm"]
|
|
# The display wake, as its OWN compile gate on top of `drm`. Everything else in the drm backend
|
|
# READS (it captures a scanout); the wake WRITES, injecting one synthetic pointer event from the
|
|
# root service so a compositor that idle-disabled its outputs re-enables them. That is a different
|
|
# kind of operation and deserves a switch that can remove it from the binary entirely, without
|
|
# giving up DRM capture: `--features drm` builds the capture path with no wake code compiled in.
|
|
drm-wake = ["drm"]
|
|
linux-pkg-config = ["magnum-opus/linux-pkg-config", "scrap/linux-pkg-config"]
|
|
unix-file-copy-paste = [
|
|
"dep:x11-clipboard",
|
|
"dep:x11rb",
|
|
"dep:percent-encoding",
|
|
"dep:once_cell",
|
|
"clipboard/unix-file-copy-paste",
|
|
]
|
|
screencapturekit = ["cpal/screencapturekit"]
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
async-trait = "0.1"
|
|
scrap = { path = "libs/scrap", features = ["wayland"] }
|
|
hbb_common = { path = "libs/hbb_common", features = ["webrtc"] }
|
|
base = { path = "libs/base" }
|
|
serde_derive = "1.0"
|
|
serde = "1.0"
|
|
serde_json = "1.0"
|
|
serde_repr = "0.1"
|
|
cfg-if = "1.0"
|
|
lazy_static = "1.4"
|
|
sha2 = "0.10"
|
|
repng = "0.2"
|
|
zstd = "0.13"
|
|
parity-tokio-ipc = { git = "https://github.com/rustdesk-org/parity-tokio-ipc" }
|
|
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"] }
|
|
default-net = "0.14"
|
|
wol-rs = "1.0"
|
|
flutter_rust_bridge = { version = "=1.80", features = ["uuid"], optional = true}
|
|
errno = "0.3"
|
|
rdev = { git = "https://github.com/rustdesk-org/rdev" }
|
|
url = { version = "2.3", features = ["serde"] }
|
|
crossbeam-queue = "0.3"
|
|
hex = "0.4"
|
|
chrono = "0.4"
|
|
cidr-utils = "0.5"
|
|
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", 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]
|
|
# https://github.com/rustdesk/rustdesk/discussions/10197, not use cpal on linux
|
|
cpal = { git = "https://github.com/rustdesk-org/cpal", branch = "osx-screencapturekit" }
|
|
ringbuf = "0.3"
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
|
mac_address = "1.1"
|
|
sciter-rs = { git = "https://github.com/rustdesk-org/rust-sciter", branch = "dyn" }
|
|
sys-locale = "0.3"
|
|
enigo = { path = "libs/enigo", features = [ "with_serde" ] }
|
|
clipboard = { path = "libs/clipboard" }
|
|
ctrlc = "3.2"
|
|
# arboard = { version = "3.4", features = ["wayland-data-control"] }
|
|
arboard = { git = "https://github.com/rustdesk-org/arboard", features = ["wayland-data-control"] }
|
|
clipboard-master = { git = "https://github.com/rustdesk-org/clipboard-master" }
|
|
portable-pty = { git = "https://github.com/rustdesk-org/wezterm", branch = "rustdesk/pty_based_0.8.1", package = "portable-pty" }
|
|
|
|
system_shutdown = "4.0"
|
|
qrcode-generator = "4.1"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
winapi = { version = "0.3", features = [
|
|
"winuser",
|
|
"wincrypt",
|
|
"shellscalingapi",
|
|
"pdh",
|
|
"synchapi",
|
|
"memoryapi",
|
|
"shellapi",
|
|
"devguid",
|
|
"setupapi",
|
|
"cguid",
|
|
"cfgmgr32",
|
|
"ioapiset",
|
|
"winspool",
|
|
] }
|
|
windows = { version = "0.61", features = [
|
|
"Win32",
|
|
"Win32_Foundation",
|
|
"Win32_Security",
|
|
"Win32_Security_Authorization",
|
|
"Win32_Storage_FileSystem",
|
|
"Win32_System",
|
|
"Win32_System_Com",
|
|
"Win32_System_Diagnostics",
|
|
"Win32_System_Diagnostics_ToolHelp",
|
|
"Win32_System_Environment",
|
|
"Win32_System_IO",
|
|
"Win32_System_Memory",
|
|
"Win32_System_Pipes",
|
|
"Win32_System_Registry",
|
|
"Win32_System_SystemInformation",
|
|
"Win32_System_Threading",
|
|
"Win32_UI_Shell",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|
|
winreg = "0.11"
|
|
windows-service = "0.6"
|
|
virtual_display = { path = "libs/virtual_display" }
|
|
remote_printer = { path = "libs/remote_printer" }
|
|
impersonate_system = { git = "https://github.com/rustdesk-org/impersonate-system" }
|
|
shared_memory = "0.12"
|
|
tauri-winrt-notification = "0.1"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
objc = "0.2"
|
|
cocoa = "0.24"
|
|
dispatch = "0.2"
|
|
core-foundation = "0.9"
|
|
core-graphics = "0.22"
|
|
include_dir = "0.7"
|
|
fruitbasket = "0.10"
|
|
objc_id = "0.1"
|
|
# If we use piet "0.7" here, we must also update core-graphics to "0.24".
|
|
piet = "0.6"
|
|
piet-coregraphics = "0.6"
|
|
foreign-types = "0.3"
|
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
|
|
tray-icon = { git = "https://github.com/tauri-apps/tray-icon", version = "0.21.3" }
|
|
tao = { git = "https://github.com/rustdesk-org/tao", branch = "dev" }
|
|
image = "0.24"
|
|
|
|
[target.'cfg(any(target_os = "macos", target_os = "linux"))'.dependencies]
|
|
keepawake = { git = "https://github.com/rustdesk-org/keepawake-rs" }
|
|
|
|
[target.'cfg(any(target_os = "windows", target_os = "linux"))'.dependencies]
|
|
wallpaper = { git = "https://github.com/rustdesk-org/wallpaper.rs" }
|
|
tiny-skia = "0.11"
|
|
softbuffer = "0.4"
|
|
fontdb = "0.23"
|
|
bytemuck = "1.23"
|
|
ttf-parser = "0.25"
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
libxdo-sys = "0.11"
|
|
psimple = { package = "libpulse-simple-binding", version = "2.27" }
|
|
pulse = { package = "libpulse-binding", version = "2.27" }
|
|
rust-pulsectl = { git = "https://github.com/rustdesk-org/pulsectl" }
|
|
async-process = "1.7"
|
|
evdev = { git="https://github.com/rustdesk-org/evdev" }
|
|
dbus = "0.9"
|
|
dbus-crossroads = "0.5"
|
|
x11-clipboard = {git="https://github.com/clslaid/x11-clipboard", branch = "feat/store-batch", optional = true}
|
|
x11rb = {version = "0.12", features = ["all-extensions"], optional = true}
|
|
percent-encoding = {version = "2.3", optional = true}
|
|
once_cell = {version = "1.18", optional = true}
|
|
nix = { version = "0.29", features = ["term", "process"]}
|
|
gtk = "0.18"
|
|
termios = "0.3"
|
|
terminfo = "0.8"
|
|
winit = "0.30"
|
|
|
|
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
|
openssl = { version = "0.10", features = ["vendored"] }
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
android_logger = "0.13"
|
|
jni = "0.21"
|
|
android-wakelock = { git = "https://github.com/rustdesk-org/android-wakelock" }
|
|
|
|
[workspace]
|
|
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;
|
|
# and names every Windows adapter "" with no mask, so ICE cannot tell one adapter's addresses
|
|
# from another's; and lays the adapter struct out in nested parts, whose padding on x64 shifts
|
|
# every field after OperStatus, Ipv6IfIndex first.
|
|
# webrtc-ice: best effort, one IPv6 host candidate per interface and prefix - the one the OS
|
|
# sends from when that is one of the group's, else all of them - since the stable address beside
|
|
# the temporary one is an identifier that outlives every rotation and that nothing else this
|
|
# machine sends out ever shows.
|
|
# 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. A DATA chunk
|
|
# received again is listed in the SACK, which never happened - the sender widens its reordering
|
|
# window on that - and the SACK keeps to the MTU too, the lowest gap blocks first.
|
|
# Pinned by rev, not branch: a fork branch can be rewritten out from under the lockfile.
|
|
# webrtc: SettingEngine cannot reach the ICE agent's max_binding_requests, which decides how
|
|
# long the answerer keeps checking a pair that has not answered yet.
|
|
webrtc = { git = "https://github.com/rustdesk-org/webrtc", rev = "49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63" }
|
|
webrtc-util = { git = "https://github.com/rustdesk-org/webrtc", rev = "49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63" }
|
|
webrtc-sctp = { git = "https://github.com/rustdesk-org/webrtc", rev = "49c89bd8d30e6e62e4c1a96cee38fdc11f79ef63" }
|
|
|
|
[package.metadata.winres]
|
|
LegalCopyright = "Copyright © 2026 Purslane Tech Pte. Ltd. All rights reserved."
|
|
ProductName = "RustDesk"
|
|
FileDescription = "RustDesk Remote Desktop"
|
|
OriginalFilename = "rustdesk.exe"
|
|
|
|
[target.'cfg(target_os="windows")'.build-dependencies]
|
|
winres = "0.1"
|
|
winapi = { version = "0.3", features = [ "winnt", "pdh", "synchapi" ] }
|
|
|
|
[build-dependencies]
|
|
cc = "1.0"
|
|
hbb_common = { path = "libs/hbb_common" }
|
|
os-version = "0.2"
|
|
|
|
[dev-dependencies]
|
|
hound = "3.5"
|
|
docopt = "1.1"
|
|
tokio = { version = "1.44", features = ["test-util"] }
|
|
|
|
[package.metadata.bundle]
|
|
name = "RustDesk"
|
|
identifier = "com.carriez.rustdesk"
|
|
icon = ["res/32x32.png", "res/128x128.png", "res/128x128@2x.png"]
|
|
osx_minimum_system_version = "10.14"
|
|
|
|
#https://github.com/johnthagen/min-sized-rust
|
|
[profile.release]
|
|
lto = true
|
|
codegen-units = 1
|
|
panic = 'abort'
|
|
strip = true
|
|
#opt-level = 'z' # only have smaller size after strip
|
|
rpath = true
|
|
|
|
[profile.dev]
|
|
debug = 1
|