phirepass-channel 0.1.294 → 0.1.295
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 +33 -3
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ export class Channel {
|
|
|
20
20
|
on_protocol_message_type(frame_type: string, cb?: Function | null): void;
|
|
21
21
|
open_sftp_tunnel(node_id: string, service_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
22
22
|
open_ssh_tunnel(node_id: string, service_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
23
|
+
/**
|
|
24
|
+
* VNC takes no credentials: the RFB password challenge is answered by the
|
|
25
|
+
* browser's VNC client inside the tunnel itself.
|
|
26
|
+
*/
|
|
27
|
+
open_vnc_tunnel(node_id: string, service_id: string, msg_id?: number | null): void;
|
|
23
28
|
send_sftp_delete(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
|
|
24
29
|
/**
|
|
25
30
|
* Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
|
|
@@ -34,6 +39,12 @@ export class Channel {
|
|
|
34
39
|
send_sftp_upload_start(node_id: string, sid: number, filename: string, remote_path: string, total_chunks: number, total_size: bigint, msg_id?: number | null): void;
|
|
35
40
|
send_ssh_terminal_resize(node_id: string, sid: number, cols: number, rows: number, px_width: number, px_height: number): void;
|
|
36
41
|
send_ssh_tunnel_data(node_id: string, sid: number, data: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Takes bytes rather than a string (unlike [`Channel::send_ssh_tunnel_data`]):
|
|
44
|
+
* RFB client messages are binary and would not survive a UTF-8 round trip.
|
|
45
|
+
* `Vec<u8>` arrives from JS as a `Uint8Array` with no re-encoding.
|
|
46
|
+
*/
|
|
47
|
+
send_vnc_tunnel_data(node_id: string, sid: number, data: Uint8Array): void;
|
|
37
48
|
start_heartbeat(interval_as_millis: number): void;
|
|
38
49
|
stop_heartbeat(): void;
|
|
39
50
|
update_service(node_id: string, service_id: string, kind: string, name: string | null | undefined, host: string, port: number, username?: string | null, password?: string | null, visibility?: string | null, scheme?: string | null, msg_id?: number | null): void;
|
|
@@ -50,6 +61,7 @@ export enum ErrorType {
|
|
|
50
61
|
export enum Protocol {
|
|
51
62
|
SSH = 0,
|
|
52
63
|
SFTP = 1,
|
|
64
|
+
VNC = 2,
|
|
53
65
|
}
|
|
54
66
|
|
|
55
67
|
export function version(): string;
|
|
@@ -75,6 +87,7 @@ export interface InitOutput {
|
|
|
75
87
|
readonly channel_on_protocol_message_type: (a: number, b: number, c: number, d: number) => void;
|
|
76
88
|
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
89
|
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;
|
|
90
|
+
readonly channel_open_vnc_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
78
91
|
readonly channel_send_sftp_delete: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
79
92
|
readonly channel_send_sftp_download_ack: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
80
93
|
readonly channel_send_sftp_download_chunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
@@ -84,6 +97,7 @@ export interface InitOutput {
|
|
|
84
97
|
readonly channel_send_sftp_upload_start: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint, k: number) => void;
|
|
85
98
|
readonly channel_send_ssh_terminal_resize: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
86
99
|
readonly channel_send_ssh_tunnel_data: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
100
|
+
readonly channel_send_vnc_tunnel_data: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
87
101
|
readonly channel_start_heartbeat: (a: number, b: number) => void;
|
|
88
102
|
readonly channel_stop_heartbeat: (a: number) => void;
|
|
89
103
|
readonly channel_update_service: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -178,6 +178,20 @@ export class Channel {
|
|
|
178
178
|
var len3 = WASM_VECTOR_LEN;
|
|
179
179
|
wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
180
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* VNC takes no credentials: the RFB password challenge is answered by the
|
|
183
|
+
* browser's VNC client inside the tunnel itself.
|
|
184
|
+
* @param {string} node_id
|
|
185
|
+
* @param {string} service_id
|
|
186
|
+
* @param {number | null} [msg_id]
|
|
187
|
+
*/
|
|
188
|
+
open_vnc_tunnel(node_id, service_id, msg_id) {
|
|
189
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
190
|
+
const len0 = WASM_VECTOR_LEN;
|
|
191
|
+
const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
192
|
+
const len1 = WASM_VECTOR_LEN;
|
|
193
|
+
wasm.channel_open_vnc_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
194
|
+
}
|
|
181
195
|
/**
|
|
182
196
|
* @param {string} node_id
|
|
183
197
|
* @param {number} sid
|
|
@@ -308,6 +322,21 @@ export class Channel {
|
|
|
308
322
|
const len1 = WASM_VECTOR_LEN;
|
|
309
323
|
wasm.channel_send_ssh_tunnel_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1);
|
|
310
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* Takes bytes rather than a string (unlike [`Channel::send_ssh_tunnel_data`]):
|
|
327
|
+
* RFB client messages are binary and would not survive a UTF-8 round trip.
|
|
328
|
+
* `Vec<u8>` arrives from JS as a `Uint8Array` with no re-encoding.
|
|
329
|
+
* @param {string} node_id
|
|
330
|
+
* @param {number} sid
|
|
331
|
+
* @param {Uint8Array} data
|
|
332
|
+
*/
|
|
333
|
+
send_vnc_tunnel_data(node_id, sid, data) {
|
|
334
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
335
|
+
const len0 = WASM_VECTOR_LEN;
|
|
336
|
+
const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
337
|
+
const len1 = WASM_VECTOR_LEN;
|
|
338
|
+
wasm.channel_send_vnc_tunnel_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1);
|
|
339
|
+
}
|
|
311
340
|
/**
|
|
312
341
|
* @param {number} interval_as_millis
|
|
313
342
|
*/
|
|
@@ -366,11 +395,12 @@ export const ErrorType = Object.freeze({
|
|
|
366
395
|
});
|
|
367
396
|
|
|
368
397
|
/**
|
|
369
|
-
* @enum {0 | 1}
|
|
398
|
+
* @enum {0 | 1 | 2}
|
|
370
399
|
*/
|
|
371
400
|
export const Protocol = Object.freeze({
|
|
372
401
|
SSH: 0, "0": "SSH",
|
|
373
402
|
SFTP: 1, "1": "SFTP",
|
|
403
|
+
VNC: 2, "2": "VNC",
|
|
374
404
|
});
|
|
375
405
|
|
|
376
406
|
/**
|
|
@@ -461,7 +491,7 @@ function __wbg_get_imports() {
|
|
|
461
491
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
462
492
|
return addHeapObject(ret);
|
|
463
493
|
}, arguments); },
|
|
464
|
-
|
|
494
|
+
__wbg_info_126a81f879b26b73: function(arg0, arg1) {
|
|
465
495
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
466
496
|
},
|
|
467
497
|
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
@@ -533,7 +563,7 @@ function __wbg_get_imports() {
|
|
|
533
563
|
__wbg_set_onopen_4f65470ae522a61a: function(arg0, arg1) {
|
|
534
564
|
getObject(arg0).onopen = getObject(arg1);
|
|
535
565
|
},
|
|
536
|
-
|
|
566
|
+
__wbg_warn_a34cc328d5dc529a: function(arg0, arg1) {
|
|
537
567
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
538
568
|
},
|
|
539
569
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
Binary file
|