Commit Graph

18 Commits

Author SHA1 Message Date
Hamir Mahal
a744313eb7 style: simplify string formatting for readability (#231763)
* style: simplify string formatting for readability

* fix: formatting in `.rs` files in `src/`
2024-10-22 16:30:46 +00:00
Connor Peet
4d221c6b85 cli: reapply "code server-web when offline" 2024-09-09 09:18:56 -07:00
Robo
746ba5bc68 cli: revert "code server-web when offline" (#227981)
* Revert "Merge pull request #227830 from microsoft/connor4312/cli-offline-serve"

This reverts commit 136a5c6f5f, reversing
changes made to 9d388bbf8b.

* chore: bump distro
2024-09-09 16:21:08 +02:00
Connor Peet
077bd2f1b4 fixups
- Don't set a config option for update interval. We don't let the one
  in core be configurable, don't see a huge need for this.
- Don't start the server when the update is available
- Fix some race conditions
- Fix some clippy lints on Rust 1.81
2024-09-06 12:20:13 -07:00
Ritam
b97dc79649 feat: serve-web now checks for update every 1 hour by default and can be configured by the flag "update_check_interval" 2024-08-25 16:10:27 +05:30
Ritam
785aaa3fdf refactor: moved the cli serve-web cache seeding to ConnectionManager initialization from get_latest_release 2024-08-15 18:55:06 +05:30
Ritam
2ed4fb19e6 Merge branch 'main' into cli-serve-web-offline-use-cache 2024-08-15 15:41:53 +05:30
Connor Peet
b6d022bc08 fix: --connection-token-file not functional in "code serve-web" (#223524)
Fixes #215537
2024-07-24 10:36:49 -07:00
Connor Peet
aef8e26d88 serve-web: fix SECRET_KEY_MINT_PATH does not honour server-base-path (#214250)
Fixes #212369
2024-06-04 09:57:17 -07:00
Ritam Mukherjee
3de59fcc49 feat: allows cli to serve locally cached server when update service not available 2024-05-22 21:03:54 +05:30
btwiuse
b356b209a5 cli: add --server-base-path flag to code serve-web command (#207932)
* feat(cli): add --server-base-path flag to `code serve-web` command

* fix clippy

* fmt

---------

Co-authored-by: navigaid <navigaid@gmail.com>
2024-03-18 08:12:08 -07:00
Aiday Marlen Kyzy
487e155ebb Merge pull request #16 from devdiv-microsoft/connor4312/msrc/use-token-file
MSRC Fix for February 2024 Patch Tuesday
2024-03-12 11:02:18 -07:00
Connor Peet
e250c8066d cli: fix command prompt showing up on windows (#194946)
cli: fix wsl prompt up on windows machine

Fixes #190425 again
2023-10-06 17:09:47 +01:00
Connor Peet
3941870f19 cli: fix panic if it can't bind a port (#193019)
Fixes #192229
2023-09-13 16:17:48 +01:00
Connor Peet
5413247e57 serve-web: delete socket file on server shutdown (#191692)
Fixes #191691
2023-08-29 13:57:48 -07: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
f7a7d9488f cli: serve-web listener improvements (#191146)
- Allow listening on a socket path (required manually implementing
  the Accept trait), fixes #191043
- Parse the host syntax correctly, fixes #191067
2023-08-23 16:47:31 -07:00
Connor Peet
1fe8359ed0 cli: implement 'server of server' for a local web server (#191014)
Closes https://github.com/microsoft/vscode/issues/168492

This implements @aeschli's 'server server' concept in a new
`code serve-web` command.

Command line args are similar to the standalone web server. The first
time a user hits that page, the latest version of the VS Code web server
will be downloaded and run. Thanks to Martin's previous PRs, all
resources the page requests are prefixed with `/<quality-<commit>`.

The latest release version is cached, but when the page is loaded again
and there's a new release, a the new server version will be downloaded
and started up.

Behind the scenes the servers all listen on named pipes/sockets and the
CLI acts as a proxy server to those sockets. Servers without connections
for an hour will be shut down automatically.
2023-08-22 17:29:51 -07:00