[GH-ISSUE #3533] https2http gives incorrect X-Forwarded-For #2819

Closed
opened 2026-05-05 13:49:27 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @kylianpl on GitHub (Jul 17, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3533

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
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @kylianpl on GitHub (Jul 17, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3533 ### 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
gitea-mirror 2026-05-05 13:49:27 -06:00
  • closed this issue
  • added the
    todo
    label
Author
Owner

@fatedier commented on GitHub (Jul 18, 2023):

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

It is currently only valid for HTTP.

<!-- gh-comment-id:1639244984 --> @fatedier commented on GitHub (Jul 18, 2023): https://github.com/fatedier/frp#http-x-forwarded-for It is currently only valid for HTTP.
Author
Owner

@fatedier commented on GitHub (Jul 18, 2023):

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

<!-- gh-comment-id:1639252779 --> @fatedier commented on GitHub (Jul 18, 2023): However, perhaps we can achieve it by enabling proxy protocol support in the https2http plugin.
Author
Owner

@ac-sc commented on GitHub (Aug 11, 2023):

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

<!-- gh-comment-id:1674147378 --> @ac-sc commented on GitHub (Aug 11, 2023): https使用X-Forwarded-For也不支持对么, 以后能支持吗?
Author
Owner

@ckpw commented on GitHub (Sep 25, 2023):

will this be supported in the future?

<!-- gh-comment-id:1734454469 --> @ckpw commented on GitHub (Sep 25, 2023): will this be supported in the future?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2819
No description provided.