Sessions that survive a reload
molcajeted holds a dropped tunnel for a grace period and pauses the remote display meanwhile. The same browser reattaches after a reload or a short outage.
Open source · Apache License 2.0
molcajete is a clientless gateway for RDP, VNC and SSH, written in Rust. Its browser client is WebAssembly: it parses, decodes and renders in a Web Worker with WebGL2, so the page stays responsive while the screen changes.
Why a new client
The reference Guacamole client draws each layer on a 2D canvas on the main thread and reads pixels back for raster operations. molcajete's client runs the WebSocket tunnel, the parser, image and video decoding and the WebGL2 renderer inside a dedicated Web Worker, on an OffscreenCanvas.
sync.molcajeted sends busy areas as AV1, H.265 or H.264, and can pass RDP's own H.264 (EGFX AVC420 / AVC444) through without encoding it again.
Terminals
The terminal bundles DejaVu Sans Mono and NanumGothicCoding, so CJK text lines up without anything installed on the server. Files move over SFTP: drag them onto the session to upload.
Recordings
Connections can record every session, or users can start a recording from the session menu. Recordings play in the browser with seeking and up to 8× speed, in a format that guacenc reads or in molcajete's own, which is smaller and seeks faster.
Features
molcajeted holds a dropped tunnel for a grace period and pauses the remote display meanwhile. The same browser reattaches after a reload or a short outage.
SFTP in SSH and a shared drive in RDP. Downloads stream to disk in Chrome and Edge. Each direction can be blocked, and a size limit set.
OpenID Connect with role and group sync, Active Directory and OpenLDAP with nested groups, and authenticating reverse proxies with trusted headers or signed JWTs.
TOTP per user or required by a group, WebAuthn passkeys and security keys, also as the only step. Failed sign-ins are throttled, across replicas when asked to.
User, connection manager and administrator roles, grants that follow the folder tree, and stored credentials that are write-only and encrypted with AES-256-GCM.
Reach RDP, VNC and SSH hosts through up to four SSH bastions, with credentials and host keys per hop.
An API token makes a one-time session link for an iframe, or mount the session component on your own origin with the JavaScript client.
JSON logs, Prometheus metrics from the daemon, the gateway and the browser client, continuous CPU profiles, and a Grafana dashboard.
Every boundary speaks the Guacamole protocol. The gateway can route some connections to stock guacd and others to molcajeted.
Administration
Architecture
molcajete reimplements the pieces of an Apache Guacamole deployment in Rust. Because each one speaks the same protocol as the piece it replaces, you can adopt them one at a time.
| Component | Replaces | What it does |
|---|---|---|
molcajete-protocol | the protocol code in libguac and guacamole-common | Streaming parser and encoder, typed instructions, binary records, video framing |
molcajete-client | guacamole-common-js | Worker and WebGL2 renderer, WebCodecs video, input and IME, audio, recording playback |
molcajete-gateway | the Guacamole web application | WebSocket tunnel, React UI, database, sign-in, recordings, history, audit log, API tokens |
molcajeted | guacd and its protocol plugins | VNC, SSH with SFTP, RDP with audio and a shared drive, jump hosts, session resume, video mode |
Quick start
You need Rust 1.94 or later with the wasm32-unknown-unknown target, wasm-bindgen-cli 0.2.130, bun and Docker. The compose file starts test targets: an X11 desktop over VNC, an OpenSSH server and an xrdp desktop.
Then open http://127.0.0.1:8080 and sign in as admin / change-me.
git clone https://github.com/clroot/molcajete && cd molcajete
rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli --version 0.2.130 --locked
# Test targets: guacd, X11/VNC, OpenSSH and xrdp
docker compose -f docker/compose.yml up -d --build
# The wasm client and the web UI, then the gateway
scripts/build-web.sh
cp gateway.example.toml gateway.toml
cargo run -p molcajete-gateway -- --config gateway.toml
# In a second terminal: the Rust daemon
cargo run -p molcajete-daemon -- -l 4823