Commit Graph

119 Commits

Author SHA1 Message Date
Greg Lamberson 4dcad09980 feat(session): handle Auto-Detect Request PDUs from server (#1178)
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".
2026-04-01 21:22:50 +09:00
Greg Lamberson c70d38a9f1 build: upgrade sspi to 0.19, picky to rc.22, fix NTLM fallback (#1188) 2026-04-01 08:15:18 +09:00
Greg Lamberson 7f2f59a832 fix(ffi): correct FfiClipbarodMessageProxy typo (#1173) 2026-03-18 10:56:01 +09:00
Benoît Cortier 79869f9a76 chore: upgrade toolchain to 1.89.0 and migrate to Rust edition 2024 (#1153)
- 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)
2026-03-09 14:32:53 +00:00
Greg Lamberson 2b24e9664d fix(connector,session): propagate negotiated share_id to all outgoing ShareDataPdu (#1147) 2026-03-05 21:14:08 +09:00
glamberson 7853e3cc6f feat(connector,session): dispatch multitransport PDUs on IO channel (#1096)
`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
2026-02-13 22:02:25 +09:00
DELGEHIER Cédric a33d27fe67 feat(connector): add alternate_shell and work_dir configuration support (#1095)
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.
2026-02-12 17:18:55 +00:00
glamberson 4f5fdd3628 feat(connector): advertise multitransport channel in GCC blocks (#1092)
Add multitransport_flags config option to populate the
MultiTransportChannelData GCC block during connection negotiation.
When None (the default), behavior is unchanged.
2026-02-12 22:43:26 +09:00
Marc-André Moreau ebf5da5f33 feat(rdp): add bulk compression and wire negotiation
- 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
2026-02-09 15:22:51 -05:00
glamberson 25f81337aa feat(cliprdr): add SendFileContentsResponse message variant (#1066)
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>
2026-01-13 17:57:32 +00:00
glamberson c30fc35a28 feat(cliprdr): add request_file_contents method (#1065)
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>
2026-01-13 12:38:20 -05:00
glamberson 58c3df84bb feat(cliprdr): add clipboard data locking methods (#1064)
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>
2026-01-13 12:00:53 -05:00
Benoît Cortier 7123150b63 fix(ffi): preserve full error context across FFI boundary (#1050)
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 {:#}.
2025-12-05 15:43:28 +00:00
Richard Markiewicz 632ad86f67 chore: bump iOS nuget package to net9.0 (#1049)
The `net8.0-ios` workload is out of support and won't build
out-of-the-box anymore. Bump the target framework to `net9.0-ios`.
2025-12-04 11:45:49 -05:00
Richard Markiewicz da5db5bf11 chore(release): prepare for Devolutions.IronRdp v2025.12.4.0 (#1048)
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.
2025-12-04 15:11:34 +00:00
Allan Zhang 5bd319126d build(deps): bump picky and sspi (#1028)
This fixes build issues with some dependencies.
2025-11-19 14:08:42 +00:00
irvingouj@Devolutions d3e0cb17e1 feat(ffi): expose RDCleanPath (#1014)
Add RDCleanPath support for Devolutions.IronRDP .NET package
2025-10-30 16:38:41 +00:00
Alex Yusiuk abc391c134 refactor: add partial_pub_fields clippy style and readability lint (#976) 2025-10-23 10:58:41 -04:00
Alex Yusiuk af8ebdcfa2 refactor: enable missing_panics_doc clippy lint (#1006)
> 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>
2025-10-06 09:19:22 +00:00
Vladyslav Nikonov a660d7f960 chore(release): remove leading zero from nuget version (#1000)
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`
```
2025-09-29 06:39:28 -04:00
Vladyslav Nikonov 3198abae2f chore(release): prepare for Devolutions.IronRdp v2025.09.24.0 (#998) 2025-09-25 08:52:17 -04:00
Alex Yusiuk 42fbd5f378 refactor: add multiple_inherent_impl clippy style and readability lint (#978)
From the lint
[documentation](https://rust-lang.github.io/rust-clippy/master/index.html#/multiple_inherent_impl):
> Checks for multiple inherent implementations of a struct
> Splitting the implementation of a type makes the code harder to
navigate.
2025-09-19 11:27:49 +00:00
Alex Yusiuk 630525deae refactor!: enable unwrap_used clippy correctness lint (#965)
Co-authored-by: Benoît CORTIER <git.divisible626@passmail.com>
2025-09-11 11:41:02 +00:00
Benoît CORTIER bd8f2743d6 chore(release): prepare for Devolutions.IronRdp v2025.10.9.0 2025-09-09 13:24:10 -04:00
Vladyslav Nikonov 17833fe009 feat: add support for DVC pipe proxy in FFI (#938) 2025-09-04 12:35:34 -04:00
Dan Share 6fab9f8228 feat: add an option to specify a timezone (#917)
Allows to pass a timezone to the remote desktop.
2025-08-20 15:40:32 +00:00
Benoît CORTIER 5d8a487001 fix: rename option no_audio_playback into enable_audio_playback 2025-08-04 06:46:10 -04:00
Benoît CORTIER 218fed03c7 fix: rename option no_server_pointer into enable_server_pointer 2025-08-04 06:46:10 -04:00
Alex Yusiuk 32b0e40eca refactor: add unused_trait_names clippy extra-pedantic lint (#900) 2025-07-31 03:57:09 -04:00
Marc-André Lureau b4fb0aa0c7 build(deps): bump thiserror to 2.0
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2025-07-24 06:34:50 -04:00
Pavlo Myroniuk 33530212c4 feat!: update sspi dependency (#839)
Newer version of sspi adds support for server-side Kerberos.
This is relevant for the ironrdp-acceptor crate.
2025-07-08 08:45:30 -04:00
Benoît Cortier 48e02441d2 chore: update Rust toolchain to 1.88.0 (#852)
MSRV is also bumped to 1.84.
2025-07-03 07:38:28 +03:00
Miha Markič 4260537c90 fix(ffi): avoid infinite loop in HandleClipboardEvents when not on Windows (#846)
When running on non-Windows, HandleClipboardEvents will create an
infinite loop consuming 100% CPU.
Now, we call HandleClipboardEvents only when on Windows.
2025-06-28 15:51:57 +00:00
Marc-André Lureau f03ee393a3 refactor!: add supported codecs in BitmapConfig
"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>
2025-05-09 09:11:45 +02:00
Benoît Cortier 712da42ded fix: inject socket local address for the client addr (#759)
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.
2025-04-21 09:08:50 +00:00
Zac Bergquist bdde2c76de fix(client)!: fix name of client address field (#754) 2025-04-16 04:23:49 -04:00
Marc-André Lureau 45f66117ba feat(session)!: make DecodedImage Send
This will allow to share it between different threads.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2025-04-08 14:37:50 +02:00
Marc-André Lureau 9f0edcc4c9 feat(client): Add no_audio_playback flag to Config struct
Enable audio playback on the client.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2025-04-08 13:35:44 +02:00
Benoît Cortier f62104efe6 fix(ffi): use patched diplomat (#723)
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.
2025-03-26 00:55:30 +00:00
Benoît CORTIER 1bb6895422 docs(ffi): fix compilation of examples 2025-03-25 12:26:28 +01:00
Benoît CORTIER 51c45df8c4 docs(ffi): document how to build the .NET bindings 2025-03-24 23:23:26 +01:00
Benoît CORTIER aa210204a7 chore(xtask): add ffi install task
This task is for installing all the requirements for ffi tasks.
(That is: `diplomat-tool`.)
2025-03-24 23:23:26 +01:00
Benoît Cortier c21fa44fd6 build: do not use workspace dependencies (#695)
As written in the workspace Cargo.toml:

> Note that for better cross-tooling interactions, do not use workspace
dependencies for anything that is not "workspace internal" (e.g.: mostly
dev-dependencies). E.g.: release-plz can’t detect that a dependency has
been
updated in a way warranting a version bump in the dependant if no commit
is
touching a file associated to the crate. It is technically okay to use
that
for "private" (i.e.: not used in the public API) dependencies too, but
we
still want to make follow-up releases to stay up to date with the
community,
even for private dependencies.

Expectation is that release-plz will be able to auto-detect when bumping
dependents is necessary.

Closes #689
2025-03-12 09:25:01 -04:00
dependabot[bot] 6e8a8236dc build(deps): bump SixLabors.ImageSharp from 3.1.3 to 3.1.7 in /ffi/dotnet/Devolutions.IronRdp.ConnectExample (#686) 2025-03-07 05:00:39 +00:00
Przemko Robakowski dd221bf224 feat: support license caching (#634)
Adds support for license caching by storing the license obtained
from SERVER_UPGRADE_LICENSE message and sending
CLIENT_LICENSE_INFO if a license requested by the server is already
stored in the cache.

Co-authored-by: Benoît Cortier <3809077+CBenoit@users.noreply.github.com>
2025-01-18 14:34:58 +00:00
dependabot[bot] a2378efb7a build(deps): bump embed-resource from 2.5.0 to 3.0.1 (#577) 2025-01-17 07:40:50 -05:00
Benoît Cortier 50b848529c ci(release-crates): use Devolutions/actions-public (#608) 2024-12-12 16:10:22 +00:00
Zac Bergquist 36da11c02e feat(connector): allow clients to specify the x224 nego request data (#580)
The previous code would (correctly) set a cookie containining the
username, but only when using username/password credentials. When
smart card credentials are used, the cookie would always contain
the empty string.
2024-11-19 20:44:40 -05:00
Benoît CORTIER 294af1cc5c style: cargo +nightly fmt 2024-11-20 01:28:31 +09:00
Benoît CORTIER 807eb59b07 refactor: enable clippy::std_instead_of_core lint 2024-11-20 01:28:31 +09:00