积分 249
金钱 231
威望 0
贡献 0
HASS币 0
中级会员
积分 249
金钱 231
HASS币 0
求助大佬们,我用lucky做ddns解析ipv6,反代ha想要外网进行访问,做好反代后ha只能进入loading date转圈,显示尚未通过身份验证,Websocket一直是正在验证身份和已断开来回,请问大佬们有解决方案吗?
登录失败后HA里的日志:
日志记录器: homeassistant.components.http.ban
来源: components/http/ban.py:136
集成: HTTP (文档 , 问题 )
首次出现: 00:00:47 (53 次出现)
上次记录: 00:55:45
Login attempt or request with invalid authentication from 240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a (240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a). Requested URL: '/auth/token'. (Home Assistant/2025.5 (io.robbie.HomeAssistant; build:2025.1264; iOS 26.0.1) Alamofire/5.8.0) Login attempt or request with invalid authentication from 240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a (240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a). Requested URL: '/api/websocket'. (Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2025.5 (io.robbie.HomeAssistant; build:2025.1264; iOS 26.0.1) Mobile/HomeAssistant, like Safari)
lucky里的日志:
2025/11/01 00:55:53
{"ExtInfo":{"ClientIP":"240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a","ECH":false,"Host":"ha.308197672.xyz:17777","Method":"POST","URL":"/auth/token","UserAgent":"Home Assistant/2025.5 (io.robbie.HomeAssistant; build:2025.1264; iOS 26.0.1) Alamofire/5.8.0"},"level":"error","msg":"proxy [http://192.168.5.88:8123/auth/token] Error : context canceled"}
2025/11/01 00:55:52
{"ExtInfo":{"ClientIP":"240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a","ECH":false,"Host":"ha.308197672.xyz:17777","Method":"POST","URL":"/api/webhook/9b3ea86dbd49ffc23569b9c1f1a6dc2fef44c2698a9d0142dc9ebe31bd9e1b18","UserAgent":"Home Assistant/2025.5 (io.robbie.HomeAssistant; build:2025.1264; iOS 26.0.1)"},"level":"info","msg":"[ha.308197672.xyz] access target url [http://192.168.5.88:8123/api/webhook/9b3ea86dbd49ffc23569b9c1f1a6dc2fef44c2698a9d0142dc9ebe31bd9e1b18]"}
2025/11/01 00:55:45
{"ExtInfo":{"ClientIP":"240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a","ECH":false,"Host":"ha.308197672.xyz:17777","Method":"POST","URL":"/auth/token","UserAgent":"Home Assistant/2025.5 (io.robbie.HomeAssistant; build:2025.1264; iOS 26.0.1) Alamofire/5.8.0"},"level":"info","msg":"[ha.308197672.xyz] access target url [http://192.168.5.88:8123/auth/token]"}
2025/11/01 00:55:45
{"ExtInfo":{"ClientIP":"240e:47f:ac40:b51:34c8:a4eb:44e0:bc6a","ECH":false,"Host":"ha.308197672.xyz:17777","Method":"GET","URL":"/api/websocket","UserAgent":"Home Assistant/2025.5 (io.robbie.HomeAssistant; build:2025.1264; iOS 26.0.1)"},"level":"info","msg":"[ha.308197672.xyz] access target url [http://192.168.5.88:8123/api/websocket]"}
configuration.yaml里已经添加了:
http:
use_x_forwarded_for: true
trusted_proxies:
- 0.0.0.0/0
- 192.168.5.88
求解!!!