UNPKG

@microsoft/dev-tunnels-connections

Version:

Tunnels library for Visual Studio tools

33 lines 1.39 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. Object.defineProperty(exports, "__esModule", { value: true }); exports.PortRelayConnectResponseMessage = void 0; const dev_tunnels_ssh_1 = require("@microsoft/dev-tunnels-ssh"); /** * Extends port-forward channel open confirmation messages to include additional properties * required by the tunnel relay. */ class PortRelayConnectResponseMessage extends dev_tunnels_ssh_1.ChannelOpenConfirmationMessage { constructor() { super(...arguments); /** * Gets or sets a value indicating whether end-to-end encryption is enabled for the * connection. * The tunnel client may request E2E encryption via `isE2EEncryptionRequested`. Then relay * or host may enable E2E encryption or not depending on capabilities and policies, and the * resulting enabled status is returned to the client via this property. */ this.isE2EEncryptionEnabled = false; } onWrite(writer) { super.onWrite(writer); writer.writeBoolean(this.isE2EEncryptionEnabled); } onRead(reader) { super.onRead(reader); this.isE2EEncryptionEnabled = reader.readBoolean(); } } exports.PortRelayConnectResponseMessage = PortRelayConnectResponseMessage; //# sourceMappingURL=portRelayConnectResponseMessage.js.map