Rust implementation of the Microsoft Remote Desktop Protocol (RDP)
Find a file
Marc-André Lureau 3c6b2ef2e2 feat(server): move the encoder to blocking task
Since it is a CPU intesive task, we should spawn a task to avoid
blocking other async tasks.

The UpdateFragmenterOwned is quite a gross hack to allow returning the result
from a the task lifetime. I don't know how to accomplish this better, or
else we have to add some Arc<Mutex> stuff.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2024-09-23 02:25:59 -04:00
.cargo refactor: re-organize workspace (#101) 2023-03-29 19:09:15 -04:00
.github ci(nuget-publish): downgrade to NDK 26.x (#540) 2024-08-29 07:41:30 -04:00
crates feat(server): move the encoder to blocking task 2024-09-23 02:25:59 -04:00
ffi fix: save the disconnect reason from the set error info PDU (#547) 2024-09-23 01:15:42 -04:00
fuzz refactor(core): move Encode/Decode to core 2024-08-30 00:05:16 -04:00
web-client feat(web): allow dynamic resize for web (#550) 2024-09-19 19:08:45 +00:00
xtask chore(xtask): check all targets 2024-07-24 04:35:32 -04:00
.gitattribute feat(ffi): initial C# bindings (connector only) (#423) 2024-04-05 15:11:32 +00:00
.gitignore chore(ffi):allow Devolutions.IronRdp to be build and packed with Nuget with the dll on Windows (#457) 2024-05-03 15:29:04 -04:00
ARCHITECTURE.md refactor(pdu): rename PduEncode->Encode PduDecode->Decode 2024-08-30 00:05:16 -04:00
Cargo.lock build(deps): bump the patch group with 3 updates (#544) 2024-09-03 06:50:33 -04:00
Cargo.toml refactor: add ironrdp-core 2024-08-30 00:05:16 -04:00
clippy.toml chore: use workspace lints 2024-07-24 04:35:32 -04:00
LICENSE-APACHE ironrdp: initial commit 2019-07-10 17:31:26 -04:00
LICENSE-MIT ironrdp: initial commit 2019-07-10 17:31:26 -04:00
README.md chore: add getting help section in README (#321) 2023-12-05 20:47:22 +00:00
rust-toolchain.toml build: bump rust toolchain to 1.74.0 (#322) 2023-12-05 19:55:51 -05:00
rustfmt.toml style: run cargo fmt 2022-04-15 13:39:34 -04:00
STYLE.md style(cliprdr): clarify invariants 2023-11-20 09:39:36 -05:00
typos.toml style: fix typos (#546) 2024-09-03 10:36:47 +00:00

IronRDP

A collection of Rust crates providing an implementation of the Microsoft Remote Desktop Protocol, with a focus on security.

Demonstration

https://user-images.githubusercontent.com/3809077/202049929-76f42471-aeb0-41da-9118-0dc6ea491bd2.mp4

Video Codec Support

Supported codecs:

  • Uncompressed raw bitmap
  • Interleaved Run-Length Encoding (RLE) Bitmap Codec
  • RDP 6.0 Bitmap Compression
  • Microsoft RemoteFX (RFX)

Examples

ironrdp-client

A full-fledged RDP client based on IronRDP crates suite, and implemented using non-blocking, asynchronous I/O.

cargo run --bin ironrdp-client -- <HOSTNAME> --username <USERNAME> --password <PASSWORD>

screenshot

Example of utilizing IronRDP in a blocking, synchronous fashion.

This example showcases the use of IronRDP in a blocking manner. It demonstrates how to create a basic RDP client with just a few hundred lines of code by leveraging the IronRDP crates suite.

In this basic client implementation, the client establishes a connection with the destination server, decodes incoming graphics updates, and saves the resulting output as a BMP image file on the disk.

cargo run --example=screenshot -- --host <HOSTNAME> --username <USERNAME> --password <PASSWORD> --output out.bmp

How to enable RemoteFX on server

Run the following PowerShell commands, and reboot.

Set-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services' -Name 'ColorDepth' -Type DWORD -Value 5
Set-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\Terminal Services' -Name 'fEnableVirtualizedGraphics' -Type DWORD -Value 1

Alternatively, you may change a few group policies using gpedit.msc:

  1. Run gpedit.msc.

  2. Enable Computer Configuration/Administrative Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host/Remote Session Environment/RemoteFX for Windows Server 2008 R2/Configure RemoteFX

  3. Enable Computer Configuration/Administrative Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host/Remote Session Environment/Enable RemoteFX encoding for RemoteFX clients designed for Windows Server 2008 R2 SP1

  4. Enable Computer Configuration/Administrative Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host/Remote Session Environment/Limit maximum color depth

  5. Reboot.

Architecture

See the ARCHITECTURE.md document.

Getting help