mirror of
https://github.com/netbirdio/IronRDP.git
synced 2026-05-22 18:43:12 -07:00
fix(web-client): paths to web crate and unsupported call (#128)
Co-authored-by: Benoît CORTIER <bcortier@proton.me>
This commit is contained in:
co-authored by
Benoît CORTIER
parent
20e6025c6c
commit
36a210aae9
@@ -10,6 +10,7 @@ repository.workspace = true
|
||||
authors.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
default-run = "ironrdp-client"
|
||||
|
||||
[features]
|
||||
default = ["rustls"]
|
||||
|
||||
@@ -350,11 +350,10 @@ fn build_config(
|
||||
.unwrap_or(0)
|
||||
.pipe(u32::try_from)
|
||||
.unwrap(),
|
||||
client_name: "IronRDP Web".to_owned(), // FIXME: in native clients, this is the client machine hostname
|
||||
client_dir: std::env::current_dir()
|
||||
.expect("current directory")
|
||||
.to_string_lossy()
|
||||
.into_owned(),
|
||||
client_name: "IronRDP Web".to_owned(), // FIXME: in native clients, this is the client machine hostname. Should we use the browser user agent here?
|
||||
// NOTE: hardcode this value like in freerdp
|
||||
// https://github.com/FreeRDP/FreeRDP/blob/4e24b966c86fdf494a782f0dfcfc43a057a2ea60/libfreerdp/core/settings.c#LL49C34-L49C70
|
||||
client_dir: "C:\\Windows\\System32\\mstscax.dll".to_owned(),
|
||||
platform: ironrdp::pdu::rdp::capability_sets::MajorPlatformType::Unspecified,
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@devolutions/iron-remote-gui",
|
||||
"version": "0.5.0",
|
||||
"version": "0.6.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@devolutions/iron-remote-gui",
|
||||
"version": "0.5.0",
|
||||
"version": "0.6.0",
|
||||
"dependencies": {
|
||||
"@types/ua-parser-js": "^0.7.36",
|
||||
"ua-parser-js": "^1.0.33"
|
||||
|
||||
@@ -19,4 +19,4 @@ let run = async function (command, cwd) {
|
||||
})
|
||||
}
|
||||
|
||||
await run('wasm-pack build --target web', '../../crates/web');
|
||||
await run('wasm-pack build --target web', '../../crates/ironrdp-web');
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface UserInteraction {
|
||||
|
||||
setScale(scale: ScreenScale);
|
||||
|
||||
connect(username: string, password: string, hostname: string, gatewayAddress: string, domain: string, authToken: string): Observable<NewSessionInfo>;
|
||||
connect(username: string, password: string, destination: string, proxyAddress: string, serverDomain: string, authToken: string): Observable<NewSessionInfo>;
|
||||
|
||||
ctrlAltDel();
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ export class PublicAPI {
|
||||
this.wasmService = wasmService;
|
||||
}
|
||||
|
||||
private connect(username: string, password: string, hostname: string, gatewayAddress: string, domain: string, authToken: string): Observable<NewSessionInfo> {
|
||||
private connect(username: string, password: string, destination: string, proxyAddress: string, serverDomain: string, authToken: string): Observable<NewSessionInfo> {
|
||||
loggingService.info('Initializing connection.');
|
||||
return this.wasmService.connect(username, password, hostname, gatewayAddress, domain, authToken);
|
||||
return this.wasmService.connect(username, password, destination, proxyAddress, serverDomain, authToken);
|
||||
}
|
||||
|
||||
private ctrlAltDel() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {BehaviorSubject, from, Observable, of, Subject} from 'rxjs';
|
||||
import init, {DeviceEvent, InputTransaction, ironrdp_init, IronRdpError, Session, SessionBuilder} from '../../../../crates/web/pkg/ironrdp_web';
|
||||
import init, {DeviceEvent, InputTransaction, ironrdp_init, IronRdpError, Session, SessionBuilder} from '../../../../crates/ironrdp-web/pkg/ironrdp_web';
|
||||
import {loggingService} from './logging.service';
|
||||
import {catchError, filter, map} from 'rxjs/operators';
|
||||
import {scanCode} from '../lib/scancodes';
|
||||
@@ -82,11 +82,11 @@ export class WasmBridgeService {
|
||||
}
|
||||
|
||||
|
||||
connect(username: string, password: string, hostname: string, gatewayAddress: string, domain: string, authToken: string): Observable<NewSessionInfo> {
|
||||
connect(username: string, password: string, destination: string, proxyAddress: string, serverDomain: string, authToken: string): Observable<NewSessionInfo> {
|
||||
const sessionBuilder = SessionBuilder.new();
|
||||
sessionBuilder.gateway_address(gatewayAddress);
|
||||
sessionBuilder.hostname(hostname);
|
||||
sessionBuilder.domain(domain);
|
||||
sessionBuilder.proxy_address(proxyAddress);
|
||||
sessionBuilder.destination(destination);
|
||||
sessionBuilder.server_domain(serverDomain);
|
||||
sessionBuilder.password(password);
|
||||
sessionBuilder.auth_token(authToken);
|
||||
sessionBuilder.username(username);
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
"pre-build": "node ./pre-build.js",
|
||||
"pre-build-no-wasm": "node ./pre-build.js no-wasm",
|
||||
"dev": "vite dev",
|
||||
"dev-all": "npm run pre-build && vite dev",
|
||||
"dev-no-wasm": "npm run pre-build-no-wasm && vite dev",
|
||||
"dev-all": "npm run pre-build && vite dev --host",
|
||||
"dev-no-wasm": "npm run pre-build-no-wasm && vite dev --host",
|
||||
"build": "npm run pre-build && vite build",
|
||||
"build-no-wasm": "npm run pre-build-no-wasm && vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
|
||||
Reference in New Issue
Block a user