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] Bring over serve-local option from code-server preview to new code tunnel command #168492

Closed
srudolph-credera opened this issue Dec 8, 2022 · 11 comments · Fixed by #191014
Assignees
Labels
code-server-web feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan remote-tunnel
Milestone

Comments

@srudolph-credera
Copy link

The preview of VS Code Server (https://code.visualstudio.com/blogs/2022/07/07/vscode-server#_a-preview-of-a-larger-journey) had a subcommand that enabled running locally:

serve-local: Start a VS Code Server that can be accessed locally

I would love to see this option brought into the new code tunnel command introduced this week (https://code.visualstudio.com/blogs/2022/12/07/remote-even-better). This feature supports a variety of useful edge cases like connecting to a web version of VS Code running on the local private network or inside a secure cloud environment where authentication is either not required or already independently addressed.

@aeschli aeschli added remote-tunnel feature-request Request for new features or functionality code-server-web labels Dec 9, 2022
@aeschli aeschli added this to the Backlog Candidates milestone Dec 9, 2022
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@aeschli aeschli changed the title Bring over serve-local option from code-server preview to new code tunnel command [code server] Bring over serve-local option from code-server preview to new code tunnel command Dec 9, 2022
@vscodenpa
Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa vscodenpa modified the milestones: Backlog Candidates, Backlog Dec 12, 2022
@OneCyrus
Copy link

For a better developer experience the tunnel extension should also be able to connect to this instance and use direct port forwarding like with the SSH extensions.

there's currently a separate issue for this which could use some upvotes.
microsoft/vscode-remote-release#7527

@sroener
Copy link

sroener commented Aug 7, 2023

Hi,

From my understanding the requested feature already existed in the preview of VScode Server:

The preview of VS Code Server (https://code.visualstudio.com/blogs/2022/07/07/vscode-server#_a-preview-of-a-larger-journey) had a subcommand that enabled running locally:

serve-local: Start a VS Code Server that can be accessed locally

I would love to see this option brought into the new code tunnel command introduced this week (https://code.visualstudio.com/blogs/2022/12/07/remote-even-better). This feature supports a variety of useful edge cases like connecting to a web version of VS Code running on the local private network or inside a secure cloud environment where authentication is either not required or already independently addressed.

I want to emphasize again that this feature would be very helpful for situations, when the normal tunnels approach would be difficult due to data protection laws.

Are there any news on this issue/is there a timeline for this feature?

I'm looking forward to this feature.

@meganrogge meganrogge removed their assignment Aug 7, 2023
@thekeith
Copy link

thekeith commented Aug 11, 2023

+1 to this request and some more context:

  • I work on my iPad Pro M2 full time and only use a desktop for essentials at this point, including for all my software development
  • I use code tunnels on an ubuntu server box in my local network, or on a Pi when I’m remote
  • Overall, code tunnels have been reliable 90% of the time, making it straightforward to develop and use my iPad as a daily driver
  • However, there are instability issues where it can disconnect in safari or require reloading, or the lag from my LAN -> WAN -> LAN is great enough that I end up having to reload multiple times before it stabilizes
  • The older code-server was far more reliable on local networks and had virtually zero stability problems in daily use

As @sroener noted, a local version would be very helpful for situations where data protection laws can restrict the utility of tunnels. In addition, simply being able to form a local connection will make it much easier for developers like myself in our daily use as it brings a much more reliable connection with less stability issues.

Note: I have used Blink Shell on iPad as well, but UX issues have kept it from being usable

@JtMotoX
Copy link

JtMotoX commented Aug 18, 2023

I have been using code-server serve-local for the past year I think the new version of VSC broke the Settings Sync functionality when using code-server. This means that I can't use code-server anymore. Would be great if we could get this same serve-local functionality with code tunnel.

@Ali-Flt
Copy link

Ali-Flt commented Aug 21, 2023

Okay so... Are we getting this or what? It's been 8 months. Any updates? It's so weird that an already working and reliable essential feature is removed with no good reason. One might speculate that Microsoft likes us to transfer our precious data through their servers instead of transferring it privately where they can't see it. 🤔
I would've loved to use community forks of this "Open-Source" software such as code-server if it was not for the proprietary extensions that only work on the official VScode forcing me to use it... Don't you love how corps handle open-source?

@connor4312 connor4312 assigned connor4312 and unassigned aeschli Aug 22, 2023
connor4312 added a commit that referenced this issue 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 modified the milestones: Backlog, August 2023 Aug 22, 2023
connor4312 added a commit that referenced this issue 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 added a commit that referenced this issue Aug 23, 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.
@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Aug 23, 2023
@thekeith
Copy link

thekeith commented Aug 30, 2023

Many thanks to the team for implementing.

FYI, issues found in testing:

  1. github sign-in link defaults to 127.0.0.1 instead of the host passed in the command. Example:

Command: code-insiders serve-web --host 0.0.0.0
Sign-in link uses 127.0.0.1:54389 instead

  1. --host does not accept localhost or an MDNS name

I’ll raise these as separate issues

Edit:

  1. github sign-in link cycles ports, breaking any port-forwarding via SSH as each new sign-in requires forwarding a new port

@Ali-Flt
Copy link

Ali-Flt commented Aug 30, 2023

@thekeith This is the corresponding issue for that: #191067
which version of code-insiders are you using? It is probably not the latest cause I tested it after the issue was closed and it was resloved.

@thekeith
Copy link

@Ali-Flt thanks for the response. I’m on 1.82.0 at the moment and overall the experience is very responsive and stable.

To clarify the issues I found:

  1. Using --host does work for serving VSCode, but the github sign-in link still has 127.0.0.1 as the host instead of the host I pass. For example, if I use the command code-insiders serve-web --host 0.0.0.0 I am able to access VSCode fine on my local network, however the github sign-in link still uses http://127.0.0.1:54xxx as a host. It should reflect the current hostname of the web session (such as the local network IP address being used to access VSCode).

  2. The github link cycles ports, making it difficult to handle in an SSH session with ports forwarded as you need to disconnect and reconnect to add each port to ~/.ssh/config every time. This seems to only occur during setup but does pose issues for anyone using SSH or a firewall to access VSCode.

@thekeith
Copy link

thekeith commented Sep 1, 2023

@Ali-Flt both appear to be resolved as of latest insiders build

@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-server-web feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan remote-tunnel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants