[GH-ISSUE #4912] frps直接接收proxy_protocol并转发到frpc #3874

Closed
opened 2026-05-05 14:28:35 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @zhaocr0523-eng on GitHub (Aug 7, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4912

Describe the feature request

我先介绍一下我的环境:
内网本地设备使用1panel创建网站使用80端口;
本地又配置了一个4443端口用于反向代理到了80端口;
通过frpc将本地4443端口映射到了公网的30001端口,并在frp中配置了proxy_protocol=v2。
如果通过这样运行外部访问我的30001端口的时候本地日志能够获取到真实的IP。

现在我需要在公网服务器上frps前面再加一个nginx代理配置,将443代理到30001端口,不配置proxy_protocol的情况下,frp传回到内网的真实IP是127.0.0.1,如果我在nginx配置里面也添加了proxy_protocol的时候,业务访问就会失败,然后我nginx日志提示会多一个proxy_protocol相关的头。

目前我也不知道有什么解决的办法

Describe alternatives you've considered

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 @zhaocr0523-eng on GitHub (Aug 7, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4912 ### Describe the feature request 我先介绍一下我的环境: 内网本地设备使用1panel创建网站使用80端口; 本地又配置了一个4443端口用于反向代理到了80端口; 通过frpc将本地4443端口映射到了公网的30001端口,并在frp中配置了proxy_protocol=v2。 如果通过这样运行外部访问我的30001端口的时候本地日志能够获取到真实的IP。 现在我需要在公网服务器上frps前面再加一个nginx代理配置,将443代理到30001端口,不配置proxy_protocol的情况下,frp传回到内网的真实IP是127.0.0.1,如果我在nginx配置里面也添加了proxy_protocol的时候,业务访问就会失败,然后我nginx日志提示会多一个proxy_protocol相关的头。 目前我也不知道有什么解决的办法 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:28:35 -06:00
Author
Owner

@Molyleaf commented on GitHub (Aug 12, 2025):

删掉frp的proxyprotocol配置

<!-- gh-comment-id:3180127429 --> @Molyleaf commented on GitHub (Aug 12, 2025): 删掉frp的proxyprotocol配置
Author
Owner

@f0re1gnKey commented on GitHub (Aug 20, 2025):

nginx(443接收纯tcp)->nginx(发送proxy_protocol头)->frp(接收并转发纯tcp)->内网后端(接收proxy_protocol头)

<!-- gh-comment-id:3203998142 --> @f0re1gnKey commented on GitHub (Aug 20, 2025): nginx(443接收纯tcp)->nginx(发送proxy_protocol头)->frp(接收并转发纯tcp)->内网后端(接收proxy_protocol头)
Author
Owner

@github-actions[bot] commented on GitHub (Sep 4, 2025):

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

<!-- gh-comment-id:3251219554 --> @github-actions[bot] commented on GitHub (Sep 4, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d 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#3874
No description provided.