mirror of
https://github.com/coder/code-server.git
synced 2026-05-26 06:07:26 +02:00
Proxy TLS sockets
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import * as cp from "child_process";
|
||||
import * as tls from "tls";
|
||||
|
||||
import { getPathFromAmdModule } from "vs/base/common/amd";
|
||||
import { VSBuffer } from "vs/base/common/buffer";
|
||||
@@ -62,8 +61,9 @@ export class ExtensionHostConnection extends Connection {
|
||||
|
||||
public constructor(protocol: Protocol, buffer: VSBuffer, private readonly log: ILogService) {
|
||||
super(protocol);
|
||||
protocol.dispose();
|
||||
this.protocol.dispose();
|
||||
this.process = this.spawn(buffer);
|
||||
this.protocol.getUnderlyingSocket().pause();
|
||||
}
|
||||
|
||||
protected dispose(): void {
|
||||
@@ -89,7 +89,7 @@ export class ExtensionHostConnection extends Connection {
|
||||
type: "VSCODE_EXTHOST_IPC_SOCKET",
|
||||
initialDataChunk: (buffer.buffer as Buffer).toString("base64"),
|
||||
skipWebSocketFrames: this.protocol.getSocket() instanceof NodeSocket,
|
||||
}, socket instanceof tls.TLSSocket ? (<any>socket)._parent : socket);
|
||||
}, socket);
|
||||
}
|
||||
|
||||
private spawn(buffer: VSBuffer): cp.ChildProcess {
|
||||
|
||||
Reference in New Issue
Block a user