mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 04:30:08 +00:00
add singbox core(just started)
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/Yuzuki616/V2bX/common/counter"
|
||||
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/Yuzuki616/V2bX/conf"
|
||||
"github.com/Yuzuki616/V2bX/limiter"
|
||||
@@ -34,7 +36,7 @@ var serverPacketConnFuncFactoryMap = map[string]pktconns.ServerPacketConnFuncFac
|
||||
type Server struct {
|
||||
tag string
|
||||
l *limiter.Limiter
|
||||
counter *UserTrafficCounter
|
||||
counter *counter.TrafficCounter
|
||||
users sync.Map
|
||||
running atomic.Bool
|
||||
*cs.Server
|
||||
@@ -122,7 +124,7 @@ func (s *Server) runServer(node *panel.NodeInfo, c *conf.ControllerConfig) error
|
||||
// ACL
|
||||
var aclEngine *acl.Engine
|
||||
// Prometheus
|
||||
s.counter = NewUserTrafficCounter()
|
||||
s.counter = counter.NewTrafficCounter()
|
||||
// Packet conn
|
||||
pktConnFuncFactory := serverPacketConnFuncFactoryMap[""]
|
||||
if pktConnFuncFactory == nil {
|
||||
|
||||
Reference in New Issue
Block a user