170 Commits

Author SHA1 Message Date
brokenlander 79e763a04d feat(web): add H.264 camera frames (#2467)
MJPEG costs several megabits a second for a camera, where H.264 needs
well under one. With the `camera_h264` extension set to true the device
offers H.264 at the four sizes ahead of the four MJPEG ones, so the
server can pick either. The callback's start message now carries the
format the server started: `{ type: 'start', width, height, fps, format
}` with `format` "h264" or "mjpeg".

Every H.264 picture but a key frame depends on the ones before it, so a
dropped frame spoils the picture until the next key frame. A held H.264
frame therefore queues behind any other held frame (at most 30, beyond
which the queue is dropped with a warning), where an MJPEG frame still
replaces the held one. `camera_sample` now returns true when a frame
went out and none is left held. JS asks `camera_wanted` through
`invokeExtension` before it encodes an H.264 frame: it returns the
Sample Requests no held frame answers, plus one, so a frame waits ready
for the server's next request. The server asks for one sample at a time,
so a frame encoded only on request would add the encode and the wait for
the next captured frame to every round trip.

`iron-remote-desktop-rdp` exports `cameraH264` and `cameraWanted`, and
its README documents the format field and the queue. Follows #2463, the
MJPEG camera; together they are the camera item of #2425. It also
carries the three polish items of #2463's third review round, which
landed after the merge: the spelled-out `StreamDescription` in
`offers_one_color_stream`, the INVARIANT on the held frames, and the
reason the uplink frames bytes written on `CameraUplink`.
2026-11-20 15:18:14 -05:00
Karthik S Kashyap 0eb2d9d6b7 feat: add RDP session replay web component stack (#1216)
Add browser playback of recorded RDP sessions through a
protocol-agnostic Svelte player, an RDP WASM backend, and a demo with
local-file and HTTP range data sources. Consumers provide the
recordings; this does not add a recording mechanism.

Replay requires post-decryption Fast-Path captures. The HTTP demo
validates its index and bounds range requests and playback fetches.

---------

Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-20 14:43:50 -05:00
brokenlander abfc97b299 feat(web): add camera redirection (#2463)
The web client could not redirect a camera. With the `camera` extension
(a function) it registers the RDCamera_Device_Enumerator channel and one
device, RDCamera_Device_0, named by `camera_name` (default `Browser
camera`), with ironrdp-rdpecam's client at the version the server picks.
The device has one color stream and offers MJPEG only: 640x480 at 30 and
15 fps, 320x240 at 15 fps and 1280x720 at 15 fps, in that order. The
current media type is the first offered until the server selects one,
and stays the last selected across stops.

The browser captures and encodes, so the backend only tells the callback
what the server asked for: `{ type: 'start', width, height, fps }` when
it starts the stream and `{ type: 'stop' }` when it stops the stream,
deactivates the device or closes its channel. A stream restarted in
another format gets a stop before the new start. The page pushes each
frame as one JPEG with `camera_sample` through `invokeExtension`. A
frame answers the oldest pending Sample Request at once and the call
returns true; with no request pending the frame is held, in place of any
older held frame, until the next Sample Request, and the call returns
false, as it does when no stream runs or the server refuses the frame.
The held frame is discarded when the stream stops or restarts, the
device deactivates or the channel closes, so a new stream never gets a
frame of the old size.

`iron-remote-desktop-rdp` exports `camera`, `cameraName` and
`cameraSample`, and its README documents the messages. This is the
camera item of #2425.
2026-11-16 22:03:22 -05:00
brokenlander 24abb00fbb feat(web): add client name and keyboard layout (#2424)
The web client always announced itself as `ironrdp-web` and sent
keyboard layout 0, so every browser session showed the same client name
on the server, and the server always chose its own default input locale.

`client_name` replaces the name in the client core data and in device
redirection; an empty name is ignored. The client core data keeps the
first 15 UTF-16 code units of the name and 31 of the IME file name, and
its encoder now drops a high surrogate that either cut would leave
unpaired. `keyboard_layout` takes a Windows input locale identifier,
such as 0x409, and sends it in both the client core data and the client
Input Capability Set, which should carry the same value; 0 keeps the
server's default, and a value that is not a 32-bit unsigned integer is
logged and ignored. `iron-remote-desktop-rdp` exports `clientName` and
`keyboardLayout`.
2026-11-16 13:07:41 -05:00
brokenlander fe9608b2ab feat(web): add monitor layout extensions (#2423)
The web client sent no Client Monitor Data and only logged the server's
monitor layout, so an application could not span one session across
several screens or learn the layout the server applied.

`monitor_layout` sends up to 16 monitors as Client Monitor Data
(MS-RDPBCGR 2.2.1.3.6), five numbers each: left, top, right and bottom
(both inclusive) and flags.
A valid layout has exactly one primary monitor at (0, 0), ordered
rectangles, and a 200–32,766-pixel virtual desktop in each dimension.
The requested desktop size is derived from the monitor union, overriding
any configured size; an invalid list is logged and ignored.

`monitor_layout_callback` is called in the same form with the layout the
server sends during connection finalization, after a
deactivation-reactivation sequence, and in a Monitor Layout PDU during
the session.
`iron-remote-desktop-rdp` exports `monitorLayout` and
`monitorLayoutCallback`, which take and pass `MonitorRect` objects.
The TypeScript callback exposes only the primary flag.

---------

Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-15 18:18:01 -05:00
HydrogenE7 854b5b927a fix(web): avoid probing clipboard.read() during WebKit initialization (#2396)
## Problem

In `web-client/iron-remote-desktop/src/services/clipboard.service.ts`,
`initClipboard()` checks `navigator.permissions.query({ name:
'clipboard-read' })` and, when that throws, calls `await
navigator.clipboard.read()` in the `catch` block to probe Firefox's
`dom.events.testing.asyncClipboard` preference.

On WebKit (Safari, macOS `WKWebView`, iOS/iPadOS `WKWebView`, and
WebKitGTK), `"clipboard-read"` is not a supported `PermissionName` in
the Permissions API, so `navigator.permissions.query` throws
`TypeError`. Calling `await navigator.clipboard.read()` during
`initClipboard()` (`onMount`) then has two undesirable effects on
WebKit:

1. If transient user activation is active when the component mounts,
WebKit immediately pops up its native floating "Paste" confirmation menu
before the user has even connected or pasted.
2. When that read is dismissed or rejected for lack of transient
activation, `ClipboardApiSupported` is downgraded to `TextOnly`, which
disables `ClipboardItem` (`image/png` and `text/html`) even when
`autoClipboard` polling is disabled (`setEnableAutoClipboard(false)`)
and clipboard transfers are driven manually via
`saveRemoteClipboardData()` / `sendClipboardData()`.

## Solution

- Detect WebKit user agents in the `permissions.query` `catch` path and
skip calling `navigator.clipboard.read()` during `initClipboard()`.
- When `autoClipboard` is enabled on WebKit, fall back to `TextOnly` so
the 100ms background polling loop is not scheduled; when `autoClipboard`
is disabled, keep `ClipboardApiSupported.Full` so manual
`saveRemoteClipboardData()` and `sendClipboardData()` retain full
`ClipboardItem` support (`image/png`, `text/html`, and `text/plain`).
- Add a unit test in `clipboardLifecycle.test.ts` covering WebKit
initialization and manual remote clipboard saving.

## Verification

- `vitest` unit tests in
`web-client/iron-remote-desktop/src/services/clipboardLifecycle.test.ts`
and `readyEvent.test.ts`.
- Tested in macOS `WKWebView` with `setEnableAutoClipboard(false)`.
2026-11-15 17:31:38 -05:00
brokenlander 2760894fb6 feat(web): add desktop scale and color depth (#2421)
The web client always sent a desktop scale factor of 0 and a 16-bit
color depth (32 with `legacy_graphics`). On a high-density screen a
session therefore showed either tiny text, when sized in device pixels,
or a blurry upscaled picture, when sized in CSS pixels.

`desktop_scale_factor` takes the display scale in percent (100 to 500)
and sends it with the desktop size, together with the matching device
scale factor (100, 140 or 180). `color_depth` takes 15, 16, 24 or 32 and
replaces the bitmap color depth, including the one `legacy_graphics`
picks. Values outside those sets are logged and ignored.
`iron-remote-desktop-rdp` exports `desktopScaleFactor` and `colorDepth`.

---------

Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-15 15:47:15 -05:00
meanaverage 7fc8a6fca3 feat(web): audio playback (RDPSND) through an audioPlayback callback (#2020)
## Problem

The web client has no audio output. It only attaches a no-op RDPSND
processor (to satisfy RDPDR's channel dependency when a printer is
redirected), so the remote desktop's sound is discarded.

## Change

- **`iron-remote-desktop-rdp`:** a new `audioPlayback(callback)`
extension. The callback receives `{ type: 'wave', sampleRate, channels,
data }` (interleaved 16-bit little-endian PCM in a `Uint8Array`), `{
type: 'volume', left, right }` (0 to 1) and `{ type: 'close' }`. Playing
it (for example, scheduling Web Audio buffers) is left to the embedding
application, as with the clipboard.
- **`ironrdp-web`:** a `WasmAudioBackend` (`RdpsndClientHandler`)
advertising uncompressed 16-bit PCM (stereo, 48, 44.1 and 22.05 kHz). It
forwards what the server sends to the session loop, which calls the
JavaScript callback. With a callback, `enable_audio_playback` is set in
the client info.
- Windows requires RDPDR to be advertised before it sends RDPSND
traffic, as documented in [MS-RDPEA Appendix
A<1>](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpea/deaaab30-d4d6-473e-ac56-3f76c4f6fb24#Appendix_A_1),
with Windows XP and Server 2003 excepted. Without a printer, a
device-less RDPDR (`NoopRdpdrBackend`) is attached; with one, the
printer's RDPDR serves, and the real RDPSND replaces the no-op one.
- Off by default: without the extension, nothing changes.

## Original validation

- At the original revision, unit tests in
`crates/ironrdp-web/src/audio.rs` covered advertised 16-bit PCM, PCM
data/rate/channel forwarding, the then-present unsupported-format guard,
and volume/close forwarding. The guard and its direct-call test were
intentionally removed in the review follow-up described below.
- `cargo test -p ironrdp-web --lib`: 33 passed. The 19
`clipboard::tests` failures are the same on `master` (they need a
browser for `JsValue`).
- `cargo xtask check fmt`, `cargo clippy -p ironrdp-web --all-targets --
-D warnings` (host and `wasm32-unknown-unknown`), `cargo xtask check
typos`, and `npm run check` in `iron-remote-desktop-rdp`.
- In use: built from `master` with this change, the web client plays
audio from Windows 11. Our end-to-end test plays a system sound inside
the session and checks that PCM with a non-zero peak arrives. GNOME
Remote Desktop 46 also works, together with #2019 (its Training Confirm
check) and the graphics pipeline, which GNOME requires (#1977).

## Rebase validation (October 11, 2026)

Rebased onto upstream `e4143f26306a6639a889d80c1c484ca69c365a8f`. The
session configuration conflict was resolved by retaining upstream's
`SecurityConfig` handling and applying the audio callback setup
alongside it.

Passed with Rust 1.94.1:

- `cargo test --locked -p ironrdp-web --lib audio::tests` — all 4 audio
tests present at that October 11 revision passed.
- `cargo test --locked -p ironrdp-web --lib
standard_rdp_security_overrides_enhanced_security` — existing security
regression test.
- `cargo clippy --locked -p ironrdp-web --all-targets -- -D warnings`,
on the host and with `--target wasm32-unknown-unknown`.
- `cargo xtask check fmt`, `cargo xtask check locks`, and `cargo xtask
check test-settings --base upstream/master --head HEAD`.
- `cargo xtask web check` — WASM/web builds, web package type checks and
lint, and web component tests.
- `npm test` and `npm run lint` in `web-client/iron-remote-desktop-rdp`
— all 117 tests passed.

The live Windows/GNOME playback results above are from the original
validation; live playback was not rerun for this rebase.

## Review follow-up

`e6c0b4f1` documented the Windows RDPDR advertisement requirement and
removed the redundant backend format guard and its direct-call test.
`Rdpsnd` dispatches entries from the negotiated client format list;
unsupported offers are excluded and out-of-range wave indices are
discarded before reaching the backend.

`e0966145` adds tests of all four audio/printer channel combinations,
negotiation through the web audio backend, concrete advertised PCM
formats, separate volume/close forwarding, and the actual
WASM-to-JavaScript callback contract. The WASM tests execute JavaScript
objects and typed arrays under Node and now run in `cargo xtask web
check`.

Passed locally with Rust 1.94.1:

- 6 host audio/channel tests, 9 WASM/Node tests, and 77 RDPSND
integration tests.
- Host and `wasm32-unknown-unknown` Clippy with `-D warnings`.
- `cargo xtask web check`: WASM/web builds, the 9 WASM tests, package
type checks and lint, and 20 component tests.
- 117 RDP TypeScript tests, formatting, typos, lockfile checks, and `git
diff --check`.

These results cover this PR's branch with the follow-up changes, without
a rebase onto current upstream master. Live Windows/GNOME playback was
not rerun; those results remain the original validation above.

## Related work

#904 is an earlier, still-draft implementation that owns Web Audio
playback, buffering and resampling inside Rust/WASM. This PR exposes
PCM, volume and close events through an `audioPlayback(callback)`
extension so the embedding application owns playback and its audio
lifecycle.

_Prepared with AI assistance; the change and validation results were
reviewed._
2026-11-15 15:04:49 -05:00
Nahum Shalman 6415bba912 fix(web): lay the canvas out as a block (#2428)
An inline canvas sits on a text baseline, so the line it is in runs a
few pixels past it. At 1:1, where the wrapper does not clip, that
overflowed the page and showed scrollbars, though the desktop fit the
window exactly.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:19:29 -05:00
brokenlander 6506cc0ed2 feat(web): add performance flags extension (#2422)
The web client always sent IronRDP's default performance flags (no
full-window drag, no menu animations, font smoothing on), so an
application could not ask the server to leave out the wallpaper or the
cursor shadow on a slow link, or keep full-window drag on a fast one.

`performance_flags` takes the `performanceFlags` bitmask of the Extended
Info Packet (MS-RDPBCGR 2.2.1.11.1.1.1) and sends it in place of the
default. Bits the protocol does not define are dropped, and a value that
is not a 32-bit unsigned integer is logged and ignored.
`iron-remote-desktop-rdp` exports `performanceFlags`.
2026-11-15 09:17:32 -05:00
Yuval Marcus 3c778f779a fix(web): keep clipboard monitoring after a transient NotAllowedError (#2417)
Follow-up to #1162.

### Problem

In Chromium, a single `NotAllowedError` from
`navigator.clipboard.read()` stops local-to-remote clipboard sync until
the page is reloaded.

#1162 added a safety net that stops the 100 ms monitoring loop on the
first `NotAllowedError`, assuming it means the permission is denied or
user activation is missing. The issue is that **Chromium also uses it
for transient failures**.

`read()` checks the focus, requests the permission asynchronously, then
[checks the focus
again](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/clipboard/clipboard_promise.cc).
If the focus was lost in between, the read is rejected with `Document is
not focused.`, even with the permission granted. Switching windows at
the wrong moment is enough to cause this behavior.

The loop also never restarted, so allowing the permission again after
blocking it still required a reload, even within the same session.

### Solution

On `NotAllowedError`:

- Page unfocused, or the `clipboard-read` permission `granted`: the
failure is transient. Report it like any other monitoring error and
**keep polling**.
- Otherwise (`denied`, `prompt`, or the query fails, e.g. Firefox): stop
as before, and start again when the `PermissionStatus` `change` event
reports `granted`. `stopMonitoring()` (session end, `dispose()`) removes
that listener.

The safety net still keeps a denied permission from failing every 100
ms.

### Testing

- Unit tests in `clipboardMonitoring.test.ts` cover: the permission
granted, the page unfocused, granted later, unknown, and no restart
after monitoring stops.
- Manually in Chrome:
  - Clipboard allowed → Block → Allow: sync resumes without a reload.
- `document.hasFocus = () => true` in DevTools, then click into
DevTools: the error is logged once and monitoring continues.
- Clipboard reset to Ask, then the same focus loss before answering the
prompt: monitoring continues, and Chrome prompts once the page has the
focus again.
2026-11-12 11:44:39 -05:00
Marc-André Moreau 1fde058cc4 build(web): synchronize npm lockfile (#2364)
Remove the unused optional yaml peer entry that npm 11 prunes during web
installation, keeping the Web Client lockfile check clean.
No declared dependencies or package versions change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-03 16:26:06 -05:00
meanaverage ddcffc42c0 fix(web): keep clipboard state per component (#2345)
The clipboard service stopped its monitoring loop through a module-level
`isComponentDestroyed` store, and queued the clipboard writes that wait
for window focus in a module-level queue. With several components on a
page, destroying one stopped clipboard monitoring for all of them, and
any focus event ran the writes queued by every component.

Each ClipboardService now owns its monitoring timer and its pending
focus write (only the latest remote clipboard content is kept).
Monitoring stops when the session ends (the new
`sessionEndedObservable`), whether it was shut down or its run()
returned, and starts again with the next session. A destroyed component
disposes its clipboard service, cancels its delayed resize, and doesn't
dispatch `ready` if it was destroyed while initializing.

The service forgets the session as it ends: `shutdown()` before shutting
it down, so an asynchronous clipboard read can't reach it afterwards,
and run() once it returns, so resize, clipboard and input calls after
that do nothing. A clipboard write made while the window has the focus
now runs a microtask later, and a failed one is logged instead of left
unhandled. The public API is unchanged.
2026-11-03 09:39:00 -05:00
Marc-André Moreau fedaf9474b fix(connector): redact secrets in Credentials and SmartCardIdentity Debug (#2266)
Derived `Debug` implementations on `Credentials` and `SmartCardIdentity`
formatted passwords, smart card PINs, certificates, and private keys
directly when connector configurations or credentials were logged.

Implement custom `fmt::Debug` for `Credentials` that replaces `password`
and `pin` with `"<redacted>"`, and for `SmartCardIdentity` that logs
`certificate_len` and `private_key_len` instead of raw DER bytes. Also
clear the default password in the Svelte login form.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-27 19:20:51 -04:00
Benoît Cortier d78599f78f chore(agents): align instructions and skills (#2252)
Keep repository guidance accurate and concise, refresh shared skills
from Gateway, and expose every skill through an individual Claude
symlink.
Omit redundant opening titles and synchronize the authoring and review
rules that prevent them.
Remove redundant skill-discovery and synchronization boilerplate from
the root instructions.
2026-10-28 00:20:52 +09:00
Benoît Cortier 0c7e3abfb3 feat(rdcleanpath): add reason error codes (#2127)
An RDCleanPath error PDU carries a general error code next to an HTTP
status, WSA error or TLS alert, so a client cannot tell why a proxy
rejected a connection: an expired credential and a misconfigured one
both arrive as HTTP 401.

Split the open `error_code` space into ranges, specified in the crate
README:

- 100 to 16383: standard reasons, for conditions any client can explain
without knowing which proxy it talks to. This adds `EXPIRED_ERROR_CODE`,
`NOT_YET_VALID_ERROR_CODE`, `REVOKED_ERROR_CODE`,
`TARGET_UNREACHABLE_ERROR_CODE`, `DNS_RESOLUTION_FAILED_ERROR_CODE` and
`TLS_HANDSHAKE_FAILED_ERROR_CODE` (100 to 105), which `Display`
describes.
- 16384 to 32767 (`IMPLEMENTATION_SPECIFIC_ERROR_CODES`): reasons each
proxy defines for checks tied to its own credential format or topology.
IronRDP never assigns these, and a client interprets them only when it
knows which proxy it talks to.
- 32768 and above stay reserved, so that independent implementations
storing the code as a signed 16-bit integer can represent every code in
use.

The web client exposes the code as `RDCleanPathDetails.errorCode`, and
`@devolutions/iron-remote-desktop-rdp` exports the standard codes as
`RDCleanPathErrorCode`.

The reason travels in the existing `error_code` field, not in a new one.
A new error field would follow the last one, `[3]`, and IronRDP-based
peers decode RDCleanPath with der's derived decoder, which rejects
unknown fields at the end of a SEQUENCE with `TrailingData` despite the
context-specific tags: deployed IronRDP clients would fail to decode
error PDUs carrying it. Deployed IronRDP clients decode any code, show
an unknown one as an unknown error, and still read the HTTP status, WSA
error and TLS alert, which proxies keep sending alongside the reason.
The native client and the FFI already treat any code other than the
negotiation one as a general error, so they need no change.

Proxies can send these codes with any version, since `error_code` is a
plain integer. The constants and the web client's `errorCode` need
releases of ironrdp-rdcleanpath and the web packages; the Devolutions
Gateway follow-up, which will use the standard codes and its own
implementation-specific ones, needs the crates.io release. That release
also carries the der 0.8 upgrade already on master, which is breaking
because the crate re-exports `der`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:29:44 -04:00
Benoît Cortier d1d8e4fd13 chore(agents): adopt shared Rust style and test skills (#2131)
AGENTS.md now holds only policy that no tool enforces and that an agent
would not find on its own path. The first pass dropped content
discoverable from the tree or covered by a skill or `STYLE.md`: the role
preamble, the generic workflow, file and directory listings, xtask
command lists, the copy of the style rules, and a stale list of crates
missing from `ARCHITECTURE.md`. A review pass then moved rules to where
they trigger. Comment wrapping and test-module placement went to
`rust-style`. The dependency policies went to `public-dependency`. The
`iron-remote-desktop` base-API rule went to nested `AGENTS.md` files
next to its TypeScript and Rust definitions. It dropped rules already
stated by `ARCHITECTURE.md`, `protocol-reviewer`, or root `Cargo.toml`
comments. It also added a pointer to the testsuite crates and a warning
that synced skills are overwritten from Devolutions Gateway. The file
goes from 155 to 35 lines.

`STYLE.md` now extends the sentence-per-line rule to code comments and
doc comments. Devolutions Gateway and picky-rs vendor this file and will
re-sync it.

New skills, mirrored from Devolutions Gateway and added to the weekly
sync list:

- `rust-style`: everyday Rust rules from `STYLE.md`.
- `rust-style-reviewer`: fresh-context style review of changed Rust
lines, now run by `code-review`.
- `test-oracle-reviewer`: checks that a test's expected value is
independent of the code under test.
- `test-pruner`: prunes and strengthens tests with oracle classification
and cargo-mutants evidence.

The sync list also gains the remaining generic Devolutions Gateway
skills. `tdd` and its closure (`grill-intent`, `intent-files`,
`variants`) are dependencies of the synced `test-writer`,
`test-reviewer`, and `test-pruner`. The `contribute` flow brings `lead`,
`orchestrate-effort`, `review-feedback-loop`, `blind-testsuite`,
`contract-review`, `dependency-pruner`, `dependency-reviewer`,
`intent-drift-audit`, and `intent-review`. Intent and skill authoring
brings `agents-md`, `agents-md-review`, `contract-authoring`, and
`skill-discipline`. `code-review` now runs `intent-drift-audit`,
`intent-review`, `contract-review`, `test-reviewer`, and
`dependency-reviewer` when their conditions apply.

Claude Code discovers project skills only under `.claude/skills` and
reads only `CLAUDE.md`, so `.claude/skills` links to `.agents/skills`
and `CLAUDE.md` links sit beside both nested `AGENTS.md` files, as the
root one already does.

`AGENTS.md` now tells agents to start a work session with `/contribute`,
which picks the delivery flow by scale and the skills each step needs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-21 14:47:46 -04:00
MuNeNiCK 860cf6ccb1 feat(web): support WebSocket subprotocols (#1970) 2026-10-21 07:36:37 +00:00
Jérémie Laval 27d1571a01 feat(web): expose Standard RDP Security to web clients using trusted RDCleanPath transports (#2004) 2026-10-08 20:22:24 +09:00
meanaverage e258f6a06b fix(web): dispatch the ready event after clipboard initialization (#2018)
`<iron-remote-desktop>` dispatches `ready` at the end of `initcanvas()`,
but `onMount` only then runs `await clipboardService.initClipboard()`.
That awaits `navigator.permissions.query({ name: 'clipboard-read' })`
before installing the clipboard callbacks, and
`RemoteDesktopService.connect()` only registers
`remoteClipboardChangedCallback` / `forceClipboardUpdateCallback` on the
session builder when those callbacks are installed.

So a host that connects as soon as `ready` fires gets a session with no
CLIPRDR channel, and the clipboard silently doesn't work.
iron-svelte-client connects after the user clicks, which hides the race.

With this commit:
- `ready` is dispatched from `onMount` after `initClipboard()` settles.
If clipboard initialization throws, the error is logged and `ready`
still fires.
- Test setup: mounting a Svelte component under vitest needs Svelte's
browser build, so `vite.config.ts` sets `resolve.conditions:
['browser']` when `VITEST` is set. It also skips vite-plugin-svelte's
style preprocessing in that case: the plugin (5.x, for Vite 6) crashes
in `preprocessCSS` under vitest 2's bundled Vite 5. The component's
styles are plain CSS. Builds are unchanged.

Co-authored-by: meanaverage <18336095+meanaverage@users.noreply.github.com>
2026-10-01 08:31:05 +00:00
Sébastien Duquette 819b7ade82 chore(web): set a 24h npm dependency cooldown (#1984) 2026-09-30 23:32:06 +09:00
ZERO 9bbd48fe02 feat(web): expose enable_server_pointer from the WASM module (#1914)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 00:56:25 +00:00
Marc-André Moreau 40b4aa4a2a fix(web): add legacy_graphics session extension for Win7 servers (#1859)
Extracted from cxxzhang's #1408.

Win7-class servers reject the web client's enhanced graphics path.
The JS `legacy_graphics` SessionBuilder extension, default false,
switches BitmapConfig to 32-bpp lossless bitmaps, empty codecs, and
no bulk compression. Empty codecs are the BitmapConfig option that
lets the connector skip SurfaceCommands once that gating lands.

This is one of three independent follow-ups from #1408. It pairs
with the connector surface-capability gating PR but does not depend
on that PR being merged first.

The default enhanced web path is unchanged: 16-bpp, lossy codecs,
and compression_type None.

Co-authored-by: zhangshuangjun <zhangshuangjun@leagsoft.com>

Co-authored-by: zhangshuangjun <zhangshuangjun@leagsoft.com>
2026-09-01 09:15:05 -04:00
irvingouj@Devolutions 5c1816244e feat(rdcleanpath): support Hyper-V connection ordering (#1505)
Hyper-V over RDCleanPath needs PCB → TLS on the proxy, then CredSSP →
X.224 on the client. Ordinary RDCleanPath stays X.224-first.

Still VERSION_1 with the same DER fields. An explicit VMConnect request
carries a Unicode PCB payload in `preconnection_blob` with no X.224; the
proxy encodes the binary PCB. Generic PCB requests keep their existing
X.224-first behavior.

Gateway reference implementation:
[Devolutions/devolutions-gateway#1372](https://github.com/Devolutions/devolutions-gateway/pull/1372)

Checked locally: Rust builds, formatting, Svelte typecheck, and .NET
build. Real nested Hyper-V E2E through Gateway: Native rendered 18
frames, Avalonia connected and rendered its first frame, and Web
rendered a non-empty 1280×720 canvas.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
2026-08-11 11:42:17 -04:00
Gabriel Bauman af2706d093 feat(web): add pluggable storage backends for RDP file downloads (#1221)
Adds a pluggable download storage layer to `iron-remote-desktop-rdp` so large RDP file downloads can stream to persistent storage (OPFS) instead of buffering all chunks in RAM, while keeping a universal in-memory Blob fallback.
2026-06-23 18:52:05 +00:00
Yuval Marcus f12bbce550 feat(web): supersede a stuck upload and complete zero-byte files (#1381)
Updates the web `RdpFileTransferProvider` (in `iron-remote-desktop-rdp`) to make uploads more resilient: starting a new upload now supersedes any in-progress batch, and empty (0-byte) files can complete without ever receiving a RANGE request, preventing the provider’s `uploadState` from becoming stuck.
2026-06-23 18:22:54 +00:00
Yuval Marcus 356d06e52a fix(web): recover file-upload state when a paste is interrupted or never pulled (#1372) 2026-06-24 00:56:39 +09:00
Benoît Cortier e45f68c7e5 fix(web-client): add repository metadata to published package.json (#1323)
npm's sigstore provenance verification rejected publishing with:

    E422 Unprocessable Entity - Error verifying sigstore provenance
    bundle: "repository.url" is "", expected to match
    "https://github.com/Devolutions/IronRDP" from provenance

Add `repository`, `homepage`, `bugs`, and `license` fields to the
`public/package.json` of both `iron-remote-desktop` and
`iron-remote-desktop-rdp` so the published tarballs satisfy npm's
provenance checks.
2026-05-27 12:22:19 +00:00
Benoît Cortier 1f39e3540d chore(release): prepare web packages for publishing (#1312)
* iron-remote-desktop v0.11.0
* iron-remote-desktop-rdp v0.7.0
2026-05-26 14:38:42 +00:00
Eitvilas 0bbffcd0ec fix(web): include Meta keys in WebKit scancode dispatch (#1304) 2026-05-25 11:27:04 +00:00
Krista House c56ea16d05 fix(remote-desktop): resolve Firefox stuck right-click via mouse state reconciliation (#1297)
### Summary

Fixed a Firefox-specific issue where right-clicking inside the remote
desktop canvas could leave the server-side right mouse button state
stuck as pressed.

### Changes
**Input cleanup**
- `onmouseleave` now releases all active inputs through `mouseOut()`
- Added `focusLost()` handling for:
  - window `blur`
  - document `visibilitychange`
- This ensures inputs are released when the user leaves the canvas,
switches tabs, or the browser loses focus

**Mouse state reconciliation**
Updated `mouseIn()` to compare e`vent.buttons` against tracked
server-side button state.
If the browser no longer reports a button as held, the service releases
it server-side.

This covers:
1. left button
2. right button
3. middle button

Releases are batched into a single `applyInputs` call.

**Listener cleanup**
- Hoisted `captureKeys` so it can be properly removed
- `onDestroy` now removes:
  - keydown
  - keyup
  - blur
  - visibilitychange

**Tests**
Added `mouseInput.test.ts` covering:
- `mouseOut`
- `focusLost`
- `mouseIn` reconciliation
- missing-session guards
- release batching
- no-op behavior when no release is required
2026-05-22 16:21:37 -04:00
Matthew Johnson 14b1cef9cb feat(rdpdr): add Web RDPDR virtual printer support (#1230)
Adds RDPDR virtual printer redirection for web sessions, enabling the web client to announce a redirected printer, receive server print jobs over RDPDR, and deliver completed PostScript jobs to a browser callback.
2026-05-04 06:51:59 +00:00
Gabriel Bauman c98a8fb774 feat(cliprdr,web,ffi): implement clipboard file transfer support (#1166)
Add end-to-end clipboard file transfer (upload and download) across the
CLIPRDR channel per MS-RDPECLIP.
2026-04-09 14:53:39 +09:00
Benoît Cortier 9bb909eca2 docs: document iron-remote-desktop API design philosophy (#1192)
The core rule is: a method belongs in the base API (UserInteraction /
Session / SessionBuilder) if the web component itself needs to call it
for transparent behaviour, or if the feature is universal across all
remote protocol backends. Protocol-specific concepts must go through the
extension mechanism instead.
2026-03-31 14:35:13 +00:00
Yuval Marcus 9a1ac3092e fix(web): disable clipboard polling loop on Firefox v127+ (#1162) 2026-03-12 00:47:40 +09:00
Gabriel Bauman 2911124e8f feat(web): expose granular RDCleanPath error details (#1117)
Add RDCleanPathDetails struct to provide detailed error information for
RDCleanPath errors, including HTTP status codes, WSA error codes, and
TLS alert codes.

Allows the web client to distinguish between different types of network
errors (say, WSAEACCES/10013) instead of showing a generic RDCleanpath
error message.
2026-02-22 17:03:59 +09:00
Alex Yusiuk cca53fd79b chore(web): bump iron-remote-desktop to 0.10.1 (#1011) 2025-10-07 06:47:11 -04:00
Alex Yusiuk da38fa20a3 chore(web): bump iron-remote-desktop-rdp to 0.6.1 (#1012) 2025-10-07 06:46:35 -04:00
Alex Yusiuk 6127e13c83 fix(web): fix this.lastSentClipboardData being nulled (#992)
```js
await this.remoteDesktopService.onClipboardChanged(...)
```
Consumes the clipboard data we pass, so we need to clone the data to
prevent `this.lastSentClipboardData` from being null.
2025-09-24 08:49:32 +00:00
Alex Yusiuk ac2964d406 fix(web): send first clipboard only after the connection is established (#996)
Fix a bug where, when the clipboard is in automatic mode,
`iron-remote-desktop` could send the first clipboard PDU to
the server before the connection is established.
This packet was ignored, and the clipboard on the server
not synced with the current host's clipboard.
2025-09-24 02:02:21 -04:00
Alex Yusiuk c1fcf7a0c3 chore(release): prepare for iron-remote-desktop v0.10.0 (#991) 2025-09-19 11:53:55 +00:00
Alex Yusiuk 6c0014d5b3 fix(web)!: rework error handling (#975)
Improves the error handling in _iron-remote-desktop_ by
replacing the session events with throwing errors for terminated and
error events and callbacks for warnings and the clipboard remote update
event.
2025-09-19 11:05:20 +00:00
Alex Yusiuk 729ecf965e feat(web): add warning for clipboard unavailability in non-secure context (#959) 2025-09-02 07:15:43 -04:00
Alex Yusiuk cd2f25f97a chore(release): release iron-remote-desktop 0.9.0 (#957) 2025-09-01 06:55:27 -04:00
Alex Yusiuk 6b626d4fca fix(web): implement text-only clipboard for outdated versions of Firefox browser (#951)
Firefox versions before v127 do not support the write() method - only
writeText(). Therefore, the Extended Clipboard checkbox must be
automatically disabled.
2025-09-01 09:46:24 +00:00
Alex Yusiuk d31291362c style(web): follow-up to PR #935 (#955) 2025-08-29 14:46:10 +00:00
Alex Yusiuk 23c0cc2c36 feat(web)!: extend DeviceEvent.wheelRotations event to support passing rotation units other than pixels (#952) 2025-08-29 14:10:22 +00:00
Benoît Cortier 5d0c74df91 chore(release): prepare web packages for publishing (#950)
* iron-remote-desktop v0.8.0
* iron-remote-desktop-rdp v0.5.0
2025-08-29 07:30:03 +03:00
Alex Yusiuk 5b948e2161 fix(web)!: replace current clipboard logic with auto and manual clipboard modes (#935)
Adds:
- auto clipboard mode. 
  When it's enabled, the clipboard will be automatically monitored for
  changes, and updates from the server will be automatically saved to the
  local clipboard (this is the old logic; nothing has changed).
- manual clipboard mode. 
  One calls dedicated functions to interact with the clipboard.
2025-08-28 22:07:58 -04:00
Alex Yusiuk cec3fa70fc refactor(web): raise TERMINATED event on connection error (#944)
This PR changes the session to not return an error on the connection
stage. The `iron-remote-desktop` raises `TERMINATED` instead of `ERROR`,
because `ERROR` is now handled as non-critical and does not close the
session.
2025-08-28 06:33:31 -04:00