Commit Graph

10 Commits

Author SHA1 Message Date
Connor Peet
f99981ed56 cli: fix compressor not draining and leading to truncated responses (#206464)
* cli: fix compressor not draining and leading to truncated responses

Fixes https://github.com/microsoft/vscode-remote-release/issues/9594

* fix lint
2024-02-28 20:47:31 +01:00
Connor Peet
35425d369a cli: propagate server closing (#192824)
Previously this was never needed since the connection was only used for
the ext host, which never closed.

Part 1 of fixing #192521
2023-09-12 00:45:39 +02:00
Connor Peet
8ef6961789 server-web: implement secret storage provider (#191538)
Works quite similarly to vscode.dev. The client has a key stored in
secret storage. The server has a key stored server-side, and issues
an http-only cookie to the client. The client can ask the server to
combine its key and the http-only cookie key to a key component, which
it combines with its local key to encrypt and decrypt data.

This logic kicks in if the web server bits see a `vscode-secret-key-path`
cookie set when it loads.
2023-08-28 17:48:09 -07:00
Connor Peet
db135a575a cli: fix decompression loop stalling (#191512)
Fixes #191501

It turns out this was a difference in inflate/deflate implementations
between the extension/SDK and the CLI. The SDK uses Node's zlib bindings,
while by default Rust's flate2 library uses a rust port of [miniz][1].
The 'logic' in the CLI was good, but miniz does not appear to flush
decompressed data as nicely on SYNC'd boundaries as zlib does, which
caused data to 'stall'. Telling the flate2 crate to use the native
bindings fixed this.

This could also be the cause of the flakiness occasionally seen on idle
tunnel connections!

[1]: https://github.com/richgel999/miniz
2023-08-28 21:51:04 +02:00
Connor Peet
679bb967c3 cli: add stdio control server
* signing: implement signing service on the web

* wip

* cli: implement stdio service

This is used to implement the exec server for WSL. Guarded behind a signed handshake.

* update distro

* rm debug

* address pr comments
2023-05-19 17:19:52 +02:00
Connor Peet
2d8ff25c85 cli: add streams to rpc, generic 'spawn' command (#179732)
* cli: apply improvements from integrated wsl branch

* cli: add streams to rpc, generic 'spawn' command

For the "exec server" concept, fyi @aeschli.

* update clippy and apply fixes

* fix unused imports :(
2023-04-12 16:51:29 +01:00
Connor Peet
c010101bc4 wip 2023-01-19 20:03:47 -08:00
Connor Peet
8965c48d30 wip 2023-01-18 16:15:43 -08:00
Connor Peet
0f9c86ec84 fixup! windows compilation 2022-11-11 13:16:20 -08:00
Connor Peet
ebfa4b0c3c cli: enable server message compression
This is the CLI side of enabling compression of servermsg's sent
over the socket. It is feature-detected by the CLI sending
protocolVersion=2. If present, the consumer can request compression by
passing `compress:true` when setting up the server.

In this mode, servermsg's are an inflate/deflate stream. Not a ton of
code here, but was lots of fun tweaking to get it right :)

Fixes https://github.com/microsoft/vscode/issues/163688
2022-11-11 11:51:09 -08:00