mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-01-22 09:58:14 -05:00
fix bug
This commit is contained in:
parent
fac2420105
commit
cd55bc9c4b
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user