Hi DEV! I'm Miguel, and for the last months I've been building MuDeskClient: a full remote desktop (RDP) client that runs in the browser, powered b...
Some comments have been hidden by the post's author - find out more
Two things here will bite people on shared hosting long before the protocol does.
A session is one PHP-FPM worker held open for hours, so
pm.max_childrenquietly becomes your session cap — once those are taken, every other request on the site queues behind them and it looks like the whole host is down. Worth telling people to put MuDesk in its own pool with its own limit. The other half is the timeout in front of PHP: nginx'sfastcgi_read_timeoutis 60s by default, Apache'sProxyTimeoutis similar, so the socket gets cut while PHP is still sitting happily in its read loop, and any buffering proxy in between makes it worse. A keepalive no-op on the wire after ~30s of silence saves a support ticket per host.The key derivation worries me more. AES-256-GCM under a key derived from the user's own password means the moment that password is changed or reset by an admin, every stored RDP credential in their JSON file is unreadable — and it only shows up at connect time, on a machine nobody is watching. How do you handle it today: re-encrypt on password change, or is there a separate per-user KEK that survives it?
Both fair — one's already documented, the other is a deliberate trade.
Capacity: docs/HOSTING.md has the sizing formula (pm.max_children = sessions + 10) and literally recommends a dedicated FPM pool for rdp.php. The app also caps itself (max_sessions_total, measured by tools/check.php before install) — at the limit a new session gets "server busy" instead of queueing the site. The stream sends a keep-alive frame every 10 s, which resets those fastcgi_read_timeout/ProxyTimeout timers.
Key derivation: there is a per-user data key that survives password changes (re-wrapped at next sign-in) — but saved RDP credentials are deliberately NOT under it: they're derived from the user's own password, so a change or admin reset forgets them. A KEK that survived would have to live server-side, and that ends "not even the administrator can read them". Cost: re-enter credentials after a password change.
The keyboard lesson is my favorite part — that the hardest problem in implementing an entire remote desktop protocol was Notepad's spell checker racing you on Enter is the kind of thing you only learn by shipping it. Waiting for each character's pause and pasting instead of typing bursts is a beautifully unglamorous fix. The constraint that shaped it is just as interesting: giving up MySQL to fit on cheap shared hosting, then holding one PHP-FPM request open per session and documenting how each host's buffering and timeouts behave. And the honesty in TESTING.md — listing broker redirection to a second session host, a real Hyper-V console, and Safari as not tested yet — is exactly what makes me trust the claims that are tested. One question: with fuzzing finding 9 real bugs so far, was there one that surprised you most — a place where the protocol spec and a real server disagreed in a way you hadn't expected?
Honest answer: the spec was almost never the problem — the real servers were.
The fuzzer (a tool that throws random garbage at the code) found 9 bugs, but those were all my parsers being too trusting: no malformed input should ever crash anything.
The surprises came from plugging into real Windows machines. My favorite: the documentation says "offer feature X and the server will use it" — and Windows quietly picks an older one instead. On some virtual machines it refuses to send video at all, no matter what you offer. Nothing was broken; each Windows version just speaks its own dialect of the spec.
So the client now simply asks the server what it can do when it connects, and adapts. Fighting the documentation was never going to work.
For clients accessing a RemoteApp from unmanaged devices, can you disable clipboard and drive redirection separately for each connection?
Yes — each redirection is a separate per-connection setting. When an administrator creates a connection (Administration → Connections, assigned to specific users or to all), these can each be turned off individually: clipboard, shared folder (drive redirection), MuDeskPDF printer, remote audio, and microphone/camera.
On those admin-managed connections, the user can leave a redirection off but cannot turn it back on: in the connect dialog the box shows unticked and greyed out, with the note "The administrator has turned it off for this connection". Users keep their own saved password and options, but the redirections you disabled stay out of their reach.
Thanks for explaining how administrators disable each redirection per connection, Miguel. I build BrowserBox, which streams a remote browser for web applications and can block clipboard copy-out and downloads for unmanaged clients; it is for browser sessions rather than Windows RemoteApps: browserbox.io/go/forum-20261126-de...
supporting everything from Server 2003 to 2022 is museum curator energy lol. somewhere a factory PC still on 2003 just found its client
Ha - museum curator is the nicest thing anyone has called me this week. Honestly though, that museum keeps some people's businesses alive, and someone has to dust those exhibits. 😄
9 fuzzing bugs, 4 in the gateway and 5 in the browser decoders, made me ask whether my own parsers would survive the same treatment?
Probably not — mine didn't either, and that's the whole point. Nine real bugs, all found before a user could. It's an afternoon to try: take the function that reads your wire format, throw random bytes and mutated real captures at it, and treat even a PHP warning as a failure. Worth it.