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

Support binding to a unix domain socket instead of a TCP address in serve-web #191043

Closed
leifwalsh opened this issue Aug 23, 2023 · 4 comments · Fixed by #191146
Closed

Support binding to a unix domain socket instead of a TCP address in serve-web #191043

leifwalsh opened this issue Aug 23, 2023 · 4 comments · Fixed by #191146
Assignees
Labels
code-cli feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@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)

Originally posted by @leifwalsh in #191014 (comment)

@connor4312 connor4312 assigned connor4312 and unassigned hediet Aug 23, 2023
@connor4312 connor4312 added feature-request Request for new features or functionality code-cli labels Aug 23, 2023
@connor4312 connor4312 added this to the On Deck milestone Aug 23, 2023
connor4312 added a commit that referenced this issue Aug 23, 2023
- Allow listening on a socket path (required manually implementing
  the Accept trait), fixes #191043
- Parse the host syntax correctly, fixes #191067
connor4312 added a commit that referenced this issue Aug 23, 2023
- Allow listening on a socket path (required manually implementing
  the Accept trait), fixes #191043
- Parse the host syntax correctly, fixes #191067
@vscodenpa vscodenpa added the unreleased Patch has not yet been released in VS Code Insiders label Aug 23, 2023
@leifwalsh
Copy link
Author

Nice, thanks!

@vscodenpa vscodenpa added 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 24, 2023
@rzhao271 rzhao271 modified the milestones: On Deck, August 2023 Aug 28, 2023
@connor4312 connor4312 added the verification-needed Verification of issue is requested label Aug 29, 2023
@roblourens roblourens added the verification-steps-needed Steps to verify are needed for verification label Aug 29, 2023
@roblourens
Copy link
Member

I can do this

$ code-insiders serve-web --socket-path /tmp/mysock
*
* Visual Studio Code Server
*
* By using the software, you agree to
* the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
* the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
*
Web UI available on /tmp/mysock

what now?

@roblourens
Copy link
Member

Also is it an issue that the socket file wasn't release/deleted after a ctrl+C? [2023-08-29 11:24:41] error could not listen on socket/pipe: Os { code: 48, kind: AddrInUse, message: "Address already in use" } or do I clean that up manually?

@connor4312
Copy link
Member

We should probably automatically delete the file if it exists

what now?

You can do a curl to make sure it's actually working curl --unix-socket /tmp/mysock http:/localhost. Without extra stuff you won't be able to open it in the browser, but verifying the connection should be enough.

@connor4312 connor4312 removed the verification-steps-needed Steps to verify are needed for verification label Aug 29, 2023
@roblourens roblourens added the verified Verification succeeded label Aug 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
code-cli feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@leifwalsh @roblourens @connor4312 @hediet @rzhao271 @vscodenpa and others