frp icon indicating copy to clipboard operation
frp copied to clipboard

https2http gives incorrect X-Forwarded-For

Open kylianpl opened this issue 1 year ago • 4 comments

Bug Description

When using the https2http plugin, the server will send his own ip in the X-Forwarded-For example: frp server is 1.2.3.4 frp client is 5.6.7.8 the user is 9.9.9.9 if the user 9.9.9.9 connects to 1.2.3.4, the frp client will recieve X-Forwarded-For: 1.2.3.4 the frp client should recieve X-Forwarded-For: 9.9.9.9

frpc Version

0.51.0

frps Version

0.51.0

System Architecture

linux/amd64

Configurations

[https2http]
type = https
custom_domains = example.com
plugin = https2http
plugin_local_addr = 127.0.0.1:80
plugin_crt_path = /path/to/fullchain.pem
plugin_key_path = /path/to/privkey.pem
plugin_header_X-From-Where = frp

Logs

No response

Steps to reproduce

No response

Affected area

  • [ ] Docs
  • [ ] Installation
  • [ ] Performance and Scalability
  • [ ] Security
  • [ ] User Experience
  • [ ] Test and Release
  • [ ] Developer Infrastructure
  • [X] Client Plugin
  • [X] Server Plugin
  • [ ] Extensions
  • [ ] Others

kylianpl avatar Jul 17 '23 20:07 kylianpl

https://github.com/fatedier/frp#http-x-forwarded-for

It is currently only valid for HTTP.

fatedier avatar Jul 18 '23 03:07 fatedier

However, perhaps we can achieve it by enabling proxy protocol support in the https2http plugin.

fatedier avatar Jul 18 '23 03:07 fatedier

https使用X-Forwarded-For也不支持对么, 以后能支持吗?

ac-sc avatar Aug 11 '23 02:08 ac-sc

will this be supported in the future?

ckpw avatar Sep 25 '23 20:09 ckpw