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.
Iron Remote Desktop
This is the core of the web client written on top of Svelte and built as a reusable Web Component.
Also, it contains the TypeScript interfaces exposed by WebAssembly bindings from ironrdp-web and used by iron-svelte-client.
Development
Make you modification in the source code then use iron-svelte-client to test.
Build
Run npm run build
Usage
As member of the Devolutions organization, you can import the Web Component from JFrog Artifactory by running the following npm command:
$ npm install @devolutions/iron-remote-desktop
Otherwise, you can run npm install targeting the dist/ folder directly.
Import the iron-remote-desktop.umd.cjs from node_modules/ folder.
Then use the HTML tag <iron-remote-desktop/> in your page.
In your code add a listener for the ready event on the iron-remote-desktop HTML element.
Get evt.detail.irgUserInteraction from the Promise, a property whose type is UserInteraction.
Call the connect method on this object.
Limitations
For now, we didn't make the enums used by some method directly available (I didn't find the good way to export them directly with the component.). You need to recreate them on your application for now (it will be improved in future version);
Also, even if the connection to RDP work there is still a lot of improvement to do.
As of now, you can expect, mouse movement and click (4 buttons) - no scroll, Keyboard for at least the standard.
Windows and CTRL+ALT+DEL can be called by method on UserInteraction.
Lock keys (like caps lock), have a partial support.
Other advanced functionalities (sharing / copy past...) are not implemented yet.
Component parameters
You can add some parameters for default initialization on the component <iron-remote-desktop />.
Note that due to a limitation of the framework all parameters need to be lower-cased.
scale: The scaling behavior of the distant screen. Can befit,realorfull. Default isreal;verbose: Show logs fromiron-remote-desktop.trueorfalse. Default isfalse.debugwasm: Show debug info from web assembly. Can be"OFF","ERROR","WARN","INFO","DEBUG","TRACE". Default is"OFF".flexcentre: Helper to forceiron-remote-desktopa flex and centering the content automatically. Otherwise, you need to manage manually. Default istrue.module: An implementation of the RemoteDesktopModule
UserInteraction methods
connect(
username: string,
password: string,
destination: string,
proxyAddress: string,
serverDomain: string,
authToken: string,
desktopSize?: DesktopSize,
preConnectionBlob?: string,
kdc_proxy_url?: string,
use_display_control: boolean,
): Observable<NewSessionInfo>;
usernameandpasswordare the credentials to use on the remote host.
destinationrefers to the Devolutions Gateway hostname and port.
proxyAddressis the address of the Devolutions Gateway proxy
serverDomainis the Windows domain name (if the target computer has one)
authtokenis the authentication token to send to the Devolutions Gateway.
desktopSizeis the initial size of the desktop
preConnectionBlobis the pre connection blob data
kdc_proxy_urlis the URL to a KDC Proxy, as specified in MS-KKDCP documentation
use_display_controlis the value that defined if the Display Control Virtual Channel will be used.
ctrlAltDel()Sends the ctrl+alt+del key to server.
metaKey()Sends the meta key event to remote host (i.e.: Windows key).
setVisibility(value: boolean)Shows or hides rendering canvas.
setScale(scale: ScreenScale)Sets the scale behavior of the canvas. See the ScreenScale enum for possible values.
shutdown()Shutdowns the active session.
setKeyboardUnicodeMode(use_unicode: boolean)Sets the keyboard Unicode mode.
setCursorStyleOverride(style?: string)Overrides the default cursor style. If
styleisnull, the default cursor style will be used.
resize(width: number, height: number, scale?: number)Resizes the screen.
setEnableClipboard(enable: boolean)Enables or disable the clipboard based on the
enablevalue.