Skip to content

Latest commit

 

History

History
132 lines (98 loc) · 3.86 KB

File metadata and controls

132 lines (98 loc) · 3.86 KB

RDP Implementation Status

Current Status: PLACEHOLDER ONLY ⚠️

The RDP client in this application is currently a placeholder implementation and does NOT actually connect to RDP servers. All methods return Ok(()) but don't perform any real operations.

Why You See a Black Screen

When you connect to an RDP server, the application:

  1. ✅ Creates a connection profile
  2. ✅ Shows a tab with the RDP icon
  3. Does NOT actually connect to the RDP server
  4. ❌ Does NOT receive any frame data
  5. ❌ Renders an empty/black canvas

How to Test Your xrdp Server (External Tools)

1. Using rdesktop (Linux)

# Install rdesktop
sudo apt install rdesktop

# Connect to your server
rdesktop -u USERNAME -p PASSWORD 10.8.64.76:3389

2. Using xfreerdp (Recommended for Linux)

# Install FreeRDP
sudo apt install freerdp2-x11

# Connect to your server
xfreerdp /u:USERNAME /p:PASSWORD /v:10.8.64.76:3389 /size:1920x1080

3. Using Remmina (GUI Tool)

# Install Remmina
sudo apt install remmina remmina-plugin-rdp

# Then launch Remmina from applications and create a new RDP connection

4. Test xrdp Server Status

# Check if xrdp is running
sudo systemctl status xrdp

# Check if port 3389 is listening
sudo netstat -tlnp | grep 3389
# or
sudo ss -tlnp | grep 3389

# Test connection from command line
telnet 10.8.64.76 3389

What Needs to be Implemented

Backend (Rust)

Located in src-tauri/src/rdp/:

  1. client.rs - Replace placeholder with actual IronRDP implementation:

    • Initialize IronRDP client
    • Perform RDP handshake (Connection Initiation, Basic Settings Exchange)
    • Handle NLA (Network Level Authentication) if required
    • Receive and process bitmap updates
    • Send keyboard/mouse input events
  2. manager.rs - Update frame reader:

    • Actually poll for frame updates from IronRDP
    • Convert RDP bitmap data to RGBA format
    • Emit frames to frontend via Tauri events
  3. framebuffer.rs - Process RDP-specific formats:

    • Handle RDP bitmap compression
    • Convert various RDP pixel formats to RGBA

Frontend (TypeScript)

Located in src/components/rdp/:

  • RdpViewer.tsx - Currently implemented and should work once backend sends frames

Current File Structure

src-tauri/src/rdp/
├── mod.rs           - Module exports and types
├── client.rs        - ⚠️ PLACEHOLDER - RDP client stub
├── manager.rs       - ⚠️ INCOMPLETE - No actual frame reading
├── input.rs         - Input event types (complete)
└── framebuffer.rs   - Basic framebuffer (needs RDP-specific handling)

Dependencies Already Added

[dependencies]
ironrdp = "0.3.0"  # RDP protocol library (NOT BEING USED YET)

Next Steps to Make RDP Work

  1. Study IronRDP examples: Check the ironrdp crate documentation
  2. Implement connection sequence: RDP handshake, NLA, capabilities exchange
  3. Handle bitmap updates: Process and decode RDP graphics orders
  4. Implement input forwarding: Send mouse/keyboard events to RDP session
  5. Test with your xrdp server: Iterate on implementation

Recommended Approach

Since IronRDP is complex, consider:

  1. Start with VNC - The VNC implementation is more complete and simpler
  2. Study the VNC implementation in src-tauri/src/vnc/ as a reference
  3. Follow IronRDP examples from their repository
  4. Implement in phases:
    • Phase 1: Basic connection and authentication
    • Phase 2: Receive and display frames
    • Phase 3: Send input events
    • Phase 4: Handle disconnections and errors

Testing VNC Instead (Works Better Currently)

If you have a VNC server available, that implementation is more complete:

# Test VNC connection
vncviewer 10.8.64.76:5900

The VNC implementation in this app actually connects and should display frames (though framebuffer processing may need refinement).