-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Add option to server for --pick-port
to start the server on a port within a range
#136729
Conversation
Not sure how I feel about this, when we could use |
Shutting down the server on the remote-ssh extension side was a lot more code change so I thought this was cleaner than changing a bunch of logic in remote-ssh. Also I'm not sure if it's okay to connect to a port outside the specified range if they set a specific range for those who want to whitelist a range of ports for remote-ssh. |
Add option to server for port range to connect within Fix semicolon linting issue Add `pick-port` to list of accepted args
8f865ce
to
9077463
Compare
…ck-port range. port 0 requests any random free port https://unix.stackexchange.com/questions/180492/is-it-possible-to-connect-to-tcp-port-0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I pushed a change to fix handling of parseInt
errors. For whatever reason, the old code was using a try/catch around parseInt
, but parseInt
simply returns NaN
when it cannot parse something. Also, we should always pass base 10 to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good to me!
Related to https://github.com/microsoft/vscode-remote-ssh/pull/151