From eccbeab2f5e1089667e5d0e1369c19fbc5b7f09f Mon Sep 17 00:00:00 2001 From: berlin2123 <68841407+berlin2123@users.noreply.github.com> Date: Sun, 12 Jun 2022 16:37:07 +0800 Subject: [PATCH] Update proxy.go --- server/proxy/proxy.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/proxy/proxy.go b/server/proxy/proxy.go index ee42e261..5d6132bb 100644 --- a/server/proxy/proxy.go +++ b/server/proxy/proxy.go @@ -292,13 +292,13 @@ func HandleUserTCPConnection(pxy Proxy, userConn net.Conn, serverCfg config.Serv xl.Debug("join connections, workConn(l[%s] r[%s]) userConn(l[%s] r[%s])", workConn.LocalAddr().String(), workConn.RemoteAddr().String(), userConn.LocalAddr().String(), userConn.RemoteAddr().String()) - name := pxy.GetName() - proxyType := pxy.GetConf().GetBaseInfo().ProxyType - metrics.Server.OpenConnection(name, proxyType) - inCount, outCount := frpIo.Join(local, userConn) - metrics.Server.CloseConnection(name, proxyType) - metrics.Server.AddTrafficIn(name, proxyType, inCount) - metrics.Server.AddTrafficOut(name, proxyType, outCount) + name := pxy.GetName() + proxyType := pxy.GetConf().GetBaseInfo().ProxyType + metrics.Server.OpenConnection(name, proxyType) + inCount, outCount := frpIo.Join(local, userConn) + metrics.Server.CloseConnection(name, proxyType) + metrics.Server.AddTrafficIn(name, proxyType, inCount) + metrics.Server.AddTrafficOut(name, proxyType, outCount) if IsTheTypeToLog(serverCfg.LogDurationTypes, name) { endtime := time.Now().UnixNano() / 1000000 // time in microseconds