refactor: Extract services form router

This commit is contained in:
世界
2025-01-13 15:14:29 +08:00
parent c493cc521f
commit 25d261df35
27 changed files with 314 additions and 464 deletions
+1 -5
View File
@@ -49,11 +49,7 @@ func (s *CommandServer) handleConnectionsConn(conn net.Conn) error {
for {
service := s.service
if service != nil {
clashServer := service.instance.Router().ClashServer()
if clashServer == nil {
return E.New("Clash API disabled")
}
trafficManager = clashServer.(*clashapi.Server).TrafficManager()
trafficManager = service.clashServer.(*clashapi.Server).TrafficManager()
break
}
select {