mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #5212] [MERGED] client/proxy: unify work conn wrapping across all proxy types #5177
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#5177
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/5212
Author: @fatedier
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/6/2026
Merged by: @fatedier
Base:
dev← Head:new📝 Commits (2)
5eab214client/proxy: extract wrapWorkConn to deduplicate UDP/SUDP connection wrapping2f70a2cclient/proxy: unify work conn wrapping with pooled compression for all proxy types📊 Changes
3 files changed (+49 additions, -69 deletions)
View changed files
📝
client/proxy/proxy.go(+39 -25)📝
client/proxy/sudp.go(+5 -22)📝
client/proxy/udp.go(+5 -22)📄 Description
Summary
UDPProxy,SUDPProxy, andHandleTCPWorkConnectioninto a sharedBaseProxy.wrapWorkConnmethodWithCompressionFromPool(pooled) instead of mixed pooled/non-pooled compressionwrapWorkConnacceptsencKeyparameter so XTCP can pass its own secret keydefer recycleFn()ensures pool resources are returned afterJoinor on errorHandlereturns)Changes
client/proxy/proxy.go— new unifiedwrapWorkConn(conn, encKey) (io.ReadWriteCloser, func(), error);HandleTCPWorkConnectionrefactored to use itclient/proxy/udp.go— useswrapWorkConn+WrapReadWriteCloserToConnclient/proxy/sudp.go— same as udp.goTest plan
make buildcompiles both frps and frpcgo test ./client/...passes🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.