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
Added ability to use SSL for MQTT connections on port 443 #442
Conversation
Doesn't work for me, I got |
Ok, will try to launch ui somehow locally and test better |
it works if you could somehow specify the port before it crashes |
Maybe it will be better to force SSL by default if HTTPS is used and also try port 443 if default one is configured? Thus it will work both via HTTP (in local network) and via HTTPS reverse proxy automatically |
Let me push the fix for empty screen first. Then I will try to implement your proposal |
Done. Now it renders UI properly |
Done. Take a look please |
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.
LGTM, thanks for the contribution! We will increase version number and this package will appear in testing in an hour or so
Waiting to test 🔥 |
Hello, currently, if you try to use reverse proxy with SSL, you will face the issue that HomeUI will still try to use a WS connection over the HTTPS-served page to establish MQTT connection. Such behavior will cause the following error.
After examining the code base, I found that the MQTT library supports WSS connection. We need to pass
useSSL
option astrue
.homeui/app/lib/mqttws31.js
Line 971 in f84679f
This PR adds the check if the current port is 443 and sets
useSSL
totrue