[GH-ISSUE #3208] 客户端获取HTTP_X_FORWARDED_FOR并非用户的IP #2575

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

Originally created by @flystarme on GitHub (Dec 13, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3208

Bug Description

客户端获取HTTP_X_FORWARDED_FOR并非用户的IP,而是frp服务端的IP,这个是bug还是我配置不对呢
如下配置:获取HTTP_X_FORWARDED_FOR 的值为:154.42.61.45

frpc Version

0.45

frps Version

0.45

System Architecture

linux/amd64

Configurations

[common]
bind_port = 7200
vhost_http_port = 80
vhost_https_port = 443

dashboard_addr = 0.0.0.0
dashboard_port = 7800

dashboard user and passwd for basic auth protect

dashboard_user = test
dashboard_pwd = test2234

token = iL43243421432rew

上面为服务端配置
下面为客户端配置

[common]
server_addr = 154.42.61.45
server_port = 7200
token = iL43243421432rew

[synology]
type = http
local_ip = 192.168.10.20
local_port = 80
custom_domains = www.zhngsd.me
use_encryption = true
use_compression = true

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 @flystarme on GitHub (Dec 13, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3208 ### Bug Description 客户端获取HTTP_X_FORWARDED_FOR并非用户的IP,而是frp服务端的IP,这个是bug还是我配置不对呢 如下配置:获取HTTP_X_FORWARDED_FOR 的值为:154.42.61.45 ### frpc Version 0.45 ### frps Version 0.45 ### System Architecture linux/amd64 ### Configurations [common] bind_port = 7200 vhost_http_port = 80 vhost_https_port = 443 dashboard_addr = 0.0.0.0 dashboard_port = 7800 # dashboard user and passwd for basic auth protect dashboard_user = test dashboard_pwd = test2234 token = iL43243421432rew 上面为服务端配置 下面为客户端配置 [common] server_addr = 154.42.61.45 server_port = 7200 token = iL43243421432rew [synology] type = http local_ip = 192.168.10.20 local_port = 80 custom_domains = www.zhngsd.me use_encryption = true use_compression = true ### 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 - [X] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:39:27 -06:00
Author
Owner

@fatedier commented on GitHub (Dec 13, 2022):

可能前面套了 nginx,连接 frps 的是本地应用

<!-- gh-comment-id:1348683282 --> @fatedier commented on GitHub (Dec 13, 2022): 可能前面套了 nginx,连接 frps 的是本地应用
Author
Owner

@github-actions[bot] commented on GitHub (Jan 13, 2023):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1381214856 --> @github-actions[bot] commented on GitHub (Jan 13, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#2575
No description provided.