Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: implement 'server of server' for a local web server #191014

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

connor4312
Copy link
Member

Closes #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.

@connor4312 connor4312 self-assigned this Aug 22, 2023
@vscodenpa vscodenpa added this to the August 2023 milestone Aug 22, 2023
Closes #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.
@connor4312 connor4312 force-pushed the connor4312/cli-server-server branch from e585723 to b7f7073 Compare August 22, 2023 20:02
@connor4312 connor4312 merged commit 1fe8359 into main Aug 23, 2023
@connor4312 connor4312 deleted the connor4312/cli-server-server branch August 23, 2023 00:29
@leifwalsh
Copy link

leifwalsh commented Aug 23, 2023

It doesn't look like this new CLI supports serving on a UNIX domain socket. Could we please get that added in too, like in microsoft/vscode-remote-release#6940? We're going to need it in order to handle auth in a proxy. (I'm happy to open a new issue for that if you need)

@connor4312
Copy link
Member Author

Yea, please open an issue for that so I can track it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[code server] Bring over serve-local option from code-server preview to new code tunnel command
4 participants