-
Notifications
You must be signed in to change notification settings - Fork 15
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
HTTPS support #8
Comments
A good use case. The ws url is assembled in frontend, see: pisugar-power-manager-rs/electron/src/renderer/main.js Lines 15 to 16 in 76dbc47
Change It might be better to add a http api feature, I suppose. It is not easy to setup a reverse proxy with current stream api. |
Unfortunately I don't think it works that easily, as it's giving me errors about the websockets not having a valid SSL certificate. I think some services get around this by having a self-signed certificate they distribute, but I'm not sure. |
What doest reverse proxy rule looks like, that might help. The pisugar server has no self-signed certificate. Could you debug the ws connection with postwoman https://postwoman.io/realtime ? |
Here's what my nginx rule looks like:
The debug console gives me an error of
|
SSL configuration is missing in the 3rd
|
I added the ssl configuration, and still get |
Try the latest build https://github.com/PiSugar/pisugar-power-manager-rs/releases/tag/latest . We don't need a standalone websocket port anymore, it has been integrated into http ( |
@fengyc Thanks! Sorry it took me a bit to get back to you. Unfortunately, it looks like the new build has some issues.
|
Yeah, that is a bug, see 1tgr/rust-websocket-lite#85 . Need to wait for their updates. |
Ah, good to know. What about the reverse proxy failing though? It doesn't work in either browser. |
Try this
|
That worked perfectly, thank you! It even gets around the rust-websocket-lite bug 🙂 |
Should I leave this open until that bug is closed though? Since it breaks direct access this is probably something that should wait for a release like you said. |
Leave this open. We will keep track of the websocket bug. |
I'm unsure how difficult a feature this would be to implement, but it would be nice to have the option of using HTTPS. I reverse proxy all my network services in order to use my domain's SSL certificate, but can't do that for the pisugar interface because it loads an insecure websocket.
The text was updated successfully, but these errors were encountered: