[GH-ISSUE #2670] [Feature Request] Stop the client or server gracefully #2131

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

Originally created by @hinupurthakur on GitHub (Nov 22, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2670

Describe the feature request

Currently we don't have a command that can stop the frp client (or server) gracefully on a machine

Describe alternatives you've considered

we should have a command like frpc stop (or frps stop) to stop the active connections gracefully.

Please let me know if this is something we would like to have as a feature, I can help to contribute as well.

Thanks

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @hinupurthakur on GitHub (Nov 22, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2670 ### Describe the feature request Currently we don't have a command that can stop the frp client (or server) gracefully on a machine ### Describe alternatives you've considered we should have a command like `frpc stop` (or `frps stop`) to stop the active connections gracefully. Please let me know if this is something we would like to have as a feature, I can help to contribute as well. Thanks ### Affected area - [X] Docs - [x] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [X] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [X] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:22:13 -06:00
  • closed this issue
  • added the
    todo
    label
Author
Owner

@fatedier commented on GitHub (Nov 23, 2021):

I'm not sure if it's necessary.

Can you describe more about your use case and how to decide when frp service can stop?

Lots of people use frp as port forwarder and their connections will keep alive for a long time.

<!-- gh-comment-id:976142102 --> @fatedier commented on GitHub (Nov 23, 2021): I'm not sure if it's necessary. Can you describe more about your use case and how to decide when frp service can stop? Lots of people use frp as port forwarder and their connections will keep alive for a long time.
Author
Owner

@hinupurthakur commented on GitHub (Nov 23, 2021):

@fatedier Thanks for the response. I am using it with the application for the http proxy. Once I close the application, I want the frpc to stop (not the server, in my case). Currently I am doing it by the process ID but if we can have an option like frpc stop but only if this use case is not too specific for my use.
Thank You!

<!-- gh-comment-id:976405748 --> @hinupurthakur commented on GitHub (Nov 23, 2021): @fatedier Thanks for the response. I am using it with the application for the http proxy. Once I close the application, I want the frpc to stop (not the server, in my case). Currently I am doing it by the process ID but if we can have an option like `frpc stop` but only if this use case is not too specific for my use. Thank You!
Author
Owner

@fatedier commented on GitHub (Nov 24, 2021):

I think it's ok to support graceful shudown only on frpc.

We can add a new api like /api/stop and frpc stop --grace-period=10 will call this api.

PRs on this feature are welcome.

<!-- gh-comment-id:977829599 --> @fatedier commented on GitHub (Nov 24, 2021): I think it's ok to support graceful shudown only on frpc. We can add a new api like `/api/stop` and `frpc stop --grace-period=10` will call this api. PRs on this feature are welcome.
Author
Owner

@hinupurthakur commented on GitHub (Nov 29, 2021):

If nobody have yet taken this issue up, I will be happy to work on it.

<!-- gh-comment-id:981738212 --> @hinupurthakur commented on GitHub (Nov 29, 2021): If nobody have yet taken this issue up, I will be happy to work on it.
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#2131
No description provided.