mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #5213] [MERGED] deduplicate common logic across proxy, visitor, and metrics modules #5178
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#5178
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/5213
Author: @fatedier
Created: 3/7/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @fatedier
Base:
dev← Head:new📝 Commits (1)
0a820afdeduplicate common logic across proxy, visitor, and metrics modules📊 Changes
11 files changed (+74 additions, -177 deletions)
View changed files
📝
client/visitor/stcp.go(+2 -26)📝
client/visitor/visitor.go(+12 -0)📝
client/visitor/xtcp.go(+2 -26)📝
pkg/metrics/mem/server.go(+22 -49)📝
pkg/util/vhost/http.go(+1 -19)📝
server/proxy/http.go(+1 -9)📝
server/proxy/https.go(+1 -9)📝
server/proxy/proxy.go(+30 -0)📝
server/proxy/stcp.go(+1 -15)📝
server/proxy/sudp.go(+1 -15)📝
server/proxy/tcpmux.go(+1 -9)📄 Description
Summary
parseBasicAuthinpkg/util/vhost/http.gowith existinghttppkg.ParseBasicAuthbuildDomainshelper inBaseProxyfor HTTP/HTTPS/TCPMux domain constructiontoProxyStatshelper to deduplicateProxyStatsstruct construction in metricsstartVisitorListenerhelper inBaseProxyfor STCP/SUDP visitor proxy setupacceptLoophelper inBaseVisitorfor STCP/XTCP connection accept loops11 files changed, 74 insertions(+), 177 deletions(-) — net -103 lines
Test plan
make buildpassesmake testpassesmake fmt/make vetclean🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.