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

Explore adopting the CLI for starting/managing the VS Code Server on WSL #7864

Open
aeschli opened this issue Jan 17, 2023 · 3 comments
Open
Assignees
Labels
plan-item A plan item
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Jan 17, 2023

Instead of downloading the server distro, install the standalone CLI

What's missing in the CLI:

  • bring back code serve-local
  • new parameter --download-folder to pass a folder that contains already downloaded server distros archives. The resolver will try to pre-download the distros on the client to avoid download issues on the WSL distro side.
  • more structured progress reporting in the CLI: download and unpackage percentage

Optional:
Use the CLI as proxy to connect to a server port, replacing the current proxy solution

  • resolver starts code serve. Server is downloaded and started on some port or socket path on the WSL side.
  • resolver starts a local proxy server and returns that address as the resolver result. E.g. localhost:3456
  • VS Code makes a connection to that local address.
  • The local proxy calls the cli on the WSL side wsl -e /somepath/code --connect-local and uses stdin/out to proxy the requests
  • wsl -e /somepath/code --connect-local connects to the server stated by code serve.
@connor4312
Copy link
Member

Here's a different way I'm thinking about it.

  • code tunnel has a VSDA-protected local tunnel has a local mode (also asked for by AzML) that exposes the same tunnel, but a local pipe or socket
  • serve becomes more modular. Right now it always results in a server being downloaded locally and started, but instead there's a "wsl" option that makes the CLI start the process in a different target, like WSL, but otherwise it's identical to a normal code tunnel.
  • The WSL extension could use this, but the neat thing is that remote tunnels gets the ability to connect to WSL for free.

I have some free cycles today, so I will prototype this.

@raggi
Copy link

raggi commented Apr 19, 2023

Yes please, I would really like code serve-local both from inside WSL and on Windows so that I can use my own transport rather than going via vscode.dev. The code-server serve-local --without-connection-token and --socket options were great for my use case.

@apethree
Copy link

+1 I use WSL with windows but I cannot access it from my macbook because remote tunnel will only connect to windows and I can't access WSL files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan-item A plan item
Projects
None yet
Development

No branches or pull requests

4 participants