websocketserver: Allow the user to bind to a specific address #1279
Open
silasary wants to merge 2 commits intoobsproject:masterfrom
Open
websocketserver: Allow the user to bind to a specific address #1279silasary wants to merge 2 commits intoobsproject:masterfrom
silasary wants to merge 2 commits intoobsproject:masterfrom
Conversation
tt2468
reviewed
Feb 15, 2025
tt2468
reviewed
Feb 15, 2025
tt2468
requested changes
Feb 15, 2025
Member
|
Giving this a bump, as it has unresolved comments still. Looks like the feedback was acknowledged, but the requested changes have not been made yet. |
Author
|
Thanks for the bump 😄 |
|
Giving a bump because I would like this functionality |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a config variable and command line argument for binding the websocket server to a specific address, rather than blindly listening on all interfaces.
This PR does not currently add a GUI element to configure this.
By default, OBS will continue listening on all addresses, this just adds the option to reduce the exposure for users who want or need it (changing the default appears to be the main reason 1cd12c1 was reverted).
I have chosen to allow binding of a specific address instead of a "localhost only" flag, as it's more flexible for users with multiple network adaptors.
No UI changes just yet, because I'm not sure how to best expose it in a UI, and feel like the users who want/need it are probably comfortable with hand-editing the config or using the CLI argument.
Motivation and Context
I am trying to use OSB websockets in an environment where listening on all addresses is a problem. This allows me to bind OBS to only one network adaptor.
This PR also addresses the security concerns of #907, allowing the user to bind to
127.0.0.1or::1.How Has This Been Tested?
Modified config file, tried connecting to the socket from local machine and remote machine.
Reset config file, then repeated test with command line argument.
Also conducted test without any config changes to ensure default was still
0.0.0.0Tested OS(s):
Windows 10, Windows 11
Types of changes
Checklist:
masteror arelease/*branch.