Skip to content

Conversation

@irvingoujAtDevolution
Copy link
Contributor

@irvingoujAtDevolution irvingoujAtDevolution commented Oct 7, 2025

Add RDCleanPath support for Devolutions.IronRDP .NET package

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

Coverage Report 🤖 ⚙️

Past:
Total lines: 30171
Covered lines: 18762 (62.19%)

New:
Total lines: 30171
Covered lines: 18763 (62.19%)

Diff: +0.00%

[this comment will be updated automatically]

@CBenoit CBenoit requested a review from Copilot October 8, 2025 08:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates Devolutions.IronRDP with Gateway by adding RDCleanPath protocol support and KDC proxy capabilities for .NET. The implementation enables RDP connections through Devolutions Gateway using WebSocket transport with optional Kerberos authentication via KDC proxy.

  • Adds RDCleanPath protocol FFI bindings for gateway communication
  • Implements KDC proxy support for Kerberos authentication through the gateway
  • Provides WebSocket transport layer and gateway connection methods for .NET

Reviewed Changes

Copilot reviewed 14 out of 36 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ffi/src/rdcleanpath.rs Adds FFI bindings for RDCleanPath protocol operations
ffi/src/lib.rs Registers new rdcleanpath module
ffi/src/error.rs Adds error handling for RDCleanPath and DER operations
ffi/src/credssp/mod.rs Extends KerberosConfig with KDC proxy support
ffi/dotnet/Devolutions.IronRdp/src/WebsocketStream.cs Implements WebSocket stream adapter for network transport
ffi/dotnet/Devolutions.IronRdp/src/GatewayConnection.cs Provides gateway connection methods using RDCleanPath
ffi/dotnet/Devolutions.IronRdp/src/Framed.cs Adds custom PDU hint interface for flexible frame detection
ffi/dotnet/Devolutions.IronRdp/src/Connection.cs Updates connection logic to support HTTP/HTTPS requests for KDC proxy
ffi/dotnet/Devolutions.IronRdp.ConnectExample/Program.cs Updates example to remove unused parameter
ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/TokenGenerator.cs Adds JWT token generation client for gateway authentication
ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/MainWindow.axaml.cs Integrates gateway connection support in example application
ffi/dotnet/Devolutions.IronRdp.ConnectExample/Devolutions.IronRdp.ConnectExample.csproj Updates ImageSharp package version
ffi/dotnet/Devolutions.IronRdp.AvaloniaExample/Devolutions.IronRdp.AvaloniaExample.csproj Updates Avalonia package versions
ffi/Cargo.toml Adds ironrdp-rdcleanpath dependency
Comments suppressed due to low confidence (1)

ffi/dotnet/Devolutions.IronRdp/src/Connection.cs:129

  • [nitpick] Use conventional null comparison style 'decoded == null' instead of Yoda condition 'null == decoded' for better readability and consistency with C# conventions.
            if (null == decoded)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@CBenoit
Copy link
Member

CBenoit commented Oct 8, 2025

Please, open a separate PR for the KDC proxy part.

@irvingoujAtDevolution irvingoujAtDevolution changed the title feat(ffi): intergrate Devolutions.IronRDP with Gateway feat(ffi): integrate Devolutions.IronRDP with Gateway Oct 8, 2025
@irvingoujAtDevolution irvingoujAtDevolution changed the title feat(ffi): integrate Devolutions.IronRDP with Gateway feat(ffi): integrate Devolutions.IronRDP with RDCleanPath Oct 8, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 17 out of 39 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if let Err(err) = self.sender.send(message) {
error!("Failed to send clipboard message: {:?}", err);
if let Err(error) = self.sender.send(message) {
error!(?error, "Failed to send clipboard message");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fixing styles along the way, let me know if you mind

}

pub fn with_dynamic_channel_display_control(&mut self) -> Result<(), Box<IronRdpError>> {
self.with_dvc(DisplayControlClient::new(|c| {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fixing styles along the way, let me know if you mind

@irvingoujAtDevolution
Copy link
Contributor Author

Ready for review @CBenoit

Comment on lines 35 to 36
// Step 2: Get client local address (dummy for WebSocket)
string clientAddr = "127.0.0.1:33899";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I guess this is fine? But that’s not what we do in the Rust native client. Look for the connect_ws function.

Comment on lines +109 to +121
pub struct GenericError(pub anyhow::Error);

impl Display for GenericError {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "{:#}", self.0)
}
}

impl From<GenericError> for IronRdpErrorKind {
fn from(_val: GenericError) -> Self {
IronRdpErrorKind::Generic
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: This can be made less verbose to write, and the IronRdpErrorKind type can be removed. Will be a follow up from me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks!

}

/// Converts the PDU into a typed enum for pattern matching
pub fn into_enum(&self) -> Result<Box<RDCleanPathResult>, Box<IronRdpError>> {
Copy link
Member

@CBenoit CBenoit Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming: In the FFI, we do not return an enum. Actually, I don’t think you need a whole different type, it’s not useful here since we can’t manipulate field by field, and there is no destructuring pattern matching.

irvingoujAtDevolution and others added 6 commits October 22, 2025 11:50
- Add RDCleanPath FFI bindings
- Implement WebSocket stream for gateway connections
- Add GatewayConnection API with CredSSP hostname extraction
- Support both direct and gateway connection modes
Add KerberosConfig FFI bindings and HTTP/HTTPS network protocol
handling for KDC proxy authentication via Devolutions Gateway.

- Expose KerberosConfig::new() in FFI layer
- Add GenerateKdcToken() method to TokenGenerator
- Update GatewayConnection to accept KDC proxy parameters
- Implement HTTP/HTTPS request handling in ResolveGenerator
- Auto-generate client hostname for Kerberos authentication

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
let rdcleanpath = self
.0
.clone()
.into_enum()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: You don’t need to use into_enum() at all. You can access the properties directly.

@CBenoit CBenoit changed the title feat(ffi): integrate Devolutions.IronRDP with RDCleanPath feat(ffi): expose RDCleanPath Oct 23, 2025
Copy link
Member

@CBenoit CBenoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perform a last self-review (also double check comments not yet resolved), especially fix the last comment, and then feel free to merge yourself

@irvingoujAtDevolution irvingoujAtDevolution enabled auto-merge (squash) October 29, 2025 20:34
@irvingoujAtDevolution irvingoujAtDevolution merged commit d3e0cb1 into master Oct 30, 2025
10 checks passed
@irvingoujAtDevolution irvingoujAtDevolution deleted the gateway-with-ffi branch October 30, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants