[PR #2823] [MERGED] Notify server plugins when a proxy is closed #4630

Closed
opened 2026-05-05 14:45:45 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/2823
Author: @kmod-midori
Created: 3/2/2022
Status: Merged
Merged: 3/8/2022
Merged by: @fatedier

Base: devHead: feat-plugin-close-proxy


📝 Commits (6)

  • 782a7c0 add close proxy op
  • ecff348 Move to actual closing routine
  • 098f79b Fix e2e tests for CloseProxy
  • b3c0657 Add warning on resource exhaustion
  • cd1a6c8 Add CloseProxy to manual close
  • 2e98671 retuen errors to CloseProxy callers

📊 Changes

7 files changed (+145 additions, -2 deletions)

View changed files

📝 doc/server_plugin.md (+21 -1)
📝 pkg/plugin/server/manager.go (+32 -0)
📝 pkg/plugin/server/plugin.go (+1 -0)
📝 pkg/plugin/server/types.go (+5 -0)
📝 server/control.go (+29 -0)
📝 test/e2e/framework/process.go (+7 -1)
📝 test/e2e/plugin/server.go (+50 -0)

📄 Description

This is an implementation of #2821 ,but currently does not work.

It seems that similar types of plugin requests are dispatched here, but after adding a fmt.Printf("%+v\n", m), no message is sent to this channel when I press Ctrl-C in frpc, am I missing something?
19739ed31a/server/control.go (L455-L457)

image
image

I have chosen to ignore any response from the plugin since there is nothing to modify in this operation (we can't prevent a proxy from closing).

Help is needed also for end-to-end tests, since it is passing when really should not.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fatedier/frp/pull/2823 **Author:** [@kmod-midori](https://github.com/kmod-midori) **Created:** 3/2/2022 **Status:** ✅ Merged **Merged:** 3/8/2022 **Merged by:** [@fatedier](https://github.com/fatedier) **Base:** `dev` ← **Head:** `feat-plugin-close-proxy` --- ### 📝 Commits (6) - [`782a7c0`](https://github.com/fatedier/frp/commit/782a7c085ab673c5ada932fb92f4bd8fb13b3e3e) add close proxy op - [`ecff348`](https://github.com/fatedier/frp/commit/ecff348b78581558d165a4f9012df0a5661f0149) Move to actual closing routine - [`098f79b`](https://github.com/fatedier/frp/commit/098f79b3d910ba4e210ebf46fe0697b9f13da816) Fix e2e tests for CloseProxy - [`b3c0657`](https://github.com/fatedier/frp/commit/b3c0657b9719218dd3089be048a91bd08e2afc89) Add warning on resource exhaustion - [`cd1a6c8`](https://github.com/fatedier/frp/commit/cd1a6c80a801e5e19d896d4505cdecc6fa835442) Add CloseProxy to manual close - [`2e98671`](https://github.com/fatedier/frp/commit/2e9867169ffaad1f558c9d70b8eba2d55171e989) retuen errors to `CloseProxy` callers ### 📊 Changes **7 files changed** (+145 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `doc/server_plugin.md` (+21 -1) 📝 `pkg/plugin/server/manager.go` (+32 -0) 📝 `pkg/plugin/server/plugin.go` (+1 -0) 📝 `pkg/plugin/server/types.go` (+5 -0) 📝 `server/control.go` (+29 -0) 📝 `test/e2e/framework/process.go` (+7 -1) 📝 `test/e2e/plugin/server.go` (+50 -0) </details> ### 📄 Description This is an implementation of #2821 ,but currently does not work. It seems that similar types of plugin requests are dispatched here, but after adding a `fmt.Printf("%+v\n", m)`, no message is sent to this channel when I press `Ctrl-C` in `frpc`, am I missing something? https://github.com/fatedier/frp/blob/19739ed31a26994e1e68346324f83b9544f7a4b0/server/control.go#L455-L457 ![image](https://user-images.githubusercontent.com/1381736/156321004-a64bb546-33ad-4bf2-9fcc-e2bde931ed37.png) ![image](https://user-images.githubusercontent.com/1381736/156321015-33dff9cf-feb0-48f4-8d8d-486fb9cc9e36.png) I have chosen to ignore any response from the plugin since there is nothing to modify in this operation (we can't prevent a proxy from closing). Help is needed also for end-to-end tests, since it is passing when really should not. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 14:45:45 -06:00
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#4630
No description provided.