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>
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.
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.
Fixes a crash when the server sends Auto-Detect Request PDUs during an
active session. After #1176 added ShareDataPdu::AutoDetectReq routing,
these PDUs decode correctly but hit the catch-all error path in the x224
processor: "unhandled PDU: Auto-Detect Request PDU".
- Bump pinned toolchain from 1.88.0 to 1.89.0 in rust-toolchain.toml
- Migrate all workspace crates from edition 2021 to edition 2024
- Run `cargo fix --edition` to auto-migrate source code for edition 2024
compatibility (unsafe in unsafe fn, tail expr drop order, etc.)
- Replace all `expr_2021` macro fragment specifiers with `expr` now that
the workspace is fully on edition 2024
- Remove `keyword_idents_2024` lint (now enforced by the edition itself)
- Remove removed `clippy::string_to_string` lint (covered by
implicit_clone)
- Fix new clippy lints from 1.93.0: `manual_is_multiple_of`,
`useless_let_if_seq`, `manual_map`, `derivable_impls`,
`redundant_imports`, `unused_crate_dependencies` (but didn’t bump MSRV)
- Drop `core::future::Future` unnecessary qualifications (Future is now
in the Rust 2024 prelude)
- Remove direct `bytes` deps from ironrdp-futures and ironrdp-tokio
(re-exported by ironrdp-async)
`decode_io_channel()` assumes all IO channel PDUs begin with
a`ShareControlHeader`. Multitransport Request PDUs use a
`BasicSecurityHeader` with `SEC_TRANSPORT_REQ` instead ([MS-RDPBCGR]
2.2.15.1).
This adds a peek-based dispatch: check the first `u16`
for`TRANSPORT_REQ`, decode as `MultitransportRequestPdu` if set,
otherwise fall through to the existing `decode_share_control()` path
unchanged.
The new variant is propagated through `ProcessorOutput` and
'ActiveStageOutput` so applications can handle multitransport requests.
Client and web consumers log the request (no UDP transport yet).
[MS-RDPBCGR]:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/de783158-8b01-4818-8fb0-62523a5b3490
Add support for configuring `alternate_shell` and `work_dir` fields in
ClientInfoPdu, which are used by:
- CyberArk PSM (Privileged Session Manager) for session tokens
- Remote application scenarios (RemoteApp)
- Custom shell configurations
Changes:
- Add `alternate_shell` and `work_dir` fields to `Config` struct
- Use these fields in `create_client_info_pdu()` instead of hardcoded
empty strings
This enables compatibility with enterprise security solutions like
CyberArk that require alternate_shell for privileged access management.
Add multitransport_flags config option to populate the
MultiTransportChannelData GCC block during connection negotiation.
When None (the default), behavior is unchanged.
- add ironrdp-bulk crate with MPPC/NCRUSH/XCRUSH, bitstream, benches, and metrics
- advertise compression in Client Info and plumb compression_type through connector
- decode compressed FastPath/ShareData updates using BulkCompressor
- update CLI to numeric compression flags (enabled by default, level 0-3)
- extend screenshot example with compression options and negotiated logging
- refresh tests, FFI/web configs, typos, and Cargo.lock
Adds `SendFileContentsResponse` to `ClipboardMessage` enum, enabling
clipboard
backends to signal when file data is ready to send via
`submit_file_contents()`.
This provides the message-based interface pattern used consistently by
server
implementations for clipboard operations.
Co-authored-by: lamco-office <office@lamco.io>
Per [MS-RDPECLIP section 2.2.5.3][file-contents-spec], the Local
Clipboard Owner
sends File Contents Request PDU to retrieve file data from the Shared
Clipboard
Owner during paste operations.
This enables server implementations to request file contents from
clients,
completing the bidirectional file transfer capability.
[file-contents-spec]:
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpeclip/cbc851d3-4e68-45f4-9292-26872a9209f2
Co-authored-by: lamco-office <office@lamco.io>
Per [MS-RDPECLIP sections 2.2.4.6 and 2.2.4.7][lock-spec], the Local
Clipboard
Owner may lock the Shared Clipboard Owner's clipboard data before
requesting
file contents to ensure data stability during multi-request transfers.
This enables server implementations to safely request file data from
clients
when handling clipboard paste operations.
---------
Co-authored-by: lamco-office <office@lamco.io>
Replaced generic From implementation that used to_string() with specific
implementations for each error type to ensure source error chains are
preserved. IronRDP errors now use .report() for full context, while
standard library errors are converted to anyhow::Error for proper
alternate formatting with {:#}.
We still don't have a means to set the nuget version directly in the
workflow. I thought of adding it, but on closer inspection we have logic
to handle package and product version differently (and the same is true
of sspi-rs etc) and probably needs a closer look. It can be troublesome
to deploy a newer nuget package that doesn't increment the assembly
versions (for example - and it shouldn't be an issue for Devolutions,
but maybe for other consumers - Windows Installers generally might not
overwrite a DLL if the version number is not newer than what is already
installed.
For now, I just bump the package version manually.
> Checks the doc comments of publicly visible functions that may panic
and warns if there is no # Panics section.
Co-authored-by: Benoît Cortier <3809077+CBenoit@users.noreply.github.com>
leading zero in Nuget version caused CI to fail on ffi crate build:
```
error: invalid leading zero in minor version number
--> ffi/Cargo.toml:3:11
|
3 | version = "2025.09.24"
| ^^^^^^^^^^^^
|
error: failed to load manifest for workspace member `/Users/runner/work/IronRDP/IronRDP/ffi`
referenced by workspace at `/Users/runner/work/IronRDP/IronRDP/Cargo.toml`
```
When running on non-Windows, HandleClipboardEvents will create an
infinite loop consuming 100% CPU.
Now, we call HandleClipboardEvents only when on Windows.
"session" has a fixed set of supported codecs with associated IDs.
"connector" must expose the set of codecs during capabilities exchange.
It currently uses hard-codes codec IDs in different places.
Move the BitmapCodecs set to ironrdp-pdu. Shared code will be used by
the server, so this is a suitable common place.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
We used to inject the resolved target server address, but that is not
what is expected. Server typically ignores this field so this was not a
problem up until now.
This patched version of Diplomat is backporting an important fix from
the more up to date versions of Diplomat.
Without this patch, the code generated by the diplomat::bridge macro
contains an easy to trigger UB.
This UB is triggered by the generated C# code when passing an empty
byte[] array.