mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #5277] [CLOSED] Add NewVisitorConn operation to server plugin system #5225
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#5225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/5277
Author: @jareddarkweb
Created: 4/3/2026
Status: ❌ Closed
Base:
dev← Head:feature/newvisitorconn-plugin📝 Commits (3)
8956cedfeat: Add NewVisitorConn operation to server plugin systemed1ada2docs: Document NewVisitorConn plugin operation3dbcf99test: Add NewVisitorConn plugin operation tests📊 Changes
6 files changed (+207 additions, -26 deletions)
View changed files
📝
doc/server_plugin.md(+25 -7)📝
pkg/plugin/server/manager.go(+51 -12)📝
pkg/plugin/server/plugin.go(+7 -6)📝
pkg/plugin/server/types.go(+7 -0)📝
server/service.go(+20 -1)📝
test/e2e/v1/plugin/server.go(+97 -0)📄 Description
Feature
Support NewVisitorConn operation in server plugin callbacks to enable pre-connection logic for STCP/SUDP proxies.
Motivation
Fixes #5273
When using stcp proxies, users may need to trigger pre-connection actions (e.g., Wake-on-LAN) before a visitor connects. Currently, there's no plugin hook for visitor connections.
Changes
OpNewVisitorConnconstant to plugin operationsNewVisitorConnContentstruct for plugin payloadsRegisterVisitorConnmethodTesting
Example Usage
The plugin will receive notifications when a visitor attempts to connect to an stcp proxy, allowing pre-connection logic like Wake-on-LAN.
Make sure:
fatedier/frp/devbranchjareddarkweb/frp/feature/newvisitorconn-pluginbranch🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.