home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.13k stars 606 forks source link

HTTP3/QUIC support #1390

Open TheLastGimbus opened 3 years ago

TheLastGimbus commented 3 years ago

I just recently switched from Nginx to Caddy for reverse proxy, and OH MY GOD IT'S SO GOOD

Caddy makes it super easy to add experimental HTTP3 protocol, which uses quic, which makes it much faster :rocket:

Is there any chance to add http3 support for Home Assistant app?

dshokouhi commented 3 years ago

not sure on the specifics but wouldnt HA core and the frontend need to support this first?

TheLastGimbus commented 3 years ago

I'm not sure, honestly...

As far as I understand, if you run behind a reverse-proxy, you can customise any HTTP stuff directly from that proxy - add TLS, add headers, etc

And since connection between proxy and hass is internal (0ms), it doesn't matter that hass itself doesn't have http3

(But I may be wrong...)

There aren't any issues about this in core/frontend repo :thinking: maybe I will create one for reference

TheLastGimbus commented 3 years ago

Yes, after a lot of messing, I succesfully got some HTTP/3 connections, on login page for many parts:

image image

For dashboard tho, it seems to catch up less often, altough it works:

image

Just thanks to Caddy, no hass core support required :100:

TheLastGimbus commented 3 years ago

Update: it doesn't seem to fully work :sweat_smile: I don't know if it's fault of Caddy, or Firefox, or my router or what, but lovelace can't load when http3 is enabled in Caddy - disabling it makes it work again

That just gets me on the ground that quic isn't ready yet :( But maybe official support in app would make it better :+1:

TheLastGimbus commented 3 years ago

Okhttp doesn't have the support yet either: square/okhttp#907

stale[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

TheLastGimbus commented 2 years ago

Nope, I still want it

stonith commented 10 months ago

Update: it doesn't seem to fully work 😅 I don't know if it's fault of Caddy, or Firefox, or my router or what, but lovelace can't load when http3 is enabled in Caddy - disabling it makes it work again

Curious what doesn't work properly with http3 enabled on your reverse proxy?

TheLastGimbus commented 10 months ago

I recently re-installed my Rpi from ubuntu to hass os, set up this caddy plugin: https://github.com/einschmidt/addon-caddy-2

And currently, nothing works:

image

Idk if hass os is blocking udp or something, but right now even http2 doesnt work :D

stonith commented 10 months ago

I recently setup envoy in front of HA and the iOS app uses http2 mostly and sometimes http3. Safari on osx and iOS don't seem to use http3 consistently though, chrome will use http3 much more consistently. I haven't tried Android but I'd assume it's more consistent with http3.