Skip to content

Latest commit

 

History

232 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreeRDP Control

NuGet Version NuGet Downloads .NET

RoyalApps.Community.FreeRdp.WinForms embeds FreeRDP's Windows client in a WinForms application. It launches wfreerdp.exe with a parent-window handle; it does not use Microsoft RDP ActiveX or FreeRdpKit.

  • Typed destination, gateway, display, certificate, and redirection settings.
  • A bundled client, with support for selecting a compatible custom executable.
  • Connection events, credential/certificate retries, and resize/zoom reconnects.
  • Opt-in native diagnostics with per-launch configuration and stdout/stderr capture, introduced in 2.2.4.

The current source targets .NET 10 on Windows. Older package releases may have different framework requirements.

Documentation

The documentation can be found here:

See documentation development and deployment to preview the site locally or publish it to GitHub Pages.

FreeRDP demo

Installation

dotnet add package RoyalApps.Community.FreeRdp.WinForms

For the diagnostics APIs, install version 2.2.4 or later from a feed containing that version.

Quick start

On the WinForms UI thread, add the control to a form or container before connecting:

using System.Windows.Forms;
using RoyalApps.Community.FreeRdp.WinForms;

// In your form's constructor, after initialization:
var rdp = new FreeRdpControl { Dock = DockStyle.Fill };
Controls.Add(rdp);
rdp.Configuration.Server = "desktop.example.test";

// Obtain credentials through your host application's secure credential flow.
rdp.Configuration.Username = username;
rdp.Configuration.Password = password;
Shown += (_, _) => rdp.Connect();

Use rdp.Disconnect() to stop the client. The containing form owns and disposes the control. Keep certificate validation enabled; see the guide before implementing certificate exceptions.

Diagnostics

Set DiagnosticsOptionsProvider before connecting and subscribe to DiagnosticOutput. The provider is evaluated before every native launch, including internal retries.

Output is raw and potentially sensitive. Handlers must be thread-safe and nonblocking. The host owns redaction, bounded buffering, file writing, persistence, and enable/disable policy. See the diagnostics guide for an integration example and lifecycle details.

Demo and development

Open src/RoyalApps.Community.FreeRdp.slnx and run RoyalApps.Community.FreeRdp.WinForms.Demo.

dotnet build src/RoyalApps.Community.FreeRdp.slnx -c Release
dotnet test src/RoyalApps.Community.FreeRdp.WinForms.Tests/RoyalApps.Community.FreeRdp.WinForms.Tests.csproj -c Release
npm ci
npm run docs:dev

License and acknowledgements

MIT License. FreeRDP and other bundled dependencies retain their respective licenses.

Special thanks to Marc-André Moreau and akallabeth for their help.

About

RoyalApps.Community.FreeRDP contains projects/packages to easily embed/use FreeRDP in an application.

Resources

Stars

24 stars

Watchers

8 watching

Forks

Releases

Used by

Contributors

Languages