Skip to content

Add UI around ports #1944

Closed
Closed

Description

@oguzgelal

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.

Activity

  1. nhooyr commented on Aug 17, 2020

    @nhooyr
    Contributor

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

  2. added
    enhancementSome improvement that isn't a feature
    featureNew user visible feature
    and removed
    enhancementSome improvement that isn't a feature
    on Dec 7, 2020
  3. avaidyam commented on Mar 22, 2021

    @avaidyam

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

  4. code-asher commented on Mar 22, 2021

    @code-asher
    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.

  5. avaidyam commented on Mar 22, 2021

    @avaidyam

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

  6. code-asher commented on Mar 23, 2021

    @code-asher
    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).

  7. code-asher commented on Mar 23, 2021

    @code-asher
    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.

  8. added this to the v3.9.3 milestone on Mar 23, 2021
  9. code-asher commented on Mar 23, 2021

    @code-asher
    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. 😆

  10. avaidyam commented on Mar 23, 2021

    @avaidyam

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

  11. modified the milestones: v3.9.3, On Deck on Apr 8, 2021
  12. self-assigned this
    on Apr 26, 2021
  13. changed the title [-]A way to disable authentication for proxied ports[/-] [+]Add UI around ports[/+] on Jun 3, 2021
  14. stale commented on Dec 1, 2021

    @stale

    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.

  15. stale commented on May 31, 2022

    @stale

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew user visible feature

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions