Skip to content

Allow forwarding privileged ports in VSCode Desktop #13637

@spearki

Description

@spearki

Is your feature request related to a problem? Please describe

Using VSCode Desktop, workspace listen ports less than 8000 are assigned a free high-numbered port on the local machine, instead of being mapped to the same port number as the workspace.

image

Describe the behaviour you'd like

Privileged ports opened in a workspace are assigned the same port number locally, if it's free.

Describe alternatives you've considered

This is supported in local-companion if you run it via sudo.

In Codespaces, this works by prompting you inside VSCode to elevate your permissions, allowing it to bind the desired port.

Activity

akosyakov

akosyakov commented on Oct 6, 2022

@akosyakov
Member

@spearki Could you share which operating system you are using?

spearki

spearki commented on Oct 6, 2022

@spearki
Author

@akosyakov mac os

jeanp413

jeanp413 commented on Oct 6, 2022

@jeanp413
Member

@akosyakov this is only available in codespaces as it implements a tunnel factory using proposed resolvers API, there's an open issue microsoft/vscode-remote-release#4589 to make this a built-in feature in vscode as remote ssh extension does not implement a tunnel factory

akosyakov

akosyakov commented on Oct 7, 2022

@akosyakov
Member

@spearki Unfortunately we blocked on it by microsoft/vscode-remote-release#4589 It seems some users are using socat to work it around [1]

spearki

spearki commented on Oct 10, 2022

@spearki
Author

Understood @akosyakov, thanks for that context. We will probably just stick with local companion for now.

Possibly dumb question, but what's the difference between a remote extension and an SSH extension? You would need to handle the SSH part yourself in a remote extension?

akosyakov

akosyakov commented on Oct 10, 2022

@akosyakov
Member

Possibly dumb question, but what's the difference between a remote extension and an SSH extension? You would need to handle the SSH part yourself in a remote extension?

VS Code does not provide stable API to allow custom SSH integrations. We rely on VS Code Remote SSH for that. Our remote extension provides integration with Gitpod on remote, i.e. go cli, tasks, exposed ports and so on.

jeanp413

jeanp413 commented on Dec 6, 2022

@jeanp413
Member

It is now possible to forward privileged ports in macos (PR microsoft/vscode#163890)

macos no longer requires sudo for priviledge ports (since macOS Mojave) when binding to 0.0.0.0 (this is macos bug) so you need to update your settings json with "remote.localPortHost": "allInterfaces"

stale

stale commented on Mar 12, 2023

@stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

added
meta: staleThis issue/PR is stale and will be closed soon
on Mar 12, 2023
added and removed
meta: staleThis issue/PR is stale and will be closed soon
on Mar 12, 2023
thang1160

thang1160 commented on Mar 21, 2023

@thang1160

You can try lower unprivileged ports down to 80
microsoft/vscode-remote-release#4589 (comment)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @spearki@akosyakov@loujaybee@jeanp413@thang1160

        Issue actions

          Allow forwarding privileged ports in VSCode Desktop · Issue #13637 · gitpod-io/gitpod