frp
frp copied to clipboard
https2http gives incorrect X-Forwarded-For
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
https://github.com/fatedier/frp#http-x-forwarded-for
It is currently only valid for HTTP.
However, perhaps we can achieve it by enabling proxy protocol support in the https2http plugin.
https使用X-Forwarded-For也不支持对么, 以后能支持吗?
will this be supported in the future?