tabby-rdp 0.6.0 → 0.6.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.2
4
+
5
+ **Fixed**
6
+ - FreeRDP desktop tiles with transparent or partially transparent pixels now display their colors opaquely instead of exposing the tab background. Cursor transparency is preserved. Verified with synthetic cached bitmap updates; the reported senhasegura blackout still needs confirmation against that proxy.
7
+
8
+ **Changed**
9
+ - Update the bundled FreeRDP and WinPR libraries to 3.33.0, including upstream security fixes, and the runtime semver dependency to 7.8.6.
10
+
11
+ ## 0.6.1
12
+
13
+ **Added**
14
+ - Clipboard text with the experimental FreeRDP client: both ways, only from the remote desktop, or off, as the clipboard setting (or a desktop's own) says. As with IronRDP, this computer's clipboard is read only while the desktop has the focus, and turning the clipboard off leaves the clipboard channel out of the connection. Unlike IronRDP, view only shares no clipboard in either direction. **Paste to all desktops** includes FreeRDP desktops, with text. Pictures and files on the clipboard still need IronRDP.
15
+ - A default-off **Bitmap caching (experimental)** setting for FreeRDP, next to glyph caching and relaxed drawing order checks, with the same per-connection overrides. It may help a PAM login screen where a picture, such as a logo, stays blank: some proxies draw pictures from cached bitmaps even when the client did not announce support for them. Not yet verified against a PAM proxy.
16
+
17
+ **Fixed**
18
+ - A PAM proxy's bracketed user name, such as senhasegura's `vault-user[DOMAIN\target-user@device]`, now reaches the proxy whole, with both clients ([#122](https://github.com/meanaverage/tabby-rdp/issues/122)). It was split at the backslash inside the brackets, so the proxy received a domain of `vault-user[DOMAIN` and a user name of `target-user@device]`, and couldn't find its target. `DOMAIN\user` is still split as before. With Network Level Authentication, IronRDP's NTLM or Kerberos sign-in still splits such a name at its backslash, and refuses one whose rest still has a `@` or backslash; PAM proxies that route by user name usually sign in without NLA. Not yet verified against a senhasegura proxy.
19
+ - A user name starting with a backslash now names no domain: everything after that backslash is sent as typed, without the domain field. This gives a way to send a proxy's user name that has a backslash outside brackets, such as WALLIX Bastion's `DOMAIN\user@target:login`, without it being split. The leading backslash was previously sent as part of the user name.
20
+
21
+ **Changed**
22
+ - Update build and QA dependencies, including Angular and Node declarations, TypeScript 7 with its compiler-API compatibility package, Playwright, WebSocket test fixtures and standalone Electron checks. These development tools are excluded from plugin installations.
23
+
3
24
  ## 0.6.0
4
25
 
5
26
  **Added**
package/README.md CHANGED
@@ -135,7 +135,7 @@ In an RDP profile tab's **…** menu, choose **RDP client** to switch that profi
135
135
  | Client | Availability | Capabilities |
136
136
  |---|---|---|
137
137
  | IronRDP (default) | macOS, Windows and Linux | The features above, subject to the server's capabilities |
138
- | FreeRDP (experimental) | macOS ARM64; Windows and Linux ARM64/x64 native helpers | In-tab display, keyboard/mouse, scaling, resize, view only, screenshots and reconnect. Clipboard, files, audio, shared folders, Hyper-V and H.264 are pending. |
138
+ | FreeRDP (experimental) | macOS ARM64; Windows and Linux ARM64/x64 native helpers | In-tab display, keyboard/mouse, clipboard text, scaling, resize, view only, screenshots and reconnect. Clipboard pictures and files, file transfer, audio, shared folders, Hyper-V and H.264 are pending. |
139
139
 
140
140
  Windows Server performance has **not been benchmarked**. See [FreeRDP builds, licensing and capability notes](native/README.md).
141
141
  To try the preview, open **Settings › Remote Desktop › Updates**, choose **Preview**, and install the offered version.
package/bin/SHA256SUMS CHANGED
@@ -1,8 +1,8 @@
1
- # The network helpers, built from helper/ with go1.27.1 by scripts/build-helper.mjs (tabby-rdp 0.6.0).
2
- 3c83d313fd03bef1f6f02e60623174e9d27ac33e02fad3d0af6a0573f0146c25 bin/darwin-arm64/tabby-rdp-proxy
3
- 753114f5c52de09178ee00b198d3650dd2a5db6f82507e0d7bfd1494f740e058 bin/darwin-x64/tabby-rdp-proxy
4
- 9ac1faab4d966a419a9f4a08aa37bdee5c49818fc6c711021fc7277d4f02f267 bin/linux-x64/tabby-rdp-proxy
5
- 65501571ef8d617201d95a2020bca72d67c92cb5abbd496869a241f67bd92412 bin/linux-arm64/tabby-rdp-proxy
6
- 578773a71740c8ce7b8bfcfc9f78cdddf9d4fe29691d4bb06bccde8618f45f1a bin/linux-arm/tabby-rdp-proxy
7
- 000d6e32822411284de03ab6d8bf3c8fe759d1443d1eddf76af16feb4cb0c2f2 bin/win32-x64/tabby-rdp-proxy.exe
8
- add72fb59ac12d5896a1e2260ed0a186e6c34024ae753fdcccab4492c0293ff5 bin/win32-arm64/tabby-rdp-proxy.exe
1
+ # The network helpers, built from helper/ with go1.27.1 by scripts/build-helper.mjs (tabby-rdp 0.6.2).
2
+ c96346ac75f72d30af977da250ce42239896b039a45be8d21e51158e39ae694a bin/darwin-arm64/tabby-rdp-proxy
3
+ 17d914f9d63ee861c8165fffb3120be86f4a8dbd6505404eb6009fc0ce4c2345 bin/darwin-x64/tabby-rdp-proxy
4
+ ade60b0aae2224db5ef1f888dfae52000d95f88300248b24c322247700c11752 bin/linux-x64/tabby-rdp-proxy
5
+ 324a3d3b0b5496ac7f03cfe0ab0cf7e897554dc09d9fa58871d6d24bdcab54e2 bin/linux-arm64/tabby-rdp-proxy
6
+ ab11b2dd17a7b97dde3fad19dc45bc9131742be7c6a42fad9102d2a4e32805e3 bin/linux-arm/tabby-rdp-proxy
7
+ 54cdbeeb2655296473ddb15e04319d64f3c3a897bc6ba574a82a69870f8fa891 bin/win32-x64/tabby-rdp-proxy.exe
8
+ 129ddb91e8052c4fa87ba644c189e79c1050631b0eb24d005de4aa8f7f370205 bin/win32-arm64/tabby-rdp-proxy.exe
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/accounts.js CHANGED
@@ -4,6 +4,7 @@ exports.ASK_GATEWAY_ACCOUNT = void 0;
4
4
  exports.accountsOf = accountsOf;
5
5
  exports.newAccountId = newAccountId;
6
6
  exports.signInName = signInName;
7
+ exports.signInParts = signInParts;
7
8
  exports.accountKey = accountKey;
8
9
  /** A separate gateway sign-in prompt. The '@' cannot occur in a saved account's id. */
9
10
  exports.ASK_GATEWAY_ACCOUNT = '@ask';
@@ -36,6 +37,22 @@ function newAccountId(taken) {
36
37
  function signInName(account) {
37
38
  return account.domain && !/[\\@]/.test(account.username) ? `${account.domain}\\${account.username}` : account.username;
38
39
  }
40
+ /**
41
+ * The user name and domain a sign-in goes to the server with, for either client: DOMAIN\user split at its backslash,
42
+ * and any other name as typed, with `domain` (the desktop's) beside it. A PAM proxy's name keeps its backslash inside
43
+ * square brackets (senhasegura's `vault-user[DOMAIN\target-user@device]`) and is read whole by the proxy, which finds
44
+ * its target there, so a name with a bracket before its backslash goes as typed too. A leading backslash names no
45
+ * domain at all (as other RDP clients read it): the rest goes as typed, without one, for a proxy whose name has a
46
+ * backslash of its own outside brackets (WALLIX's `DOMAIN\user@target:login`).
47
+ */
48
+ function signInParts(username, domain) {
49
+ const bare = /^\\(.+)$/.exec(username);
50
+ if (bare) {
51
+ return { username: bare[1], domain: '' };
52
+ }
53
+ const split = /^([^\\[\]]+)\\(.+)$/.exec(username);
54
+ return split ? { username: split[2], domain: split[1] } : { username, domain };
55
+ }
39
56
  /** Where the keychain keeps an account's password (next to the desktops' own entries, which are session keys). */
40
57
  function accountKey(id) {
41
58
  return `account#${id}`;
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.certificateAuthorities = certificateAuthorities;
4
37
  exports.chainStanding = chainStanding;
@@ -15,7 +48,7 @@ exports.vouched = vouched;
15
48
  * pass, and what a certificate says of itself, in words for the user.
16
49
  */
17
50
  const crypto_1 = require("crypto");
18
- const tls = require("tls");
51
+ const tls = __importStar(require("tls"));
19
52
  const unshowable_1 = require("./unshowable");
20
53
  let authorities = null;
21
54
  let systemRead = false;
@@ -1,10 +1,43 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
2
18
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
19
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
20
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
21
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
22
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
23
  };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
8
41
  var __metadata = (this && this.__metadata) || function (k, v) {
9
42
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
43
  };
@@ -15,9 +48,9 @@ exports.installStyle = installStyle;
15
48
  const core_1 = require("@angular/core");
16
49
  const rxjs_1 = require("rxjs");
17
50
  const tabby_core_1 = require("tabby-core");
18
- const fs = require("fs");
19
- const os = require("os");
20
- const path = require("path");
51
+ const fs = __importStar(require("fs"));
52
+ const os = __importStar(require("os"));
53
+ const path = __importStar(require("path"));
21
54
  const net_1 = require("net");
22
55
  const url_1 = require("url");
23
56
  const targets_1 = require("./targets");
@@ -26,6 +59,7 @@ const audio_1 = require("./audio");
26
59
  const ironrdp_1 = require("./ironrdp");
27
60
  const rdpClient_1 = require("./rdpClient");
28
61
  const freerdp_1 = require("./freerdp");
62
+ const freerdpClipboard_1 = require("./freerdpClipboard");
29
63
  const freerdpView_1 = require("./freerdpView");
30
64
  const h264_1 = require("./h264");
31
65
  const clipboard_1 = require("./clipboard");
@@ -2393,6 +2427,7 @@ let RemoteDesktopService = RemoteDesktopService_1 = class RemoteDesktopService {
2393
2427
  headerMinHeight: this.headerSize(store.headerMinHeight),
2394
2428
  client: (0, rdpClient_1.rdpClient)(store.client),
2395
2429
  glyphCache: store.glyphCache === true,
2430
+ bitmapCache: store.bitmapCache === true,
2396
2431
  relaxOrderChecks: store.relaxOrderChecks === true,
2397
2432
  resize: ['live', 'reconnect', 'off'].includes(store.resize) ? store.resize : 'live',
2398
2433
  sharpness: store.sharpness === 'retina' ? 'retina' : 'standard',
@@ -4034,10 +4069,27 @@ let RemoteDesktopService = RemoteDesktopService_1 = class RemoteDesktopService {
4034
4069
  const relaxOrderChecks = spec.relaxOrderChecks ?? this.settingsFor(session).relaxOrderChecks;
4035
4070
  const glyphCache = spec.glyphCache ?? settings.glyphCache;
4036
4071
  session.log.push(`FreeRDP glyph caching: ${glyphCache ? 'enabled (experimental)' : 'disabled'}`);
4072
+ const bitmapCache = spec.bitmapCache ?? settings.bitmapCache;
4073
+ session.log.push(`FreeRDP bitmap caching: ${bitmapCache ? 'enabled (experimental)' : 'disabled'}`);
4037
4074
  session.log.push(`FreeRDP drawing order checks: ${relaxOrderChecks ? 'relaxed' : 'strict'}`);
4038
- session.log.push('FreeRDP preview: clipboard, audio, microphone and shared folders are unavailable');
4039
- session.clipboard = 'off';
4040
- const [domain, username] = /^([^\\]+)\\(.+)$/.exec(endpoint.credentials.username)?.slice(1) ?? [endpoint.domain ?? spec.domain ?? '', endpoint.credentials.username];
4075
+ session.log.push('FreeRDP preview: pictures and files on the clipboard, audio, microphone and shared folders are unavailable');
4076
+ // Text through the clipboard channel, the ways the settings let it go as they are now, for this connection.
4077
+ session.clipboard = settings.clipboard;
4078
+ session.log.push((0, freerdpClipboard_1.freeRDPClipboardLog)(session.clipboard));
4079
+ const clipboard = new freerdpClipboard_1.FreeRDPClipboard({
4080
+ read: () => this.platform.readClipboard(),
4081
+ write: text => this.platform.setClipboard({ text }),
4082
+ send: text => {
4083
+ // Refused: what the helper held before is withdrawn too, so that a paste there doesn't get older text.
4084
+ if (!native.sendClipboardText(text)) {
4085
+ native.sendClipboardText('');
4086
+ session.log.push('clipboard: text larger than 1 MiB, or with a NUL character in it, is not sent');
4087
+ }
4088
+ },
4089
+ narrow: ways => native.narrowClipboard(ways),
4090
+ }, () => this.clipboardWaysOf(session), { focused: () => ui.isFocused(), viewOnly: () => ui.isViewOnly() });
4091
+ ui.clipboardSender = () => clipboard.sendNow();
4092
+ const { username, domain } = (0, accounts_1.signInParts)(endpoint.credentials.username, endpoint.domain ?? spec.domain ?? '');
4041
4093
  const gateway = spec.gateway ? (0, gateway_1.parseGateway)(spec.gateway) : null;
4042
4094
  session.status(`Connecting to ${spec.name} with FreeRDP…`);
4043
4095
  let connected = false;
@@ -4052,6 +4104,9 @@ let RemoteDesktopService = RemoteDesktopService_1 = class RemoteDesktopService {
4052
4104
  autologon: spec.kind === 'xrdp',
4053
4105
  relaxOrderChecks,
4054
4106
  glyphCache,
4107
+ bitmapCache,
4108
+ clipboard: (0, clipboard_1.clipboardWays)(session.clipboard),
4109
+ remoteText: text => clipboard.remote(text),
4055
4110
  open: async (abort) => {
4056
4111
  const stream = gateway ? await this.throughGatewayStream(target, spec, session, gateway, endpoint, abort) : await target.openTcp(endpoint.host, endpoint.port);
4057
4112
  if (abort.aborted) {
@@ -4074,6 +4129,7 @@ let RemoteDesktopService = RemoteDesktopService_1 = class RemoteDesktopService {
4074
4129
  }
4075
4130
  connected = true;
4076
4131
  onConnected(Date.now());
4132
+ clipboard.start();
4077
4133
  session.remoteSize = { ...info, scale: 100 };
4078
4134
  session.graphics = 'FreeRDP native bitmaps';
4079
4135
  ui.setVisibility(session.visible);
@@ -4102,6 +4158,7 @@ let RemoteDesktopService = RemoteDesktopService_1 = class RemoteDesktopService {
4102
4158
  }
4103
4159
  finally {
4104
4160
  signal.removeEventListener('abort', stop);
4161
+ clipboard.stop();
4105
4162
  native.shutdown();
4106
4163
  }
4107
4164
  }
@@ -4197,8 +4254,8 @@ let RemoteDesktopService = RemoteDesktopService_1 = class RemoteDesktopService {
4197
4254
  const settings = this.settingsFor(session);
4198
4255
  const size = session.initialSize ?? remoteSizeFor(session.overlay.getBoundingClientRect(), settings);
4199
4256
  const { width, height } = size;
4200
- // DOMAIN\user or user@domain go to the server as typed; only the former needs splitting.
4201
- const [domain, username] = /^([^\\]+)\\(.+)$/.exec(credentials.username)?.slice(1) ?? [endpoint.domain ?? spec.domain ?? '', credentials.username];
4257
+ // DOMAIN\user is split; user@domain, a PAM proxy's bracketed name and a name after a leading \ go as typed.
4258
+ const { username, domain } = (0, accounts_1.signInParts)(credentials.username, endpoint.domain ?? spec.domain ?? '');
4202
4259
  session.status(spec.id === desktops_1.OWN_DESKTOP ? `Connecting to ${target.label}…`
4203
4260
  : target.direct ? `Connecting to ${spec.name}…` : `Connecting to ${spec.name} via ${target.label}…`);
4204
4261
  // The name the server is signed in to as: the SSH host's for its own desktop, and for its VMs' consoles.
@@ -4368,15 +4425,7 @@ RemoteDesktopService.STABLE_MS = 30000;
4368
4425
  RemoteDesktopService.RECLAIMED_AGAIN_MS = 10 * 60000;
4369
4426
  exports.RemoteDesktopService = RemoteDesktopService = RemoteDesktopService_1 = __decorate([
4370
4427
  (0, core_1.Injectable)({ providedIn: 'root' }),
4371
- __metadata("design:paramtypes", [tabby_core_1.AppService,
4372
- targets_1.RemoteTargets,
4373
- tabby_core_1.NotificationsService,
4374
- tabby_core_1.ConfigService,
4375
- core_1.NgZone,
4376
- tabby_core_1.ProfilesService,
4377
- help_1.RemoteDesktopHelp,
4378
- tabby_core_1.SelectorService,
4379
- tabby_core_1.PlatformService])
4428
+ __metadata("design:paramtypes", [tabby_core_1.AppService, targets_1.RemoteTargets, tabby_core_1.NotificationsService, tabby_core_1.ConfigService, core_1.NgZone, tabby_core_1.ProfilesService, help_1.RemoteDesktopHelp, tabby_core_1.SelectorService, tabby_core_1.PlatformService])
4380
4429
  ], RemoteDesktopService);
4381
4430
  /** A desktop's `who` (see DesktopSession) as compared: in any case for Windows, whose user names and domains are. */
4382
4431
  function whoOf(spec, who) {
@@ -68,6 +68,11 @@ function askDesktop(pane, options) {
68
68
  <option value="on">Enable glyph caching (experimental)</option>
69
69
  <option value="off">Disable glyph caching</option>
70
70
  </select>` + `
71
+ <select class="form-control" name="bitmapCache" aria-label="Bitmap caching (FreeRDP)" title="Experimental bitmap caching for servers or PAM login screens with missing pictures or logos. May cause display artifacts; applies on reconnect.">
72
+ <option value="">Bitmap caching: as in Settings</option>
73
+ <option value="on">Enable bitmap caching (experimental)</option>
74
+ <option value="off">Disable bitmap caching</option>
75
+ </select>` + `
71
76
  <select class="form-control" name="relaxOrderChecks" aria-label="Relax drawing order checks (FreeRDP)" title="For a black screen or unannounced drawing order from a server or PAM proxy. Applies on the next FreeRDP connection.">
72
77
  <option value="">Drawing order checks: as in Settings</option>
73
78
  <option value="on">Relax drawing order checks (FreeRDP)</option>
@@ -98,7 +103,7 @@ function askDesktop(pane, options) {
98
103
  const client = field('client');
99
104
  client.append(new Option('RDP client: as in Settings', ''), ...Object.entries(rdpClient_1.RDP_CLIENT_LABELS).map(([id, label]) => new Option(label, id)));
100
105
  client.value = (0, rdpClient_1.ownRDPClient)(initial.client) ?? '';
101
- for (const key of ['glyphCache', 'relaxOrderChecks']) {
106
+ for (const key of ['glyphCache', 'bitmapCache', 'relaxOrderChecks']) {
102
107
  field(key).value = initial[key] === true ? 'on' : initial[key] === false ? 'off' : '';
103
108
  }
104
109
  // A VM saved from the host's list is xrdp on the host's word (see xrdpFromHost), which is a choice of its own here:
@@ -229,10 +234,12 @@ function askDesktop(pane, options) {
229
234
  client: (0, rdpClient_1.ownRDPClient)(client.value),
230
235
  glyphCache: field('glyphCache').value === 'on' ? true
231
236
  : field('glyphCache').value === 'off' ? false : undefined,
237
+ bitmapCache: field('bitmapCache').value === 'on' ? true
238
+ : field('bitmapCache').value === 'off' ? false : undefined,
232
239
  relaxOrderChecks: field('relaxOrderChecks').value === 'on' ? true
233
240
  : field('relaxOrderChecks').value === 'off' ? false : undefined,
234
241
  };
235
- for (const key of ['username', 'domain', 'account', 'wake', 'gateway', 'gatewayAccount', 'clipboard', 'client', 'glyphCache', 'relaxOrderChecks']) {
242
+ for (const key of ['username', 'domain', 'account', 'wake', 'gateway', 'gatewayAccount', 'clipboard', 'client', 'glyphCache', 'bitmapCache', 'relaxOrderChecks']) {
236
243
  if (entry[key] === undefined) {
237
244
  delete entry[key];
238
245
  }
package/dist/desktops.js CHANGED
@@ -62,7 +62,8 @@ function specOf(extra) {
62
62
  const client = (0, rdpClient_1.ownRDPClient)(extra?.client);
63
63
  const own = { ...clipboard ? { clipboard } : {}, ...client ? { client } : {},
64
64
  ...typeof extra?.relaxOrderChecks === 'boolean' ? { relaxOrderChecks: extra.relaxOrderChecks } : {},
65
- ...typeof extra?.glyphCache === 'boolean' ? { glyphCache: extra.glyphCache } : {} };
65
+ ...typeof extra?.glyphCache === 'boolean' ? { glyphCache: extra.glyphCache } : {},
66
+ ...typeof extra?.bitmapCache === 'boolean' ? { bitmapCache: extra.bitmapCache } : {} };
66
67
  const hyperv = (0, hyperv_1.vmId)(extra?.hyperv);
67
68
  if (hyperv) {
68
69
  return hyperVSpec(hyperv, configText(extra.name) || hyperv, {
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.DiagnosticLog = exports.MAX_BYTES = exports.MAX_LINE = exports.DIAGNOSTIC_LEVELS = void 0;
4
37
  exports.diagnosticLevel = diagnosticLevel;
@@ -15,9 +48,9 @@ exports.logFileName = logFileName;
15
48
  * as its length only (its patch 56), and anything that still looks like a key, a token or a blob of bytes is replaced
16
49
  * with its length here too, so a trace a user hands over carries the shape of the exchange and not its secrets.
17
50
  */
18
- const fs = require("fs");
19
- const os = require("os");
20
- const path = require("path");
51
+ const fs = __importStar(require("fs"));
52
+ const os = __importStar(require("os"));
53
+ const path = __importStar(require("path"));
21
54
  exports.DIAGNOSTIC_LEVELS = ['off', 'debug', 'trace'];
22
55
  function diagnosticLevel(value) {
23
56
  return value === 'debug' || value === 'trace' ? value : 'off';
@@ -1,9 +1,42 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.DiskStorage = exports.DISK_PATH = exports.DownloadBudget = exports.MAX_DOWNLOAD_BYTES = void 0;
4
- const fs = require("fs");
5
- const os = require("os");
6
- const path = require("path");
37
+ const fs = __importStar(require("fs"));
38
+ const os = __importStar(require("os"));
39
+ const path = __importStar(require("path"));
7
40
  /** The provider's supported file-size limit. Files are streamed; this much memory is never reserved. */
8
41
  exports.MAX_DOWNLOAD_BYTES = 2 * 1024 * 1024 * 1024;
9
42
  const HANDLE_PENDING_BYTES = 16 * 1024 * 1024;
package/dist/drives.js CHANGED
@@ -1,11 +1,44 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.SharedDrives = exports.WINDOW_OPEN_FILES = exports.MAX_LISTED = exports.MAX_OPEN_FILES = void 0;
4
37
  exports.sharedFolders = sharedFolders;
5
38
  exports.driveName = driveName;
6
39
  exports.openFilesInWindow = openFilesInWindow;
7
- const fs = require("fs");
8
- const path = require("path");
40
+ const fs = __importStar(require("fs"));
41
+ const path = __importStar(require("path"));
9
42
  const fsp = fs.promises;
10
43
  /** The folders configured, tidied: strings and booleans where expected, no duplicate paths, each with a name. */
11
44
  function sharedFolders(store) {
@@ -1,4 +1,37 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.FileTransfer = exports.STYLE = exports.MIN_COST = exports.MAX_WAITING = exports.MAX_IN_FLIGHT = exports.MAX_RANGE = exports.MAX_LINKS = exports.MAX_LOOKED_AT = exports.MAX_ENTRIES = exports.DiskStorage = void 0;
4
37
  exports.clipboardPaths = clipboardPaths;
@@ -10,9 +43,9 @@ exports.uniquePath = uniquePath;
10
43
  exports.foldersInside = foldersInside;
11
44
  exports.place = place;
12
45
  exports.markDownloaded = markDownloaded;
13
- const fs = require("fs");
14
- const os = require("os");
15
- const path = require("path");
46
+ const fs = __importStar(require("fs"));
47
+ const os = __importStar(require("os"));
48
+ const path = __importStar(require("path"));
16
49
  const child_process_1 = require("child_process");
17
50
  const diskStorage_1 = require("./diskStorage");
18
51
  var diskStorage_2 = require("./diskStorage");
package/dist/freerdp.js CHANGED
@@ -118,7 +118,7 @@ function numbers(...values) {
118
118
  values.forEach((v, i) => out.writeUInt32BE(v >>> 0, i * 4));
119
119
  return out;
120
120
  }
121
- /** The native helper's IPC 4 start message: six strings followed by seven uint32 fields. */
121
+ /** The native helper's IPC 6 start message: six strings followed by nine uint32 fields, the last the clipboard's ways. */
122
122
  function freeRDPStart(options, relay) {
123
123
  const strings = [options.host, options.username, options.password, options.domain, '', relay.token];
124
124
  const fields = strings.map(value => {
@@ -128,7 +128,7 @@ function freeRDPStart(options, relay) {
128
128
  const text = Buffer.from(value);
129
129
  return Buffer.concat([numbers(text.length), text]);
130
130
  });
131
- return Buffer.concat([...fields, numbers(relay.port, options.width, options.height, +options.pipeline, +!!options.autologon, +!!options.relaxOrderChecks, +!!options.glyphCache)]);
131
+ return Buffer.concat([...fields, numbers(relay.port, options.width, options.height, +options.pipeline, +!!options.autologon, +!!options.relaxOrderChecks, +!!options.glyphCache, +!!options.bitmapCache, (options.clipboard?.toRemote ? 1 : 0) | (options.clipboard?.fromRemote ? 2 : 0))]);
132
132
  }
133
133
  /** Only a process holding the per-attempt token can open the SSH channel or gateway connection. */
134
134
  async function freeRDPRelay(open) {
@@ -326,6 +326,9 @@ class FreeRDPProcess {
326
326
  else if (type === 'F') {
327
327
  options.frame(decodeNativeFrame(data));
328
328
  }
329
+ else if (type === 'T') {
330
+ options.remoteText?.(data.toString('utf8'));
331
+ }
329
332
  else if (type === 'B' && data.length === 0) {
330
333
  this.frameCount++;
331
334
  }
@@ -356,7 +359,7 @@ class FreeRDPProcess {
356
359
  }
357
360
  // During freerdp_connect the helper reads certificate/NLA decisions directly from stdin. User input
358
361
  // must not get ahead of those replies and be mistaken for a refusal.
359
- if (!this.connected && ['K', 'M', 'R'].includes(type)) {
362
+ if (!this.connected && ['K', 'M', 'R', 'P', 'W'].includes(type)) {
360
363
  return;
361
364
  }
362
365
  // A child that has stalled must not accumulate an unbounded queue of mouse/keyboard events.
@@ -366,6 +369,19 @@ class FreeRDPProcess {
366
369
  }
367
370
  this.child.stdin.write(ipcFrame(type, payload));
368
371
  }
372
+ /** Narrows the clipboard's ways while connected; the helper drops what may no longer go. */
373
+ narrowClipboard(ways) {
374
+ this.send('W', numbers((ways.toRemote ? 1 : 0) | (ways.fromRemote ? 2 : 0)));
375
+ }
376
+ /** Offers this computer's clipboard text to the server; text larger than one IPC frame isn't sent. */
377
+ sendClipboardText(text) {
378
+ const data = Buffer.from(text, 'utf8');
379
+ if (data.length > MAX_FRAME || text.includes('\0')) {
380
+ return false;
381
+ }
382
+ this.send('P', data);
383
+ return true;
384
+ }
369
385
  async run() {
370
386
  const end = await this.ended;
371
387
  if (end.error) {