nps icon indicating copy to clipboard operation
nps copied to clipboard

https不支持获取真实ip

Open bboysoulcn opened this issue 4 years ago • 7 comments

https不支持获取真实ip后端不能得到x-real-ip

bboysoulcn avatar Feb 01 '21 01:02 bboysoulcn

同问

内网网关使用 traefik ,nps 与客户端通讯协议使用 kcp ,将traefik网关端口暴露到公网后,无法在 "X-Forwarded-For" 字段中获取客户端真实ip,http 可以。文档上说明好像是可以的嘛?

image

image-20210201143424014

image-20210201143459760

cdryzun avatar Feb 01 '21 06:02 cdryzun

同问

内网网关使用 traefik ,nps 与客户端通讯协议使用 kcp ,将traefik网关端口暴露到公网后,无法在 "X-Forwarded-For" 字段中获取客户端真实ip,http 可以。完档上说明好像是可以的嘛?

image

image-20210201143424014

image-20210201143459760

我看了代码,貌似https代理里面是少了添加header的函数

bboysoulcn avatar Feb 01 '21 08:02 bboysoulcn

我也遇到这个问题了

uuleaf avatar Feb 09 '21 08:02 uuleaf

同问,代码没看明白

djylb avatar Feb 24 '21 13:02 djylb

遇到同样的问题,http.go里面有addHeader,https.go里面没有。 请问什么时候可以加上这个特性呢?

gary-jiao avatar Jul 28 '21 06:07 gary-jiao

则问题解决了没?

ghost avatar May 27 '23 09:05 ghost

确实是有这个问题,反复验证了,希望作者能抽空解决下这个问题。

yuyinen avatar Jun 20 '23 11:06 yuyinen