From 4dcba9f3743c5cfe3bd33e4192665043fb898fd7 Mon Sep 17 00:00:00 2001 From: gsd Date: Wed, 10 Jan 2024 18:54:27 +0300 Subject: [PATCH] websocket support v3 --- .../app/controllers/debug/WebSocketPage.java | 4 +- .../other/ExternalVIPController.java | 11 +- .../server/ServerUpdaterController.java | 12 +- src/main/java/app/utils/SaltedCookie.java | 12 +- .../app/websocket/BaseWebsocketHandler.java | 5 + .../IntegrationWebSockerHandler.java | 113 ----------------- .../java/app/websocket/WebSocketConfig.java | 28 ----- .../configuration/WebSocketConfig.java | 30 +++++ .../handlers/ExternalVIPHandler.java | 115 ++++++++++++++++++ .../ServersHandler.java} | 24 +++- 10 files changed, 193 insertions(+), 161 deletions(-) create mode 100644 src/main/java/app/websocket/BaseWebsocketHandler.java delete mode 100644 src/main/java/app/websocket/IntegrationWebSockerHandler.java delete mode 100644 src/main/java/app/websocket/WebSocketConfig.java create mode 100644 src/main/java/app/websocket/configuration/WebSocketConfig.java create mode 100644 src/main/java/app/websocket/handlers/ExternalVIPHandler.java rename src/main/java/app/websocket/{WebSocketHandler.java => handlers/ServersHandler.java} (79%) diff --git a/src/main/java/app/controllers/debug/WebSocketPage.java b/src/main/java/app/controllers/debug/WebSocketPage.java index a56faed..150792b 100644 --- a/src/main/java/app/controllers/debug/WebSocketPage.java +++ b/src/main/java/app/controllers/debug/WebSocketPage.java @@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RestController; public class WebSocketPage { @GetMapping - public String getPage(@RequestParam(required = false, defaultValue = "ws") String route){ + public String getPage(@RequestParam(required = false, defaultValue = "test") String route){ return "\n" + "\n" + "\n" + @@ -57,7 +57,7 @@ public class WebSocketPage { "\n" + "\n" + "