mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
fix bug
This commit is contained in:
@@ -2,10 +2,11 @@ package sing
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/inazumav/sing-box/common/urltest"
|
|
||||||
"net"
|
"net"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/inazumav/sing-box/common/urltest"
|
||||||
|
|
||||||
"github.com/InazumaV/V2bX/common/rate"
|
"github.com/InazumaV/V2bX/common/rate"
|
||||||
|
|
||||||
"github.com/InazumaV/V2bX/limiter"
|
"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 {
|
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 {
|
} else {
|
||||||
c := counter.NewTrafficCounter()
|
c := counter.NewTrafficCounter()
|
||||||
h.counter.Store(m.Inbound, c)
|
h.counter.Store(m.Inbound, c)
|
||||||
return counter.NewConnCounter(conn, c.GetCounter(m.Inbound)), t
|
return counter.NewConnCounter(conn, c.GetCounter(m.User)), t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user