Commit Graph

143 Commits

Author SHA1 Message Date
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
Alex Yusiuk a996d02a66 fix(web): remove contenteditable=true from top level element (#922)
Setting `contenteditable=true` causes spurious edits of that element
(when pressing dead keys using the BEPO or AZERTY keyboard).
2025-08-26 18:19:20 -04:00
Alex Yusiuk dc6fd0433d fix(web): make check for isUnicodeCharacter in sendKeyboard more strict (#927)
This resolves an issue with Unicode input that happens under Chrome.
where entering `Alt` codes results in broken modifier state and broken
input in general.

This happens because of how _Chrome_ handles `KeyboardEvent` key and
code in this particular case. For example, holding `Alt`, pressing 1, 2,
3 on a numpad, then releasing `Alt` will result in events with the
following key/code values being passed to `sendKeyboard`:
`{ "key": "Alt", "code": "AltLeft" ,"type": "keydown" }`
`{ "key": "1", "code": "Numpad1" ,"type": "keydown" }`
`{ "key": "1", "code": "Numpad1" ,"type": "keyup" }`
`{ "key": "2", "code": "Numpad2" ,"type": "keydown" }`
`{ "key": "2", "code": "Numpad2" ,"type": "keyup" }`
`{ "key": "3", "code": "Numpad3" ,"type": "keydown" }`
`{ "key": "3", "code": "Numpad3" ,"type": "keyup" }`
`{ "key": "{", "code": "AltLeft" ,"type": "keyup" }`

Without this fix, this will send Unicode `{` instead of plain `Alt` to
the RDP server, messing up the `Alt` code sequence and leaving `Al` in
pressed state.

For comparison, in _Firefox_ last event looks like this: `{ "key":
"Alt", "code": "AltLeft","type": "keyup" }`
2025-08-22 03:39:55 -04:00
Gabriel Bauman ac291423de refactor(web): add NegotiationFailure to IronErrorKind (#905)
Adds a general NegotiationFailure to IronErrorKind so that web embedders
can handle failures that occur during protocol negotiation, before
authentication.

Changes:
- RDP errors during the negotiation phase become
IronErrorKind.NegotiationError
- User-friendly RDP negotiation error messages to ironrdp-connector
- Update TypeScript definitions
2025-08-08 04:52:28 -04:00
Benoît Cortier 424e46d225 chore(release): prepare for iron-remote-desktop-rdp v0.5.2 (#901) 2025-07-31 08:23:29 -04:00
Gabriel Bauman 100765f98f feat(web): add outbound WebSocket message size limit extension (#889)
Add support for chunking outbound WebSocket messages when they exceed a
configurable size limit. This helps avoid browser- or proxy-specific
WebSocket message size restrictions while maintaining wire
compatibility.

Changes:
- Add outbound_message_size_limit field to SessionBuilderInner
- Implement extension handler with safe f64->u32 casting and validation
- Update writer_task to chunk large messages when limit is set
- Add outboundMessageSizeLimit() helper function to JavaScript API

---------

Co-authored-by: Benoît Cortier <3809077+CBenoit@users.noreply.github.com>
2025-07-31 11:18:36 +00:00
Benoît Cortier 555894ecc8 chore(release): prepare iron-remote-desktop-rdp v0.5.1 (#883) 2025-07-24 04:23:05 +00:00
Gabriel Bauman 7a0fcce203 feat(web): add enableCredssp extension (#878)
Allows users to disable CredSSP/NLA, which is otherwise enabled by default.
This is necessary to connect to target hosts bound to AzureAD/Entra domains.
In this case, user authentication is handled in the interactive session.
2025-07-23 23:31:11 -04:00
Benoît Cortier 4fc295db4c chore(release): prepare iron-remote-desktop-rdp v0.5.0 (#879) 2025-07-23 08:54:46 +03:00
Alex Yusiuk f7cbb08e2e feat(web): add RdpFile helper to parse RDP configs (#877) 2025-07-22 20:33:37 -04:00
Alex Yusiuk f6fb3a41b3 fix(web): apply correct key codes to scan codes mapping (#866)
The root cause of the bug is the incorrect keycodes-to-scancodes
mappings. These mappings translated the browser's key codes (like
"KeyA") to OS-specific scancode (OS where the browser runs). However,
that's not exactly what we need to do. We need to map the browser's key
codes to _Windows_ scancodes - the only format that is accepted by _VNC_
and _RDP_) modules.
Let's look at an example for a better understanding. _Safari_ browser
used _Linux_'s _Gecko) mappings as a fallback (because there were no
MacOS-specific mappings). For a given key, _iron-remote-desktop_ was
providing a scancode that did not correspond to the _Windows_ scancode
for that same key. As a result, the `IronVNC` module incorrectly mapped
this scancode to a `KeySym`, which resulted in an incorrect `KeySym` or
`NO_SYMBOL`.
2025-07-11 15:08:53 +00:00
Alex Yusiuk 067d80314a chore(release): prepare web packages for publishing (#865)
* iron-remote-desktop v0.7.0
* iron-remote-desktop-rdp v0.4.0
2025-07-11 07:53:22 -04:00
Alex Yusiuk 4dc5945019 fix(web): run navigator.clipboard.write only when window has focus (#858)
When we receive clipboard update from the server and the browser window
is not in focus (for example, when the user copies some text directly on
the machine, not via the browser's VNC viewer), we got an error that
`navigator.clipboard.write` is not allowed when window is not in focus.
This PR adds a window check that the window has focus, and now
`clipboard.write` runs only when the window is in focus.
2025-07-04 11:21:52 +00:00
Alex Yusiuk a84a5c0571 fix(web): prevent onMonitorClipboard from re-scheduling after iron-remote-desktop component destroys (#856) 2025-07-04 05:59:33 -04:00
Alex Yusiuk b0e87a3776 fix(web): fix issue when clipboard monitoring treats clipboard update from server as the local update (#857)
When the server sends the clipboard update, we write it to our
clipboard. But this new clipboard data was then processed as a new one,
so we sent it back to the server. This commit fixes this behavior by
tracking the data that we received from the server.
2025-07-04 05:58:45 -04:00
Benoît Cortier 8bcf362102 chore(release): prepare web packages for publishing (#843)
- iron-remote-desktop v0.6.0
- iron-remote-desktop-rdp v0.3.0
2025-06-27 11:09:06 +03:00
Alex Yusiuk f6285c5989 feat(web): add canvasResizedCallback method to SessionBuilder (#842)
Co-authored-by: Benoît Cortier <3809077+CBenoit@users.noreply.github.com>
2025-06-27 07:55:26 +00:00
Benoît Cortier 7c4a496ece chore(release): prepare web packages for publishing (#840)
- iron-remote-desktop v0.5.4
- iron-remote-desktop-rdp v0.2.3
2025-06-25 16:17:52 +00:00
Alex Yusiuk dfb13ec499 fix(web): prevent scrolling when setting focus on the canvas (#838) 2025-06-24 10:19:42 -04:00
Alex Yusiuk d3d758891b fix(web): raise only TERMINATED message on session termination with the error backtrace (#837) 2025-06-24 10:12:56 -04:00
Alex Yusiuk d38c2013f0 fix(web): keyboard input not working after launching a session via Firefox (#833) 2025-06-23 08:33:23 -04:00
Benoît Cortier 153fe3c20d chore(release): prepare iron-remote-desktop v0.5.3 (#832) 2025-06-20 15:29:52 +00:00
Alex Yusiuk ae3066337f fix(web): move onDestroy function out of the scaleSession function (#831) 2025-06-20 11:11:21 -04:00
Benoît Cortier bfa71126bf chore(release): prepare web packages for publishing (#830)
- iron-remote-desktop v0.5.2
- iron-remote-desktop-rdp v0.2.2
2025-06-20 11:51:35 +00:00
Alex Yusiuk 4f9ef0c21a fix(web): fix invalid viewer style for dynamic resizing (#829) 2025-06-20 07:18:32 -04:00
Alex Yusiuk cd19cfc526 fix(web): fix fullscreen mode scale calculations (#828) 2025-06-20 07:17:19 -04:00
Alex Yusiuk 7829f4adb1 fix(web): hide slider in fullscreen mode (#827) 2025-06-20 07:16:54 -04:00
Alex Yusiuk 4d9cf56e68 fix(web): remove window resize listener on component destroy (#823) 2025-06-20 00:17:56 -04:00