TVHeadend HTSP over Cloudflare Reverse Proxy – Seeking Help
Description of the Issue:
I have a TVHeadend server running on a Raspberry Pi with a dual DVB-T tuner.
I have successfully set up a reverse proxy using OPNsense HAProxy to expose the TVHeadend WebUI (port 9981) over HTTPS using Cloudflare DNS and my domain. The connection is proxied through Cloudflare with an SSL certificate, which works fine.
- WebUI on my domain via HTTPS (port 443) is working.
- M3U playlist also works via HTTPS through Cloudflare when accessed from VLC.
- Cloudflare protects my domain from DDoS and hides my real IP, but only for WebUI and M3U streaming.
However, I also want to access TVHeadend's HTSP (port 9982) via HTTPS through the same setup to make it work with Kodi's TVHeadend PVR addon.
What I Tried:
- Set Kodi to use my domain (
tvheadend.mydomain.com
) on port 443 with HTTPS enabled.
- Tried setting up a separate subdomain (e.g.,
htsp.mydomain.com
) with both "proxied" and "not proxied" modes in Cloudflare.
- HAProxy listens on port 443 and successfully forwards 9981 requests to TVHeadend. I tried adding a similar rule for 9982, but it doesn't work.
- Kodi logs show errors like:
AddOnLog: pvr.hts: unable to connect to tvheadend.mydomain.com:9982
What I'm Looking For:
- The correct HAProxy configuration to allow HTSP traffic (port 9982) over HTTPS through Cloudflare.
- Any necessary changes in TVHeadend to support HTTPS for HTSP.
- Whether HTSP traffic is compatible with Cloudflare's proxy (or if I need a different approach).
Has anyone managed to get HTSP over HTTPS through a reverse proxy working with Cloudflare and Kodi's TVHeadend addon? What’s the best setup?