Any session that reactivates (Deactivate All → re-activate) loses bulk
decompression and dies right after. Windows consoles reactivate right
after logon, and compression is on by default, so this hits pretty
easily.
The reactivation path rebuilt the FastPath processor with
[`bulk_decompressor:
None`](https://github.com/Devolutions/IronRDP/blob/079b4842/crates/ironrdp-client/src/rdp.rs#L988).
After that every compressed update got parsed as a raw bitmap:
```
Received compressed FastPath data but no decompressor is configured
BitmapData decode NotEnoughBytes: received 1662, expected 17134
```
Fix: `ActiveStage` keeps the negotiated compression type and gets a
`reactivate(...)` that rebuilds the processor *with* a fresh
decompressor. Native client, web, FFI and the e2e test all go through it
now instead of hand-building a processor. The FFI one was the same bug —
worth noting since RDM hits that path.
All additive, no API break (`compression_type` was already on
`ActiveStageBuilder`).
### Testing
Hyper-V console on my lab box, default config (K64), before/after —
first frame then dead vs. a session that keeps rendering. Compression
ratio was ~24x on the initial paint, so this isn't a rare edge.
Also ran a normal RDP session to a Windows Server VM to be sure nothing
regressed.
`cargo check`/`clippy` clean (session, client, web wasm32, ffi), fmt
clean, testsuite-core 949 + testsuite-extra 21 green.
---------
Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## What
The acceptor already parses the client's GCC `MultiTransportChannelData`
block (MS-RDPBCGR §2.2.1.3.8) into `ClientGccBlocks` during
`BasicSettingsWaitInitial` and then discards it, keeping only the
early-capability flags, core desktop size, and keyboard layout. This
surfaces the client's multitransport (MS-RDPEMT) capability flags on
`AcceptorResult`.
## Why
A server implementing UDP multitransport needs to know whether the
client advertised support (`SOFT_SYNC_TCP_TO_UDP`,
`TRANSPORT_TYPE_UDP_FEC{R,L}`) before deciding whether to send a Server
Initiate Multitransport Request. Today that information is parsed and
thrown away, so there's no way for a downstream server to see it.
## Shape
Purely additive, mirroring the existing `keyboard_layout` (#1397) and
desktop-size (#1373) surfacing of GCC client data the acceptor already
parses:
- new private `multitransport_flags: gcc::MultiTransportFlags` field on
`Acceptor`, captured from `gcc_blocks.multi_transport_channel`;
- new `pub multitransport_flags: gcc::MultiTransportFlags` field on
`AcceptorResult`;
- empty when the client sends no multitransport block;
- carried across a deactivation-reactivation like the sibling fields.
No behavior change — the acceptor just stops discarding a block it
already decodes.
`cargo clippy -p ironrdp-acceptor --all-targets` and `cargo fmt --check`
are clean.
Co-authored-by: Clint Christopher Canada <clint.canada@clubitech.com>
## Summary
After a Deactivate-All, a server may end the session (MS-RDPBCGR
1.3.1.3) instead of reactivating, sending a Set Error Info PDU that
carries the disconnect reason. `ConnectionActivationSequence`'s
Capabilities Exchange step only recognized `ServerDemandActive` (and
skipped `ServerDeactivateAll`), so the Error Info PDU fell through to a
generic "unexpected Share Control PDU" error and the real reason was
lost.
- Handle `ServerSetErrorInfo` in Capabilities Exchange the way
`ConnectionFinalizationSequence` already does: return a `reason` error
carrying the error-info description.
- `ERRINFO_NONE` is informational, so it is skipped (stay in
Capabilities Exchange, await Demand Active) rather than treated as
fatal, matching the finalization sequence.
Found while validating the client against GNOME Remote Desktop (#1446):
grd ends the session right after activation when its backend screencast
session cannot be created (for example a locked desktop), and the client
surfaced only an opaque error at that point.
## Validation
`cargo xtask check fmt`, `lints`, `tests`, `typos`, `locks` all pass.
Two new integration tests in `tests/session/connection_activation.rs`
cover the disconnect-reason path and the benign `ERRINFO_NONE` path.
## Notes
No wire-format or public-API change: this only improves the error
surfaced on an existing failure path.
## Summary
The `ironrdp-agent` Windows named-pipe listener inherited the pipe
namespace's default ACL, so **any local user** could connect to a
running daemon and drive the session — inject input, capture
screenshots, read logs, and trigger NOW remote execution. The Unix
listener already locks its socket to `0o600` (owner-only); this mirrors
that stance on Windows.
## The fix
Build a **protected DACL** (`D:P(A;;GA;;;{user-sid})`) granting
`GENERIC_ALL` only to the current user's SID, and apply it to **every**
`CreateNamedPipeW` instance (both the first in `bind` and the
replacement minted in `accept`) via tokio's
`create_with_security_attributes_raw`. The descriptor is cached on the
`Listener` and reused across instances (the kernel copies it on each
`CreateNamedPipeW`, so it only needs to outlive each synchronous call).
Implementation follows the established windows-FFI style used by sibling
crates (`ironrdp-cliprdr-native`): the `windows` crate (0.62, matching
siblings), RAII guards (`OwnedTokenHandle`, `OwnedSecurityDescriptor`)
for `CloseHandle`/`LocalFree` cleanup, one unsafe op per block with `//
SAFETY:` comments, `.cast::<>()` + `try_from` instead of `as` casts, and
`tracing::warn!` on cleanup failure.
## Why this matters
On shared Windows hosts the `\\.\pipe\` namespace is reachable by every
local user by default. This is the last line of defense against a
different local user taking over a running agent session. It closes the
asymmetry with the Unix path, which already documents the `/tmp`
fallback as world-writable and explicitly sets `0o600`.
## Test coverage
`transport.rs` previously had **zero tests**. Added a Windows-gated
`#[cfg(test)]` smoke test
(`security_descriptor_for_current_user_is_non_null`) that exercises the
full token → SID → SDDL → security-descriptor pipeline for the current
process and asserts a non-null descriptor is produced — the happy path
`Listener::bind` depends on. (Asserting the ACL denies a *different*
user requires a second token context and is out of scope.)
## Verification
All `cargo xtask` CI-equivalent checks pass on a clean tree:
- `cargo xtask check fmt -v` → All good
- `cargo xtask check lints -v` (workspace clippy `--all-targets -D
warnings`) → All good (ironrdp-agent produces zero warnings)
- `cargo test -p ironrdp-agent` → 12 passed; 0 failed (incl. the new
test)
- `cargo xtask check locks -v` → All good
## Files
- `crates/ironrdp-agent/Cargo.toml` — add `windows = "0.62"`
(cfg(windows),
Win32_Foundation/Security/Security_Authorization/System_Threading)
- `crates/ironrdp-agent/src/transport.rs` —
`OwnedTokenHandle`/`OwnedSecurityDescriptor` RAII guards,
`create_server_instance` helper, `Listener` caches + reuses the SD; new
smoke test
- `Cargo.lock` — +1 line registering `windows` as an ironrdp-agent dep
(no new versions; crates already present via siblings)
## Release
This is a `fix(agent):` conventional commit, picked up by release-plz
into the next release cycle (alongside the existing `feat(agent)`
NOW-integration commit) to propose the `0.2.0` bump once merged to
`master`. CHANGELOG is auto-generated — no manual edit needed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Summary
- Integrate the released registry `now-client = "0.1.0"` into
`ironrdp-agent`; no Git, path, patch, or vendored dependency is used.
- Add a per-session `Devolutions::Now::Agent` DVC endpoint with
30-second initial readiness and 10-second reconnect deadlines.
- Add durable NOW operations, IPC streaming/retention, supported CLI
forms (`run`, `powershell`, `pwsh`, `exec process`, `exec batch`), safe
PowerShell defaults, raw output forwarding, and remote exit propagation.
- Add IPC/retention coverage and an adapter regression proving immediate
Run frames are quarantined before a following Process execution.
- Do not modify Gateway or `ironrdp-dvc-pipe-proxy`.
## Validation
- `cargo test -p ironrdp-agent`
- `cargo test -p ironrdp-testsuite-extra --test integration_tests_extra
agent`
- `cargo clippy -p ironrdp-agent --all-targets -- -D warnings`
- `cargo xtask check fmt -v`
- `cargo xtask check tests -v`
- `cargo xtask check locks -v`
`cargo xtask check lints -v` is blocked by a pre-existing `ironrdp-str`
`manual_is_multiple_of` lint under the available Rust 1.90 toolchain.
`cargo xtask check typos -v` cannot run because `typos-cli` is not
installed. Authorized-VM end-to-end validation remains pending access to
the designated RDP/NOW endpoint.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Summary
On the WASM web client, frame **decode** dominates (~93% of frame time
on a 1080p RemoteFX replay), and within decode the **RFX inverse DWT was
~48%** (the YCbCr→RGBA convert is already SIMD via `yuv`; the
entropy/RLE stages are inherently sequential). This vectorizes the
inverse DWT with the portable [`wide`](https://crates.io/crates/wide)
crate (`i16x8`), so the same code lowers to **wasm `simd128`, x86
SSE/AVX, and ARM NEON** — desktop and browser both benefit.
The encode path is unchanged.
## How it stays bit-exact (no `unsafe`, no `cfg` split)
The lifting steps need i32 intermediates only for the averages.
Overflow-free SWAR identities let the whole kernel stay in `i16` lanes
(no widen/narrow):
- `ceil_avg(a,b) = (a|b) - ((a^b)>>1)` ≡ `(a + b + 1) >> 1`
- `floor_avg(a,b) = (a&b) + ((a^b)>>1)` ≡ `(a + b) >> 1`
and `(2x+1)>>1 == x` / `(x+x)>>1 == x` simplify the first/last rows.
Every other op is wrapping `i16` arithmetic, identical to the old
`i32`-intermediate-then-`as i16` truncation.
## Performance
1080p RemoteFX replay, headless Chromium, wasm release `+simd128`,
8-pass median:
| inverse DWT | decode (ms) |
|---|--:|
| scalar (baseline) | ~1598 |
| **portable `wide` SIMD** | **~985** |
→ inverse DWT ~2×, **~39% off the decode stage**. (Absolute ms carry
~±15% machine-load noise; the ratio is stable. Per-frame this is a
throughput win — decode was already within real-time budget.)
## Correctness
Verified bit-exact three ways:
- the replay-bench **framebuffer CRC32** is unchanged,
- the existing **native DWT tests** pass (so it's exact on x86 too, not
just wasm),
- an **exhaustive** check of the SWAR identities over all `i16 × i16`
pairs (0 mismatches).
## Notes
- `wide` is a single-user dep in `ironrdp-graphics`; chosen over
`std::simd` (still nightly-only) and over per-arch intrinsics (one
portable kernel vs three).
- Reproducible bench branches: `bench/draw-*` (renderer) and the DWT
measurements were taken on the replay-bench harness branch (the capture
corpus is gitignored).
Add a `NonEmpty<T>` collection guaranteeing at least one element. The
first element (head) is stored inline, so a single-element `NonEmpty`
performs no heap allocation, and `first()` is infallible while `len()`
returns a `NonZeroUsize`, and callers never branch on an "is it empty?"
case.
Rename prebuilt binary assets to friendly os-arch names (e.g.
ironrdp-agent-<version>-linux-x64.tar.gz), dropping the Rust target
triple from the filename, and make the triple authoritative by passing
--target to cargo so a runner/target mismatch fails loudly instead of
silently mislabeling an asset.
Move the detailed download/verify instructions out of the READMEs and
into the GitHub Release body, generated by the workflow so they can
never drift from the actual assets. The block is injected idempotently
between sentinel markers, so re-running the workflow (the recovery path
for a failed matrix leg) replaces it in place rather than appending. The
READMEs are demoted to short evergreen pointers to the Releases page.
Extract the duplicated native-dependency install steps (Linux ALSA
headers, Windows NASM) into a shared .github/actions/install-build-deps
composite action reused by ci.yml and release-binaries.yml.
Corrects Network Auto-Detect framing and routing to match MS-RDPBCGR by
moving it off the I/O channel slow-path Share Data PDUs and onto the MCS
message channel with the required Basic Security Header
(SEC_AUTODETECT_REQ / SEC_AUTODETECT_RSP). This aligns IronRDP with
mstsc/xfreerdp behavior and enables both connect-time and continuous
auto-detection to actually function.
Removes the last ironrdp-connector coupling from ironrdp-session by
turning Deactivate-All handling into a bare signal and shifting ownership
of the Deactivation-Reactivation activation sequence back to each consumer.
It introduces a ConnectionActivationFactory (fresh sequence per reactivation)
and an ActiveStageBuilder so session construction no longer depends on
ConnectionResult.
Adds a way to run a single RDP connection over a byte stream whose
confidentiality is already provided by the embedder's transport, rather
than having ironrdp-server perform the inner TLS handshake itself when
X.224 selects PROTOCOL_SSL.
Adds an opt-in server/acceptor knob to negotiate the RDP session desktop size using the client’s originally requested resolution (from GCC Client Core Data) so the server can start at the client’s native size without a Deactivation–Reactivation resize round trip.
Co-authored-by: Clint Christopher Canada <clint.canada@clubitech.com>
Makes the ironrdp-tls rustls backend’s crypto provider selectable at compile time by restructuring Cargo features, avoiding forcing a single provider onto downstreams via tokio-rustls default features.
Adds the server-side RDPEUSB (URBDRC) protocol processors to ironrdp-rdpeusb, introduces a backend-facing rdpeusb::io data model shared by client/server, and refactors TS_URB representations to better separate headers from payload variants.
Fixes progressive RemoteFX (MS-RDPEGFX) decoding by no longer requiring a CONTEXT block on every WireToSurface2 progressive frame once a codec context has already been established (keyed by codec_context_id). This aligns the decoder with real-world server behavior and the spec’s “establish once, then reference” model for progressive contexts.
Add a CLI-driven, daemon-backed RDP client designed for programmatic
(e.g. LLM) consumption. A single binary plays two roles: a long-lived
daemon that owns the ironrdp-client engine and one RDP session, and a
short-lived CLI that drives it over a local IPC transport (Unix domain
socket / Windows named pipe).
Highlights:
- Binary, length-delimited IPC protocol using ironrdp-core's
Encode/Decode traits (no JSON). Connection config travels as a
binary-encoded PropertySet inside a strictly-typed Request::Connect;
runtime input/query operations are strictly-typed messages.
- Secrets never reach the IPC reader: ConfigBuilder::build strips every
ironrdp_cfg::is_secret_key property, and the daemon seeds its live bag
from the post-build config, so dumps/status/logs cannot leak them.
- Operator overlay: daemon-start --overlay FILE preloads a .rdp file
applied on top of every connect (overlay wins) to provision any
setting out of band, credentials in particular. Status reports
credentials_loaded so a caller knows whether it must supply a password.
- Separate logging: the daemon's own logs go to stderr (default INFO,
IRONRDP_LOG), while each RDP session's logs are captured into a small
queryable ring buffer (default DEBUG) via a thread-local subscriber,
refinable per-connect with --log-directive for troubleshooting.
- --help-agent prints a structured, LLM-friendly operation guide.
The debug! logging in insert/remove/get stringified raw keys and values
on every access, which exposed secrets such as ClearTextPassword,
gateway_password and rdcleanpath_token in logs. Observed debugging value
was low, so the logging is removed entirely rather than redacted, and
the tracing dependency is dropped.
The error constructor helpers in several crates wrap the #[track_caller]
ironrdp_error::Error::new, but were not themselves marked
#[track_caller]. As a result, the captured location pointed at the
helper body instead of the real call site, giving misleading "@
file:line" info in error reports.
Reorganize and complete the PropertySet-backed configuration flow so the
.rdp PropertySet is the single source of truth, with the CLI layered on
top.
ironrdp-cfg:
- Reorganize PropertySetExt into co-located getter/setter/clearer
triplets, grouped (MS standard keys / IronRDP extensions / multi-key
helpers), alphabetized and documented.
- Add clear_* methods mirroring every setter so callers can remove keys.
ironrdp-client:
- Make ConfigBuilder set/clear symmetric: clearing an option
(compression, kerberos, sound, destination) now removes the mirrored
property instead of leaving a stale value behind.
- Introduce addressing-only TransportKind as builder input; resolve it
into the bundled Transport at build() time, folding in the separately
tracked secrets and erroring on missing gateway/RDCleanPath credentials.
- Add MissingField::RDCleanPathToken and with_rdcleanpath_token
- Enrich docs on TLS/CredSSP/domain/desktop/compression setters.
ironrdp-viewer:
- Replace apply_cli_args_to_properties/PartialConfig with ViewerConfig +
apply_cli_to_builder (CLI overrides the .rdp-derived builder).
- Replace --compression-enabled=<bool> with a plain --no-compression
flag.
- Prompt for RDCleanPath token like gateway credentials; relax the CLI
so --rdcleanpath-url no longer requires --rdcleanpath-token.
- When dumping the .rdp, dump the effective, secret-stripped PropertySet
from the built Config.
The `ClipboardMessage::SendInitiateFileCopy` arm in the clipboard event
handler refers to a `cliprdr` binding and a `session::custom_err!` macro
that are not in scope. The surrounding handler binds the processor as
`cliprdr_client`, and every other arm in the same match uses
`ironrdp_session::custom_err!`. With the `clipboard` feature enabled
this fails to compile:
```
error[E0425]: cannot find value `cliprdr` in this scope
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `session`
```
so master does not build with the clipboard feature on. This aligns the
arm with its siblings.
Verified with `cargo check -p ironrdp-client --features
rustls,clipboard`.
Extends the CLIPRDR backend-facing API to properly support offering clipboard file lists (so later FileContentsRequests can be serviced) by introducing ClipboardMessage::SendInitiateFileCopy(Vec<FileDescriptor>) and wiring it through the in-tree ClipboardMessage dispatchers.
Make ironrdp-client configurable almost entirely from a .rdp PropertySet
so that a single ConfigBuilder::from_property_set overlay can build a
working client, enabling fully reproducible sessions from .rdp files.
Viewer-only settings remain in PartialConfig with special treatment.
- cfg: add ironrdp_ vendor properties for compressionlevel, colordepth,
dvcplugin, tls, serverpointer and autologon.
- client: read compression level, color depth, DVC plugins and kerberos
from the PropertySet; default bulk compression to K64 unless disabled or
specified otherwise.
- client: move anti-idle "fake events" into active_session; consumed via
fake_events_interval, dropping it from the viewer GUI
- viewer: upsert CLI flags into the PropertySet; prune PartialConfig to
CLI-only fields
ironrdp (meta crate):
- Added: client, client-all, client-sound, client-clipboard,
client-rdpdr, client-smartcard, client-gateway,
client-dvc-pipe-proxy, client-dvc-com-plugin, and
top-level rustls / native-tls (forwarded to ironrdp-client)
- Modified: qoi, qoiz now also gate ironrdp-client's codec
ironrdp-client:
- Added: sound, clipboard, rdpdr, smartcard, gateway,
dvc-pipe-proxy, dvc-com-plugin, all; optional
subsystem crates are pulled in only via these features
- Modified: default no longer forces rustls; rustls / native-tls
stay mutually exclusive (exactly one required), and
qoi / qoiz now point at ironrdp-connector / ironrdp-session
ironrdp-viewer:
- Removed: direct ironrdp-client / backend-crate dependencies and
qoi / qoiz features
- Modified: rustls / native-tls now forward to ironrdp instead of
ironrdp-client; pulls client + client-all from the meta crate