Skip to content

Disable Privileged ports for OSX  #160266

Description

@alexus37

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:
    Version: 1.71.0 (Universal)
    Commit: 784b017
    Date: 2022-09-01T07:25:38.437Z
    Electron: 19.0.12
    Chromium: 102.0.5005.167
    Node.js: 16.14.2
    V8: 10.2.154.15-electron.0
    OS: Darwin x64 21.6.0
    Sandboxed: No

Steps to Reproduce:

  1. Start vscode as a non-root user
  2. Use a remote extension like codespaces
  3. Have a setup that forwards a port below 1024 ie port 80
  4. After the connection the port is forward to a random number

This is annoying if you are working on a server and want to use a local domain ie myProject.localhost which requires the mapping to port 80. OSX does not enforce root for binding to ports below 1024 so I think vscode should also not treat them as privileged.

I wanted to submit a pr for this, but it is hard to test codespaces/remote container dev with vscode OSS.
My first impression is that I would only need to change the definition of a privileged port here:

https://github.com/microsoft/vscode/blob/main/src/vs/platform/tunnel/common/tunnel.ts#L158-L164

Metadata

Metadata

Assignees

Labels

author-verification-requestedIssues potentially verifiable by issue authorbugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersremote-explorerRemote explorer viewverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions