phirepass-channel 0.1.294 → 0.1.296
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/phirepass-channel.d.ts +14 -0
- package/phirepass-channel.js +31 -3
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -18,6 +18,18 @@ export class Channel {
|
|
|
18
18
|
on_connection_open(cb?: Function | null): void;
|
|
19
19
|
on_protocol_message(cb?: Function | null): void;
|
|
20
20
|
on_protocol_message_type(frame_type: string, cb?: Function | null): void;
|
|
21
|
+
/**
|
|
22
|
+
* Requests an RDP tunnel. Credentials are validated by the agent but are
|
|
23
|
+
* not used to log in: CredSSP runs in the browser's own RDP client, inside
|
|
24
|
+
* the tunnel.
|
|
25
|
+
*
|
|
26
|
+
* Unlike the other protocols this does **not** yield a `TunnelOpened`.
|
|
27
|
+
* The answer is an `RDPAuthorized` frame carrying a `sid` and a single-use
|
|
28
|
+
* `ticket`; the RDP client then opens its own socket at
|
|
29
|
+
* `/api/web/rdp/{node_id}` and presents that ticket in its RDCleanPath
|
|
30
|
+
* request. No tunnel data for an RDP session ever crosses *this* channel.
|
|
31
|
+
*/
|
|
32
|
+
open_rdp_tunnel(node_id: string, service_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
21
33
|
open_sftp_tunnel(node_id: string, service_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
22
34
|
open_ssh_tunnel(node_id: string, service_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
23
35
|
send_sftp_delete(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
|
|
@@ -50,6 +62,7 @@ export enum ErrorType {
|
|
|
50
62
|
export enum Protocol {
|
|
51
63
|
SSH = 0,
|
|
52
64
|
SFTP = 1,
|
|
65
|
+
RDP = 2,
|
|
53
66
|
}
|
|
54
67
|
|
|
55
68
|
export function version(): string;
|
|
@@ -73,6 +86,7 @@ export interface InitOutput {
|
|
|
73
86
|
readonly channel_on_connection_open: (a: number, b: number) => void;
|
|
74
87
|
readonly channel_on_protocol_message: (a: number, b: number) => void;
|
|
75
88
|
readonly channel_on_protocol_message_type: (a: number, b: number, c: number, d: number) => void;
|
|
89
|
+
readonly channel_open_rdp_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
76
90
|
readonly channel_open_sftp_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
77
91
|
readonly channel_open_ssh_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
78
92
|
readonly channel_send_sftp_delete: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -142,6 +142,33 @@ export class Channel {
|
|
|
142
142
|
const len0 = WASM_VECTOR_LEN;
|
|
143
143
|
wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 : addHeapObject(cb));
|
|
144
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Requests an RDP tunnel. Credentials are validated by the agent but are
|
|
147
|
+
* not used to log in: CredSSP runs in the browser's own RDP client, inside
|
|
148
|
+
* the tunnel.
|
|
149
|
+
*
|
|
150
|
+
* Unlike the other protocols this does **not** yield a `TunnelOpened`.
|
|
151
|
+
* The answer is an `RDPAuthorized` frame carrying a `sid` and a single-use
|
|
152
|
+
* `ticket`; the RDP client then opens its own socket at
|
|
153
|
+
* `/api/web/rdp/{node_id}` and presents that ticket in its RDCleanPath
|
|
154
|
+
* request. No tunnel data for an RDP session ever crosses *this* channel.
|
|
155
|
+
* @param {string} node_id
|
|
156
|
+
* @param {string} service_id
|
|
157
|
+
* @param {string | null} [username]
|
|
158
|
+
* @param {string | null} [password]
|
|
159
|
+
* @param {number | null} [msg_id]
|
|
160
|
+
*/
|
|
161
|
+
open_rdp_tunnel(node_id, service_id, username, password, msg_id) {
|
|
162
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
163
|
+
const len0 = WASM_VECTOR_LEN;
|
|
164
|
+
const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
165
|
+
const len1 = WASM_VECTOR_LEN;
|
|
166
|
+
var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
167
|
+
var len2 = WASM_VECTOR_LEN;
|
|
168
|
+
var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
169
|
+
var len3 = WASM_VECTOR_LEN;
|
|
170
|
+
wasm.channel_open_rdp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
171
|
+
}
|
|
145
172
|
/**
|
|
146
173
|
* @param {string} node_id
|
|
147
174
|
* @param {string} service_id
|
|
@@ -366,11 +393,12 @@ export const ErrorType = Object.freeze({
|
|
|
366
393
|
});
|
|
367
394
|
|
|
368
395
|
/**
|
|
369
|
-
* @enum {0 | 1}
|
|
396
|
+
* @enum {0 | 1 | 2}
|
|
370
397
|
*/
|
|
371
398
|
export const Protocol = Object.freeze({
|
|
372
399
|
SSH: 0, "0": "SSH",
|
|
373
400
|
SFTP: 1, "1": "SFTP",
|
|
401
|
+
RDP: 2, "2": "RDP",
|
|
374
402
|
});
|
|
375
403
|
|
|
376
404
|
/**
|
|
@@ -461,7 +489,7 @@ function __wbg_get_imports() {
|
|
|
461
489
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
462
490
|
return addHeapObject(ret);
|
|
463
491
|
}, arguments); },
|
|
464
|
-
|
|
492
|
+
__wbg_info_9b9ea1f18c57361f: function(arg0, arg1) {
|
|
465
493
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
466
494
|
},
|
|
467
495
|
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
@@ -533,7 +561,7 @@ function __wbg_get_imports() {
|
|
|
533
561
|
__wbg_set_onopen_4f65470ae522a61a: function(arg0, arg1) {
|
|
534
562
|
getObject(arg0).onopen = getObject(arg1);
|
|
535
563
|
},
|
|
536
|
-
|
|
564
|
+
__wbg_warn_79b294b9866d9034: function(arg0, arg1) {
|
|
537
565
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
538
566
|
},
|
|
539
567
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
Binary file
|