webui icon indicating copy to clipboard operation
webui copied to clipboard

OpenSSL doesn't work in Firefox and Safari

Open Juff-Ma opened this issue 11 months ago • 6 comments

All non-chromium based Browsers we tested will not connect to a secure websocket when using a self-signed certificate. using a non-self-signed certificate wouldn't be practical with webui. The problem seems to be that every non-chromium based browser doesn't accept wss connections to a diferent port than the website if the certificate of the websocket is self-signed.

Would it be possible to run the websocket on the same port as the built-in webserver? While most users will use a Chromium based browser, some will not and Safari and Firefox together do make up a significant portion of users.

This seems to be a known issue, at least for firefox.

Edit: An additional complication seems to be that WebUI will consider the website inaccessible if this occurs and show the "Access Denied, already running in another browser" when reloading the page, this will be shown until a successfull websocket connection is made from another browser

Juff-Ma avatar Mar 22 '24 15:03 Juff-Ma

+1

zlElo avatar Mar 22 '24 15:03 zlElo

~~Good point, but unfortunately, Civetweb does not support running multiple servers on the same port out-of-the-box. Each server instance typically binds to a specific port, and Civetweb does not provide built-in functionality for sharing a single port between multiple servers.~~

Here webui start the web server: Line 6770 Here webui start the WS server: Line 6809

This issue is related to how browser deals with TLS, I mean it's not really a webui issue. Running a public web server with a self signed certificate will get the exact same error/warning.

AlbertShown avatar Mar 22 '24 16:03 AlbertShown

Are you sure? I'm not an expert on civetweb but according to this issue (particularly the last comment) civetweb does support (and reccomend) it since 2015. Of yourse 2015 was 9 years ago however i don't know why they would remove support for something like this.

In this issue too it seems to be possible and while here it didn't work finally this doesn't seem to be related to civetweb directly.

Juff-Ma avatar Mar 22 '24 16:03 Juff-Ma

True, it seems civetweb supports it... This will be a very good feature to add to webui.

AlbertShown avatar Mar 22 '24 16:03 AlbertShown

image

AlbertShown avatar Mar 22 '24 16:03 AlbertShown

image

AlbertShown avatar Mar 22 '24 16:03 AlbertShown