Add UserConnTracker to manage user connection cancellations across proxies#5844
Open
ImMohammad20000 wants to merge 2 commits intoXTLS:mainfrom
Open
Add UserConnTracker to manage user connection cancellations across proxies#5844ImMohammad20000 wants to merge 2 commits intoXTLS:mainfrom
ImMohammad20000 wants to merge 2 commits intoXTLS:mainfrom
Conversation
Member
|
#5401 连接追踪是会加的,不过怎么设计还要再考虑下 我看了下你的代码,为啥要 register unregister,每个 user 内存中自带一个 ctx 然后被 remove 时直接 cancel() 不就行了
|
Author
|
I considered that approach, but I wanted to ensure connections are tracked across all proxies without relying on each inbound’s internal context, especially since the removal comes via gRPC API and the user might be referenced from multiple places. Using a separate tracker makes it explicit and easier to debug. Happy to refactor if you think a simpler ctx-based approach inside each user struct. |
Member
|
这不就是个机场计费 helper |
Member
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
there is an old bug that lead to a big issue in panels that leve connections open when users remove from inbounds via gRPC api the connection to that user dose not close in some cases so i implement a connection tracker that track all connections and close theme when users remove from the inbounds
an example of the issue is user limited to 1GB but becouse connections not closed it used 18GB