Skip to content

Add support for multiple listen addresses: --bind #819

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

Closed
wants to merge 1 commit into from
Closed

Add support for multiple listen addresses: --bind #819

wants to merge 1 commit into from

Conversation

deansheather
Copy link
Member

Describe in detail the problem you had and how this PR fixes it

This PR allows for listening on multiple address/port combinations at the same time, which in turn fixes a problem where listening on port 80 (without --allow-http) would cause the HTTP=>HTTPS redirect to fail.

--bind can be supplied multiple times and is accepted in the form [HOST][:PORT]. If the host or the port is not supplied, they will be filled with the default values 0.0.0.0 and process.env.PORT || 8443. If the user is using the now deprecated --host and --port arguments, they will be translated to a --bind argument automatically.

Additionally, you now cannot use --host/--port and --bind at the same time, and you cannot use --bind and --socket at the same time now. This will result in an error and code-server exiting.

A warning is printed when the user listens on address:80 but not address:443 when --allow-http is false.

Is there an open issue you can link to?

#737

- '--bind' can be supplied multiple times to add multiple listening
  addresses.
- '--host' and '--port' are now deprecated (they will be automatically
  translated to a '--bind').
@sr229
Copy link
Contributor

sr229 commented Sep 12, 2019

Do we still need this PR? I don't think we need this anymore due to much more unrelated v2 tree.

@sr229 sr229 added the blocked This issue cannot proceed due to external factors label Sep 12, 2019
@sr229
Copy link
Contributor

sr229 commented Sep 12, 2019

Blocked due to outdated tree. Please rebase.

@deansheather deansheather removed the blocked This issue cannot proceed due to external factors label Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants