Version: 0.8.0
Docs.rs: ironrdp-connector
Docs.rs: ironrdp-connector
Overview
Theironrdp-connector crate provides abstract state machines for establishing RDP connections. It handles the complex multi-phase connection sequence:
- X.224 negotiation
- MCS connection
- Security exchange (CredSSP/NLA or legacy TLS)
- Capability negotiation
- Channel join
- Connection finalization
Core Types
Config
ironrdp_pdu::rdp::capability_sets and ironrdp_pdu::gcc for related types.
Credentials
DesktopSize
BitmapConfig
State Machine Traits
Sequence
fn(&self) -> Option<&dyn PduHint>
Returns a hint for detecting the next PDU boundary (for framing)
fn(&self) -> &dyn State
Returns the current state (for introspection/logging)
fn(&mut self, input: &[u8], output: &mut WriteBuf) -> ConnectorResult<Written>
Process input PDU and generate output PDU(s)
fn(&mut self, output: &mut WriteBuf) -> ConnectorResult<Written>
Generate output PDU(s) without processing input (for initial requests)
State
Written
step() indicating how many bytes were written.
Connection Sequences
ClientConnector
ChannelConnectionSequence
LicenseExchangeSequence
ConnectionFinalizationSequence
CredSSP Support
This crate re-exports thesspi crate for CredSSP/NLA:
Error Handling
NegotiationFailure
- “server requires Enhanced RDP Security with CredSSP”
- “server only supports Standard RDP Security”
- “server lacks valid authentication certificate”
Utilities
encode_x224_packet
encode_send_data_request
Features
feature
Enable
arbitrary::Arbitrary derives for fuzzingfeature
Enable QOI image codec (passed through to ironrdp-pdu)
feature
Enable QOI + Zstd compressed images
Usage Notes
Transport Agnostic:
The connector does NOT perform network I/O. You provide input bytes from the network and send output bytes to the network. This design allows:
The connector does NOT perform network I/O. You provide input bytes from the network and send output bytes to the network. This design allows:
- Synchronous or asynchronous I/O
- TCP, TLS, or any custom transport
- Easy testing and fuzzing
State Introspection:
UseUse
Use
state().name() for logging:state_is::<T>() or state_downcast::<T>() to check specific states.Security Recommendations:
Set
Set
enable_tls = false to enforce NLA (CredSSP). Legacy TLS security (without NLA) has a large attack surface and should be avoided.See the Config::enable_tls documentation for security considerations.See Also
- ironrdp-session - Session management after connection
- ironrdp-pdu - PDU structures
- ironrdp-svc - Static virtual channels
- Connection Sequence Guide - High-level overview
- MS-RDPBCGR §1.3 - Connection sequence specification

