diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 7cd32351..b50b7403 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -242,11 +242,12 @@ public class LauncherConf public class NettyConfig { public boolean clientEnabled; - public boolean sendExcptionEnabled; + public boolean sendExceptionEnabled; public String launcherURL; public String downloadURL; public String launcherEXEURL; public String address; + public Map<String, String> bindings = new HashMap<>(); public NettyPerformanceConfig performance; public NettyBindAddress[] binds; } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java index 1ec8ca55..1493e12a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/WebSocketService.java @@ -70,7 +70,7 @@ void process(ChannelHandlerContext ctx, TextWebSocketFrame frame, Client client) } catch (Exception e) { LogHelper.error(e); RequestEvent event; - if(server.config.netty.sendExcptionEnabled) + if(server.config.netty.sendExceptionEnabled) { event = new ExceptionEvent(e); } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java index 6641e9f0..6b28b24f 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/websocket/json/update/UpdateResponse.java @@ -39,6 +39,8 @@ public void execute(ChannelHandlerContext ctx, Client client) { service.sendObject(ctx, new ErrorRequestEvent(String.format("Directory %s not found", dirName))); return; } - service.sendObject(ctx, new UpdateRequestEvent(dir.object, LaunchServer.server.config.netty.downloadURL.replace("%dirname%",dirName))); + String url = LaunchServer.server.config.netty.downloadURL.replace("%dirname%",dirName); + if(server.config.netty.bindings.get(dirName) != null) url = server.config.netty.bindings.get(dirName); + service.sendObject(ctx, new UpdateRequestEvent(dir.object, url)); } }