Commit Graph

47 Commits

Author SHA1 Message Date
4fc8a3aecc CI: Fix deps formatting excludes 2022-07-02 05:49:57 -07:00
8b7fd3dd46 Revert "forms: Add configuration to enable external access"
This reverts commit 1cd12c1023.
2022-07-02 05:44:08 -07:00
2e48dd24c4 base: Format code 2022-07-02 05:42:20 -07:00
1cd12c1023 forms: Add configuration to enable external access
After discussion in the Discord server, and some internal discussion,
this was deemed a reasonable patch for various security concerns. This
basically controls whether obs-websocket binds to 127.0.0.1 or 0.0.0.0.

I decided to have obs-websocket bind to 127.0.0.1 by default, since
most users appear to be using obs-websocket on the same machines as
their client software. This will be changed if it poses significant
support-related issues.

Further security solutions have been discussed, but are either a heavy
amount of work, or significantly impact client applications' connect
flows.

One idea that I should mention is like a cookie system, where:
- On first connect, obs-websocket asks the user to approve the
connection.
- After authentication, obs-websocket gives the client a token in the
`Identified` message, which the client stores.
- On future connects, the client uses this token, along with the
password, to authenticate without needing user confirmation.

This system will likely be implemented in a future version of
obs-websocket.

Closes #907
2022-04-26 03:24:26 -07:00
41a145c57c SettingsDialog: Only restart when necessary
The previous few commits now allow for us to change settings without
restarting the WebSocket server.
2021-12-15 02:11:33 -08:00
c95511eb5f Base: Remove UNUSED_PARAMETER() usages
I prefer to use undefined parameters instead.
2021-11-21 03:08:06 -08:00
4d8013b07e SettingsDialog: Add 6 character minimum length
Security requirements should be held just like every other platform
out there, even if they are lax
2021-11-21 02:29:21 -08:00
4ca259b790 Base: Enforce -Wall and fix compiler warnings
That was *a lot* of warnings.
2021-11-20 02:34:48 -08:00
bd6c663775 Base: Add copyright header to source 2021-11-19 17:32:22 -08:00
5ab091a40b Base: Move WebSocketServer to its own directory
Just helps with organization
2021-11-18 00:29:28 -08:00
342164dfb5 Forms: Use QHideEvent instead of QCloseEvent
QCloseEvent is the wrong event to use here. If the `Ok` button is
pressed for example, QCloseEvent is not emitted. QHideEvent is
always called when the dialog is hidden.
2021-09-17 03:00:33 -07:00
a4e62acf25 Forms: Update ConnectInfo on settings apply instead of close
Just for better usability
2021-09-17 02:54:29 -07:00
69ccc99921 Utils/UI: Make GeneratePassword() use std::string
Just for consistency
2021-09-17 02:09:44 -07:00
e89c0c2b05 Base: More code cleanup and fixes 2021-09-04 10:47:51 -07:00
ade9653ed6 Base: Only include required util namespaces 2021-08-27 04:34:06 -07:00
1fc60aba92 SettingsDialog: Fix Generate Password button enable logic
On OBS load, the Generate Password button would be enabled regardless
of if authentication was enabled, or if the password was overridden.
2021-08-26 19:07:26 -07:00
4d271da541 Base: Code cleanup and add some requests 2021-07-22 03:24:53 -07:00
0a02015f7d Base: General code cleanup 2021-06-22 15:51:52 -07:00
abfc6f0b28 SettingsDialog: Add todo
Maybe someday I'll actually do this todo.
2021-06-13 04:01:21 -07:00
57794a2bf5 SettingsDialog: Show confirmation when a custom password is used 2021-06-13 03:04:08 -07:00
5e49ee2569 SettingsDialog: A few improvements 2021-06-06 00:47:52 -07:00
3852a387b5 SettingsDialog: Attempt at fixing tooltip icon on Windows 2021-06-06 00:33:53 -07:00
1ecf1e5dfd SettingsDialog: Log when restart is required 2021-06-05 23:09:02 -07:00
e709d3fad5 SettingsDialog: Fix build (oops) 2021-06-05 23:07:47 -07:00
a7c4f98ffa SettingsDialog: Add tooltip icon to debug checkbox 2021-06-05 23:06:36 -07:00
3d0ba91ff2 SettingsDialog: Restart websocket server if debug mode changed
The functionality of not reloading the server when debug mode is
changed I determined was too confusing to use considering the
benefit that it provides by not reloading the websocket server.

It is technically possible to set debug mode to the server while
it is running, however the implementation would somewhat dirty the
UI code, so I do not feel comfortable doing it at this point.
2021-06-05 22:23:57 -07:00
81636dcbfa SettingsDialog: Show confirmation when video is active
Show a confirmation dialog when the Show Connect Info button is
clicked and video is active, to prevent users from
unintentionally showing sensitive information while live.
2021-06-05 21:38:16 -07:00
ee751edf54 SettingsDialog: Mild refactor and add Connect Info dialog
Among lots of stuff:

- Generate a random password on first load

- Add `ConnectInfo` dialog including QR code display

- Add `Generate Password` button to generate a new random
password

- Delete `Copy Password to Clipboard` button

- Delete `GetConnectString` or whatever from WebSocketServer
(reimplemented the functionality directly into ConnectInfo)

- Added `GeneratePassword()` to Utils

Todo: Show warning when users specify their own passwords
2021-05-08 04:29:03 -07:00
04f7b33755 SettingsDialog: Add Identified column to session table 2021-04-30 11:24:09 -07:00
c73f6608b9 Config: Add command line parameters to override port and password 2021-04-28 15:59:29 -07:00
af46271b27 WebSocketServer: Add some onOpen and onClose logic, make websocketpp logging mirror debug setting 2021-04-28 13:26:22 -07:00
c91b924f0e SettingsDialog: Server port had no logic for some reason. Also restart server if settings are changed 2021-04-28 12:18:46 -07:00
fb01a28623 SettingsDialog: Add timer to constantly update session table 2021-04-28 11:56:41 -07:00
b53b40d9c8 base: Improve logging 2021-04-28 11:43:39 -07:00
3d43bd525b SettingsDialog: Fix datetime shit 2021-04-28 11:27:11 -07:00
11913dac76 WebSocketServer: Rename sessionDuration to connectedAt 2021-04-28 11:14:00 -07:00
98ec9d01ac base: Dumb #include redefinitions 2021-04-27 16:45:44 -07:00
d9ee288cf1 base: cmake is fucking retarded 2021-04-27 16:33:47 -07:00
9577382780 SettingsDialog: Fix log levels 2021-04-27 15:17:44 -07:00
205fb75555 SettingsDialog: Add websocket session list logic 2021-04-27 15:16:53 -07:00
8067cfb686 Base: Tons more shit 2021-04-27 14:52:48 -07:00
f0dfe72aca base: Add starting WebSocketServer files 2021-04-27 09:18:06 -07:00
927806a432 SettingsDialog: Add translations to Session Table 2021-04-27 08:56:49 -07:00
aa0256611b SettingsDialog: Enable grid layout and scaling 2021-04-27 08:46:34 -07:00
41731f9d57 SettingsDialog: Add UI logic and start session table 2021-04-27 08:24:51 -07:00
6f2f207adc SettingsDialog: Add configs 2021-04-26 20:55:18 -07:00
a8ca912044 generic: Add SettingsDialog and Config 2021-04-26 19:59:50 -07:00