[GH-ISSUE #5013] [Feature Request] 目前可以做到持续反代一段未处于被监听状态下的端口吗Is it possible to persistently proxy a port that is not in a listening state? #3947

Closed
opened 2026-05-05 14:30:48 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @Moemark on GitHub (Oct 5, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/5013

Describe the feature request

例如我需要代理本机下的4000-5000这1000个端口,但不是每个端口随时都有服务在运行,我想实现frp在不重启的情况下,这1000个端口范围内的服务随开随连,目前最基础的frpc和frps配置可以实现,但是似乎每隔几秒就会报error: dial tcp ip:port: connect: connection refused
然后连续报几条之后frpc断线,需要手动重启客户端服务才能正常运行,尝试过修改心跳和连接池相关的配置,但似乎效果不如什么都不加来的好,也尝试过做脚本监控connection refused字样来进行重启服务,但频繁重启比较影响体验,想问问有没有什么配置方法或解决方案,感谢

For example, I need to proxy 1000 ports in the range of 4000-5000 on my local machine, but not every port has a service running at all times. I want the FRP can handle services within this range of ports, starting and connecting on demand without restarting. Currently, the basic FRPC and FRPS configuration can do this, but it seems to report error: dial tcp ip:port: connect: connection refused every few seconds. After several consecutive errors, the FRPC disconnects and requires a manual restart of the client service to function properly. I have tried modifying heartbeat and connection pool-related configurations, but the results were not as good as leaving them untouched. I also attempted to create a script to monitor the "connection refused" message and restart the service, but frequent restarts negatively impact the user experience. I would like to ask if there are any configuration methods or solutions to address this. Thank you.

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 @Moemark on GitHub (Oct 5, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/5013 ### Describe the feature request 例如我需要代理本机下的4000-5000这1000个端口,但不是每个端口随时都有服务在运行,我想实现frp在不重启的情况下,这1000个端口范围内的服务随开随连,目前最基础的frpc和frps配置可以实现,但是似乎每隔几秒就会报`error: dial tcp ip:port: connect: connection refused` 然后连续报几条之后frpc断线,需要手动重启客户端服务才能正常运行,尝试过修改心跳和连接池相关的配置,但似乎效果不如什么都不加来的好,也尝试过做脚本监控connection refused字样来进行重启服务,但频繁重启比较影响体验,想问问有没有什么配置方法或解决方案,感谢 For example, I need to proxy 1000 ports in the range of 4000-5000 on my local machine, but not every port has a service running at all times. I want the FRP can handle services within this range of ports, starting and connecting on demand without restarting. Currently, the basic FRPC and FRPS configuration can do this, but it seems to report error: dial tcp ip:port: connect: connection refused every few seconds. After several consecutive errors, the FRPC disconnects and requires a manual restart of the client service to function properly. I have tried modifying heartbeat and connection pool-related configurations, but the results were not as good as leaving them untouched. I also attempted to create a script to monitor the "connection refused" message and restart the service, but frequent restarts negatively impact the user experience. I would like to ask if there are any configuration methods or solutions to address this. Thank you. ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:30:48 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 21, 2025):

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

<!-- gh-comment-id:3424244792 --> @github-actions[bot] commented on GitHub (Oct 21, 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#3947
No description provided.