[GH-ISSUE #3473] 希望frps能支持proxy_protocol #2778

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

Originally created by @minringcheng on GitHub (Jun 1, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3473

Describe the feature request

感谢开发者的贡献!
场景:用了好几年的frp,有境内公网服务器也有境外公网服务器,目前有需求是通过位于海外的公网服务器内网穿透国内的内网机器,通过几年的使用我发现,可能是家用宽带在国际网关的QoS优先级低的原因,当公网服务器位于境外时会出现不稳定的情况,一直断开重连什么的,而且能用的时候http响应也比较慢,而使用境内公网服务器时frp的表现非常好,没有任何断连的情况.
解决办法:原本的路径是海外服务器<->境内内网服务器,后来想到,可以在二者之间加一台境内云服务器,云服务器使用的企业宽带在国际网关的QoS优先级更高网络表现更稳定,测试效果表明是可行的,稳定性大大提升到接近境内公网服务器的水平,而且响应延迟降低了约27%,具体实现方法是在中转服务器上同时运行一个frpc和一个frps,frpc接海外frps,然后转发到本机127.0.0.1的对应端口,本机frps监听这些端口,内网机器frpc连到这个中转服务器frps.实现之后遇到了ssl的问题,网站ssl报错导致无法打开,经过排查发现,在中转服务器frpc上启用proxy_protocol之后就会出现这个问题,关掉就好了,推测应该是中转服务器frps无法正确处理带proxy_protocol的请求导致的.
综上需求,因此希望frps能添加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 @minringcheng on GitHub (Jun 1, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3473 ### Describe the feature request 感谢开发者的贡献! 场景:用了好几年的frp,有境内公网服务器也有境外公网服务器,目前有需求是通过位于海外的公网服务器内网穿透国内的内网机器,通过几年的使用我发现,可能是家用宽带在国际网关的QoS优先级低的原因,当公网服务器位于境外时会出现不稳定的情况,一直断开重连什么的,而且能用的时候http响应也比较慢,而使用境内公网服务器时frp的表现非常好,没有任何断连的情况. 解决办法:原本的路径是海外服务器<->境内内网服务器,后来想到,可以在二者之间加一台境内云服务器,云服务器使用的企业宽带在国际网关的QoS优先级更高网络表现更稳定,测试效果表明是可行的,稳定性大大提升到接近境内公网服务器的水平,而且响应延迟降低了约27%,具体实现方法是在中转服务器上同时运行一个frpc和一个frps,frpc接海外frps,然后转发到本机127.0.0.1的对应端口,本机frps监听这些端口,内网机器frpc连到这个中转服务器frps.实现之后遇到了ssl的问题,网站ssl报错导致无法打开,经过排查发现,在中转服务器frpc上启用proxy_protocol之后就会出现这个问题,关掉就好了,推测应该是中转服务器frps无法正确处理带proxy_protocol的请求导致的. 综上需求,因此希望frps能添加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 - [X] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:47:29 -06:00
Author
Owner

@fatedier commented on GitHub (Jun 2, 2023):

已经存在相类似的 issue: https://github.com/fatedier/frp/issues/2181

另外,你没有说明你使用的 proxy 类型是什么,tcp 还是 http 还是 https。tcp 的话,就直接透传,frps 不需要额外的处理。

<!-- gh-comment-id:1573067601 --> @fatedier commented on GitHub (Jun 2, 2023): 已经存在相类似的 issue: https://github.com/fatedier/frp/issues/2181 另外,你没有说明你使用的 proxy 类型是什么,tcp 还是 http 还是 https。tcp 的话,就直接透传,frps 不需要额外的处理。
Author
Owner

@minringcheng commented on GitHub (Jun 3, 2023):

已经存在相类似的 issue: #2181

另外,你没有说明你使用的 proxy 类型是什么,tcp 还是 http 还是 https。tcp 的话,就直接透传,frps 不需要额外的处理。

是tcp,我不确定是否是由frps对proxy_protocol 的支持引起的,也可能是其他原因导致的,现在的表现是中转服务器上的frpc开启proxy_protocol就会出现 ERR_SSL_PROTOCOL_ERROR,后续准备在虚拟机中尝试复现.
谢谢你的回复

<!-- gh-comment-id:1574781901 --> @minringcheng commented on GitHub (Jun 3, 2023): > 已经存在相类似的 issue: #2181 > > 另外,你没有说明你使用的 proxy 类型是什么,tcp 还是 http 还是 https。tcp 的话,就直接透传,frps 不需要额外的处理。 是tcp,我不确定是否是由frps对proxy_protocol 的支持引起的,也可能是其他原因导致的,现在的表现是中转服务器上的frpc开启proxy_protocol就会出现 ERR_SSL_PROTOCOL_ERROR,后续准备在虚拟机中尝试复现. 谢谢你的回复
Author
Owner

@fatedier commented on GitHub (Jun 4, 2023):

你需要明确你的后端服务是支持这个协议的。

<!-- gh-comment-id:1575540071 --> @fatedier commented on GitHub (Jun 4, 2023): 你需要明确你的后端服务是支持这个协议的。
Author
Owner

@github-actions[bot] commented on GitHub (Jul 30, 2023):

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

<!-- gh-comment-id:1656980215 --> @github-actions[bot] commented on GitHub (Jul 30, 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#2778
No description provided.