brenner-tobias / addon-cloudflared

Connect remotely to your Home Assistant instance without opening any ports using Cloudflared.
MIT License
879 stars 54 forks source link

additional_hosts not working as expected? #713

Closed INPoppoRTUNE closed 1 month ago

INPoppoRTUNE commented 1 month ago

The problem

I have a local SearxNG container running on http://192.168.1.XXX:YYYY and since I already had this addon running for my HA instance I'm trying to use it's additional_hosts feature instead of spinning up another entire reverse proxy.

I'm able to reach HA at https://mydomain.com and Searx at http://192.168.1.XXX:YYYY, but not at https://searx.mydomain.com. What am I missing? Am I supposed to set something through Cloudflare?

Thanks for your time.

What version of Cloudflared has the issue?

5.1.21

What was the last working version of Cloudflared?

No response

What type of installation are you running?

Home Assistant Supervised

Add-on YAML Configuration

Here's my config based on this example:

external_hostname: mydomain.com
additional_hosts:
  - hostname: searx.mydomain.com
    service: http://192.168.1.XXX:YYYY
tunnel_name: mytunnel
tunnel_token: >-
  [mytoken]

Anything in the logs that might be useful for us?

2024-10-07T14:56:59Z INF Updated to new configuration config="{\"ingress\":[{\"hostname\":\"mydomain.com\",\"originRequest\":{},\"service\":\"http://192.168.1.ZZZ:8123\"},{\"service\":\"http_status:404\"}],\"warp-routing\":{\"enabled\":false}}" version=2

Steps to reproduce the issue

Add the additional_hosts, then restart the addon.

Additional information

No response

elcajon commented 1 month ago

If you use the remote managed tunnel (Cloudflare Dashboard) all options except tunnel_token will be ignored by the add-on.

https://github.com/brenner-tobias/addon-cloudflared/blob/main/cloudflared/DOCS.md#remote-tunnel-add-on-setup-advanced