Loopback outbound: add timeouts (fixes half-closed tcp issue #5917)#6000
Open
Loopback outbound: add timeouts (fixes half-closed tcp issue #5917)#6000
Conversation
Member
|
loopback只是让它重新进路由而已 理论上还是会继续往后传递超时链条的 这个以后也很可能改成dispatchlink |
Author
|
开了200个socat进行压力测试,下面是抓到的pprof goroutine。此时应用服务器(服务器上的socat做的server)已经关闭,xray服务器上的连接已经消失。看上去是卡在了loopback的requestDone里,在等buf.Copy topDetailslist DispatchLinkDetailslist routedDispatchDetailslist DispatchDetailslist ProcessDetails |
Member
|
原始pprof文件传上来 |
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.
fixes #5917.
我遇到的这个问题查明白了,不是tunnel入站的问题,而是loopback出站缺少timeout导致的。这里补上了loopback出站的三个timeout。
luci-app-passwall的默认分流配置目前会使用到loopback,协议链是tunnel inbound -> loopback -> vless outbound。之前tunnel已经改成dispatchlink了,而loopback还是task.Run。应该是这么一接导致outbound没办法close到inbound吧。
PS:loopback原先没有user_level,我为了拿policy的timeout,写了个5的user_level,和tun一样。可能需要修改。