修复流量统计

This commit is contained in:
qaq
2025-06-27 11:56:59 +08:00
parent a5e7062c15
commit a5d7be8405
24 changed files with 431 additions and 685 deletions
@@ -30,9 +30,6 @@ public class WebSocketServer extends TextWebSocketHandler {
@Resource
NodeService nodeService;
@Resource
CheckGostConfigAsync checkGostConfigAsync;
// 存储所有活跃的 WebSocket 连接(
private static final CopyOnWriteArraySet<WebSocketSession> activeSessions = new CopyOnWriteArraySet<>();
@@ -57,13 +54,7 @@ public class WebSocketServer extends TextWebSocketHandler {
if (message.getPayload().contains("memory_usage")){
// 先发送确认消息
sendToUser(session, "{\"type\":\"call\"}");
} else if (message.getPayload().contains("config_report")) {
log.info("收到消息: {}", message.getPayload());
JSONObject jsonObject = JSONObject.parseObject(message.getPayload());
String string = jsonObject.getString("data");
GostConfigDto gostConfigDto = JSONObject.parseObject(string, GostConfigDto.class);
checkGostConfigAsync.cleanNodeConfigs(id, gostConfigDto);
} else if (message.getPayload().contains("requestId")) {
}else if (message.getPayload().contains("requestId")) {
log.info("收到消息: {}", message.getPayload());
// 处理命令响应消息
try {