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

code-server launcher should forward --socket-path to the underlying server #6940

Closed
leifwalsh opened this issue Jul 13, 2022 · 7 comments
Closed
Assignees
Labels
code-server Issues on the VS Code Server. feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@leifwalsh
Copy link

There are two things called code-server, I'm not sure how you refer to them internally, but I'll call https://aka.ms/vscode-server-launcher/x86_64-unknown-linux-gnu the launcher and https://update.code.visualstudio.com/commit:b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a/server-linux-x64-web/stable, which that downloads, the server.

The server supports --socket-path, which makes it listen on a unix domain socket, which is great for security. We can use that, and send it traffic through a reverse proxy that terminates authentication in the way we like to do authentication internally. Having the server listen on a localhost TCP port is less secure on shared hosts.

But, the launcher only supports --host and --port, it doesn't know about --socket-path. Could we make the launcher forward the --socket-path argument along for code-server serve-local --socket-path?

@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Jul 13, 2022
@tanhakabir tanhakabir added code-server Issues on the VS Code Server. feature-request Request for new features or functionality and removed ssh Issue in vscode-remote SSH labels Jul 13, 2022
@tanhakabir tanhakabir added this to the July 2022 milestone Jul 13, 2022
@connor4312
Copy link
Member

connor4312 commented Jul 19, 2022

Thanks for the issue.

Currently, we listen on a port since the underlying infrastructure and client we use from another team is designed as a port forwarding service. However, we hope to soon build native integration to their service in our CLI and their SDK, which would let us avoid having to listen anywhere, since we can connect incoming connections directly to the control server.

This will also let us avoid having to download the port forwarding utility, and let us implement port forwarding.

@aeschli
Copy link
Contributor

aeschli commented Jul 20, 2022

I think @leifwalsh talks about code-server serve-local. I'll add support for the socket-path there

@connor4312
Copy link
Member

Ah, right, missed that...

@leifwalsh
Copy link
Author

Yeah, for serve-local, thanks @aeschli

@aeschli aeschli added the verification-needed Verification of issue is requested label Jul 22, 2022
@andreamah andreamah added the verification-steps-needed Steps to verify are needed for verification label Jul 27, 2022
@andreamah
Copy link

What are some verif steps for this?

@connor4312
Copy link
Member

  1. Install/update to the latest version of the CLI (steps https://github.com/microsoft/vscode-cli#installation)
  2. Run code-server serve-local --help and verify --socket-path is there
  3. Run code-server serve-local --socket-path /path/to/some/socket and verify that the output says it's listening on that path

@connor4312
Copy link
Member

actually, I didn't work on this, so I did that and just verified it 😛

@connor4312 connor4312 added verified Verification succeeded and removed verification-steps-needed Steps to verify are needed for verification labels Jul 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-server Issues on the VS Code Server. feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants