From cd55bc9c4bcec8783e340b9a4fbd23771157482a Mon Sep 17 00:00:00 2001 From: Yuzuki616 Date: Mon, 14 Aug 2023 10:21:48 +0800 Subject: [PATCH] fix bug --- core/sing/hook.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/sing/hook.go b/core/sing/hook.go index c4fd104..428f633 100644 --- a/core/sing/hook.go +++ b/core/sing/hook.go @@ -2,10 +2,11 @@ package sing import ( "context" - "github.com/inazumav/sing-box/common/urltest" "net" "sync" + "github.com/inazumav/sing-box/common/urltest" + "github.com/InazumaV/V2bX/common/rate" "github.com/InazumaV/V2bX/limiter" @@ -71,11 +72,11 @@ func (h *HookServer) RoutedConnection(_ context.Context, conn net.Conn, m adapte }, } if c, ok := h.counter.Load(m.Inbound); ok { - return counter.NewConnCounter(conn, c.(*counter.TrafficCounter).GetCounter(m.Inbound)), t + return counter.NewConnCounter(conn, c.(*counter.TrafficCounter).GetCounter(m.User)), t } else { c := counter.NewTrafficCounter() h.counter.Store(m.Inbound, c) - return counter.NewConnCounter(conn, c.GetCounter(m.Inbound)), t + return counter.NewConnCounter(conn, c.GetCounter(m.User)), t } }