fix: remote conn statistic error (#1776)

TCP handshake traffic should be counted as upload traffic for the remote connection
This commit is contained in:
J.K.SAGE 2025-01-07 13:23:05 +08:00 committed by GitHub
parent 1c5f4a3ab1
commit 49d54cc293
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -547,7 +547,7 @@ func handleTCPConn(connCtx C.ConnContext) {
}
logMetadata(metadata, rule, remoteConn)
remoteConn = statistic.NewTCPTracker(remoteConn, statistic.DefaultManager, metadata, rule, 0, int64(peekLen), true)
remoteConn = statistic.NewTCPTracker(remoteConn, statistic.DefaultManager, metadata, rule, int64(peekLen), 0, true)
defer func(remoteConn C.Conn) {
_ = remoteConn.Close()
}(remoteConn)