UNPKG

@microsoft/dev-tunnels-connections

Version:

Tunnels library for Visual Studio tools

36 lines 1.51 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. Object.defineProperty(exports, "__esModule", { value: true }); exports.PortRelayConnectRequestMessage = void 0; const dev_tunnels_ssh_tcp_1 = require("@microsoft/dev-tunnels-ssh-tcp"); /** * Extends port-forward channel open messages to include additional properties required * by the tunnel relay. */ class PortRelayConnectRequestMessage extends dev_tunnels_ssh_tcp_1.PortForwardChannelOpenMessage { constructor() { super(...arguments); /** * Gets or sets a value indicating whether end-to-end encryption is requested for the * connection. * The tunnel relay or tunnel host may enable E2E encryption or not depending on capabilities * and policies. The channel open response will indicate whether E2E encryption is actually * enabled for the connection. */ this.isE2EEncryptionRequested = false; } onWrite(writer) { var _a; super.onWrite(writer); writer.writeString((_a = this.accessToken) !== null && _a !== void 0 ? _a : '', 'utf8'); writer.writeBoolean(this.isE2EEncryptionRequested); } onRead(reader) { super.onRead(reader); this.accessToken = reader.readString('utf8'); this.isE2EEncryptionRequested = reader.readBoolean(); } } exports.PortRelayConnectRequestMessage = PortRelayConnectRequestMessage; //# sourceMappingURL=portRelayConnectRequestMessage.js.map