Skip to content
rcarmoPublic

About

A Go-backed web RDP client (and reference client implementation)

Resources

Stars

21 stars

Watchers

0 watching

Forks

Repository files navigation

Go RDP Client

Logo

A browser-based Remote Desktop Protocol (RDP) client built with Go and WebAssembly, originally inspired by kulaginda/rdp-html5 but completely rewritten from scratch to pass all the reference tests in Microsoft's MS-RDPBCGR specification and be a reference implementation for RDP in Go.

⚠️ Note: While functional, this implementation has known limitations.

Quick Start

Using Docker (Recommended)

# Run with default settings (TLS validation enabled)
docker run -d -p 8080:8080 ghcr.io/rcarmo/go-rdp:latest

# Run with TLS validation disabled (for self-signed certs)
docker run -d -p 8080:8080 -e TLS_SKIP_VERIFY=true ghcr.io/rcarmo/rdp-html5:latest

# Run with debug logging
docker run -d -p 8080:8080 -e LOG_LEVEL=debug ghcr.io/rcarmo/rdp-html5:latest

Then open http://localhost:8080 in your browser.

Using Docker Compose

git clone https://github.com/rcarmo/go-rdp.git
cd go-rdp
docker-compose up -d

Building from Source

Prerequisites:

  • Go 1.21+
  • TinyGo 0.34+ (for WASM)
  • Node.js 18+ (for JS bundling)
# Clone and build
git clone https://github.com/rcarmo/go-rdp.git
cd go-rdp
make deps    # Install dependencies
make build   # Build everything (WASM + JS + binary)

# Run
./bin/go-rdp

Configuration

Environment variables:

Variable Default Description
SERVER_PORT 8080 HTTP server port
LOG_LEVEL info Logging level: debug, info, warn, error
TLS_SKIP_VERIFY false Skip RDP server TLS certificate validation
TLS_ALLOW_ANY_SERVER_NAME false Allow connecting without enforcing SNI (lab/testing)
ENABLE_TLS false Enable HTTPS for the web interface
TLS_CERT_FILE - Path to TLS certificate
TLS_KEY_FILE - Path to TLS private key
RDP_ENABLE_RFX true Enable RemoteFX codec support
RDP_ENABLE_UDP false Enable UDP transport (experimental)
RDP_PREFER_PCM_AUDIO false Prefer PCM audio (best quality, high bandwidth)

Command-line flags:

Flag Description
-host Server listen host (default: 0.0.0.0)
-port Server listen port (default: 8080)
-log-level Log level: debug, info, warn, error
-tls-skip-verify Skip TLS certificate validation
-tls-server-name Override TLS server name (SNI)
-tls-allow-any-server-name Allow connecting without enforcing SNI (lab/testing only)
-nla Enable Network Level Authentication
-no-rfx Disable RemoteFX codec support
-udp Enable UDP transport (experimental)
-prefer-pcm-audio Prefer PCM audio (best quality, high bandwidth)
-version Show version information
-help Show help message

See docs/configuration.md for full configuration options.

Documentation

User Documentation

Implementation Documentation

  • NSCodec - Bitmap codec implementation
  • RemoteFX - RemoteFX wavelet codec implementation
  • WebGL - WebGL rendering implementation

Protocol Specifications

This implementation follows Microsoft's open protocol specifications:

Protocol Description Specification
MS-RDPBCGR Basic Connectivity Link
MS-RDPEA Audio Output Link
MS-RDPEDYC Dynamic Channels Link
MS-RDPEDISP Display Control Link
MS-RDPEMT Multitransport Link
MS-RDPEUDP UDP Transport Link

Features

  • Secure Credentials - Passwords sent via WebSocket, not URL
  • TLS Support - TLS 1.2+ encryption for RDP connections
  • NLA Authentication - Network Level Authentication (with limitations)
  • Clipboard - Bidirectional text clipboard
  • Audio - Audio redirection with PCM, AAC, and MP3 support
  • WebAssembly - RLE/NSCodec/RemoteFX decoding via WASM
  • Configurable - Environment-based configuration

Limitations

  • Windows Compatibility - Primarily tested with XRDP; Windows servers may have issues
  • Graphics - RemoteFX codec implemented; H.264 not yet supported
  • NLA - Works with many configurations but not all (see limitations below)

Development

make help       # Show all targets
make dev        # Run in development mode
make test       # Run tests
make lint       # Run linters
make build-all  # Build for all platforms

License

MIT License - see LICENSE

About

A Go-backed web RDP client (and reference client implementation)

Resources

Stars

21 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages