From 49d54cc293ae80f5278d1b9fba466225c6c635e1 Mon Sep 17 00:00:00 2001 From: "J.K.SAGE" Date: Tue, 7 Jan 2025 13:23:05 +0800 Subject: [PATCH] fix: remote conn statistic error (#1776) TCP handshake traffic should be counted as upload traffic for the remote connection --- tunnel/tunnel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index b1b4add5..a4486df7 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -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)