mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #5219] [MERGED] client/visitor: deduplicate visitor connection handshake and wrapping #5184
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#5184
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/5219
Author: @fatedier
Created: 3/7/2026
Status: ✅ Merged
Merged: 3/7/2026
Merged by: @fatedier
Base:
dev← Head:new📝 Commits (1)
f948c59client/visitor: deduplicate visitor connection handshake and wrapping📊 Changes
4 files changed (+87 additions, -120 deletions)
View changed files
📝
client/visitor/stcp.go(+5 -53)📝
client/visitor/sudp.go(+13 -53)📝
client/visitor/visitor.go(+62 -0)📝
client/visitor/xtcp.go(+7 -14)📄 Description
Summary
dialRawVisitorConnonBaseVisitorto deduplicate the connect + NewVisitorConn handshake (auth, sign key, 10s deadline, error check) shared by STCP and SUDPwrapVisitorConnpackage-level helper to deduplicate encryption + pooled compression wrapping shared by all three visitor types (STCP, SUDP, XTCP)WithCompressiontoWithCompressionFromPool, aligning with STCP/XTCP pooled compressionNet change: +87, -120 lines (33 lines saved)
Test plan
go buildpassesgo vetpassesgolangci-lint run— 0 issuesmake test— all unit tests pass🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.