Skip to main content
The FreeRDP RDP proxy is a man-in-the-middle component that sits between an RDP client and a real RDP server. It terminates the client-side RDP connection, establishes a new connection to the target server on behalf of the client, and forwards traffic in both directions.

What the proxy does

  • Accepts RDP connections from clients (the “front” side)
  • Connects to a configured target RDP server (the “back” side)
  • Forwards graphics, input, and channel data between the two sides
  • Exposes hook and filter callbacks that loadable modules can use to inspect or modify traffic

Use cases

Building

This produces the freerdp-proxy binary and the libfreerdp-proxy library.

Running the proxy

Dump a default configuration file to start from:

Configuration file

The proxy is configured with an INI file. All sections and keys are described below.
When FixedTarget=false a loaded module must set target_address and target_port in the proxyFetchTargetEventInfo struct inside its ServerFetchTargetAddr filter callback, otherwise the connection is aborted.

Proxy server API

Embed the proxy in an application using the public C API in include/freerdp/server/proxy/proxy_server.h:

Additional config helpers

Module API

Modules extend the proxy at runtime. A module is a shared library (.so / .dll) that exports a single entry point:
Inside the entry point, register a proxyPlugin struct:

Hook types

Hooks are called for lifecycle events. Returning FALSE aborts the connection.

Filter types

Filters are called for data events. Returning FALSE drops (does not forward) the event.

Per-session plugin data

Modules can store and retrieve session-scoped data using the plugin manager:
Build the example modules in server/proxy/modules/ as a reference. They demonstrate logging, traffic inspection, and target address overriding.