Skip to main content

Overview

ironrdp-acceptor provides state machines that drive the server-side RDP connection acceptance sequence. It handles the complex multi-phase negotiation and setup required to establish an RDP connection from the server perspective. Key Features:
  • Complete connection acceptance state machine
  • Security protocol negotiation (TLS, Hybrid, Hybrid-EX)
  • CredSSP authentication handling
  • Channel connection management
  • Capability exchange coordination
  • Connection finalization

Installation

Requirements:
  • Tokio async runtime

Core Concepts

Acceptor State Machine

The Acceptor struct implements the Sequence trait and progresses through multiple states:

Connection Acceptance States

The acceptor progresses through these states:
  1. InitiationWaitRequest - Wait for X.224 Connection Request
  2. InitiationSendConfirm - Send X.224 Connection Confirm
  3. SecurityUpgrade - Negotiate security protocol
  4. Credssp - Perform CredSSP authentication (if using Hybrid)
  5. BasicSettingsWaitInitial - Wait for MCS Connect Initial
  6. BasicSettingsSendResponse - Send MCS Connect Response
  7. ChannelConnection - Join MCS channels
  8. RdpSecurityCommencement - Begin RDP security
  9. SecureSettingsExchange - Exchange client info
  10. LicensingExchange - Send license packet
  11. CapabilitiesSendServer - Send Demand Active PDU
  12. MonitorLayoutSend - Send monitor layout (optional)
  13. CapabilitiesWaitConfirm - Wait for Confirm Active
  14. ConnectionFinalization - Finalize connection
  15. Accepted - Connection established

Usage

Basic Connection Acceptance

AcceptorResult

When the acceptor reaches the Accepted state, get_result() returns:
  • static_channels: Negotiated static virtual channels
  • capabilities: Client capability sets
  • input_events: Queued input events from finalization
  • user_channel_id: MCS user channel ID
  • io_channel_id: MCS I/O channel ID
  • reactivation: Whether this is a deactivation-reactivation sequence

Security Protocol Handling

No Security (RDP)

TLS Only

Hybrid (CredSSP + TLS)

Static Virtual Channels

Attach server-side channel processors before accepting connections:
The acceptor will automatically match client channel requests with attached processors.

Deactivation-Reactivation

Handle display resize via deactivation-reactivation:

CredSSP Authentication

The acceptor handles CredSSP (Credential Security Support Provider) for Hybrid and Hybrid-EX:

Authentication Result

For Hybrid-EX, the acceptor automatically sends the Early User Authorization Result:
  • Success - Authentication successful
  • AccessDenied - Authentication failed

State Inspection

Check Current State

State Transitions

Integration with ironrdp-server

The ironrdp-acceptor crate is typically used through ironrdp-server, which provides a higher-level API. However, you can use it directly for custom server implementations:

Error Handling

The acceptor returns ConnectorResult<T> which maps to ironrdp_connector::ConnectorError:

Advanced Features

Skip Channel Join

Clients supporting SUPPORT_SKIP_CHANNELJOIN can skip individual channel join sequences:

Monitor Layout

For clients supporting SUPPORT_MONITOR_LAYOUT_PDU:

See Also