Skip to content

Add UI around ports #1944

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

Closed
oguzgelal opened this issue Aug 5, 2020 · 10 comments
Closed

Add UI around ports #1944

oguzgelal opened this issue Aug 5, 2020 · 10 comments
Assignees
Labels
feature New user visible feature
Milestone

Comments

@oguzgelal
Copy link

My apologies if there's already a way to do this, but it looks like there isn't.

For me there's really no use case to secure the proxied ports, but I do like code-server running behind authentication wall so I don't want to disable the whole thing. It'd be great if there was an option like code-server --disable-proxy-auth that would allow /proxy/<port> requests to go through.

@nhooyr
Copy link
Contributor

nhooyr commented Aug 17, 2020

Yea some UI around here to control which ports can be proxied and with or without auth would be really nice.

@nhooyr nhooyr added enhancement Some improvement that isn't a feature feature New user visible feature and removed feature enhancement Some improvement that isn't a feature labels Dec 7, 2020
@avaidyam
Copy link

@nhooyr Has there been any progress on this? If not, where would the relevant code be so that I may take a peek?

@code-asher
Copy link
Member

We haven't done anything here yet.

Authentication for the path proxy:

https://github.com/cdr/code-server/blob/32d882a50740e200eb1ba169d3a0bdcf2eeffc1e/src/node/routes/pathProxy.ts#L25

Authentication for the domain proxy:

https://github.com/cdr/code-server/blob/32d882a50740e200eb1ba169d3a0bdcf2eeffc1e/src/node/routes/domainProxy.ts#L42

A command line flag feels like an unfortunate way to implement this to me (definitely easy though) so in my mind we'd add to our /api endpoint (/api/proxy maybe) a way to list/add/remove/auth/deauth proxied ports and then write a very simple VS Code plugin that we ship as a built-in which lets you manage the proxy using that API endpoint.

@avaidyam
Copy link

@code-asher I agree with you! However, I think it's still better to have a stopgap --no-proxy-auth flag than to not support it at all. Or perhaps, --proxy vs. --proxy-without-auth.

@code-asher
Copy link
Member

I'm on the fence; I would definitely rather not have to maintain a feature we only added as a stop-gap. 😄

I'm also quite wary of a feature that disables auth entirely for the proxy since that defeats having auth at all (you can proxy code-server itself, for example).

@code-asher
Copy link
Member

We could have the flag take port numbers instead but personally I feel doing it properly from the get-go is the right answer. I'll go ahead and add this to the next milestone; if someone doesn't take it in the next week or so I'll put it on my todo list. It'd be great to have our own built-in plugin anyway for adding other features into VS Code that we've been wanting.

@code-asher code-asher added this to the v3.9.3 milestone Mar 23, 2021
@code-asher
Copy link
Member

Actually proxying to code-server wouldn't let you in, you'd just get the login page...not sure what I was thinking there. I do think it's sketchy though since you can access any port on the machine without authenticating which sounds like a security nightmare. 😆

@avaidyam
Copy link

@code-asher I'm running a multi-user VSCode setup (using code-server on Docker Swarm) sitting behind Traefik (a load balancer), so this is where I'm coming from. Right now I manually create a rule for say, p3000.mydomain.com to point to port 3000 on the instance (and mydomain.com points to port 8080 on the instance).

@jsjoeio jsjoeio modified the milestones: v3.9.3, On Deck Apr 8, 2021
@code-asher code-asher self-assigned this Apr 26, 2021
@code-asher code-asher changed the title A way to disable authentication for proxied ports Add UI around ports Jun 3, 2021
@stale
Copy link

stale bot commented Dec 1, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Dec 1, 2021
@code-asher code-asher removed the stale label Dec 2, 2021
@stale
Copy link

stale bot commented May 31, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label May 31, 2022
@stale stale bot closed this as completed Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New user visible feature
Projects
None yet
Development

No branches or pull requests

5 participants