-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
aspect: desktop IDEfeature: portsmeta: never-staleThis issue can never become staleThis issue can never become staletype: feature requestNew feature or requestNew feature or request
Description
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.
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.
loujaybee and TmEuMail-2020
Metadata
Metadata
Assignees
Labels
aspect: desktop IDEfeature: portsmeta: never-staleThis issue can never become staleThis issue can never become staletype: feature requestNew feature or requestNew feature or request
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
akosyakov commentedon Oct 6, 2022
@spearki Could you share which operating system you are using?
spearki commentedon Oct 6, 2022
@akosyakov mac os
jeanp413 commentedon Oct 6, 2022
@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 commentedon Oct 7, 2022
@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 commentedon Oct 10, 2022
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 commentedon Oct 10, 2022
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 commentedon Dec 6, 2022
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 to0.0.0.0
(this is macos bug) so you need to update your settings json with"remote.localPortHost": "allInterfaces"
stale commentedon Mar 12, 2023
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.
thang1160 commentedon Mar 21, 2023
You can try lower unprivileged ports down to 80
microsoft/vscode-remote-release#4589 (comment)