Describe the bug
在设置home assistant的域名访问时,发现log里面出现invalid ip (是因为多了port info,但与issue问题无关),格式如下:
[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19744, [
而使用caddy做反向代理的时候访问同样地址,log则是:
[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19757
对比之后发现,nps的域名代理会在log的X-Forwarded-For信息里面多出一个, [
To Reproduce
Steps to reproduce the behavior:
home assistant运行在localhost:8123。也可用TCP tunnel先包裹一层,比如12312代理到8123。然后分别用caddy或nps做域名代理。
观察home-assistant.log会发现[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19757
用caddy将2中handle的同样内容导入nps,nps段设置域名代理访问localhost:8123,观察log发现[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19744, [
可反复多次对比复现。
Expected behavior
不应该出现, [
Screenshots or logs
Server (please complete the following information):
OS: Debian 12
ARCH: Amd64
Tunnel: 域名解析
Version: 0.26.17
Client (please complete the following information):
Describe the bug 在设置home assistant的域名访问时,发现log里面出现invalid ip (是因为多了port info,但与issue问题无关),格式如下:
[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19744, [
而使用caddy做反向代理的时候访问同样地址,log则是:[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19757
对比之后发现,nps的域名代理会在log的X-Forwarded-For信息里面多出一个, [
To Reproduce Steps to reproduce the behavior:
观察
home-assistant.log
会发现[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19757
[homeassistant.components.http.forwarded] Invalid IP address in X-Forwarded-For: xx.xx.xx.xx:19744, [
Expected behavior 不应该出现
, [
Screenshots or logs![image](https://github.com/yisier/nps/assets/13076552/93289faf-89f9-4bd7-888f-f967cafe59b8)
Server (please complete the following information):
Client (please complete the following information):
Additional context N/A