From e0c6386d23fafab5c74bdde2ce64895109460f37 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 17 Feb 2019 19:13:36 +0700 Subject: [PATCH 01/30] [FEATURE] netty.clientEnabled --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 1 + .../java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index df4cb8c7..b0988ecb 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -185,6 +185,7 @@ public class NettyConfig { public String bindAddress; public int port; + public boolean clientEnabled; public String launcherURL; public String launcherEXEURL; } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java index e61e297b..19004884 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java @@ -130,7 +130,7 @@ public Path process(Path inputJar) throws IOException { server.buildHookManager.hook(context); jaConfigurator.setAddress(server.config.getAddress()); jaConfigurator.setPort(server.config.port); - if(server.config.netty != null) + if(server.config.netty.clientEnabled) jaConfigurator.setNettyPort(server.config.netty.port); if(server.config.guardLicense != null) jaConfigurator.setGuardLicense(server.config.guardLicense.name, server.config.guardLicense.key, server.config.guardLicense.encryptKey); From bcedb95eec40a0f42903850df43de0f0e6ee1e2a Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 16:55:21 +0700 Subject: [PATCH 02/30] [FEATURE] UpdateResponse --- .../socket/websocket/WebSocketService.java | 2 ++ .../websocket/json/update/UpdateResponse.java | 36 +++++++++++++++++++ .../websockets/ClientWebSocketService.java | 1 + .../events/request/UpdateRequestEvent.java | 16 +++++++++ 4 files changed, 55 insertions(+) create mode 100644 LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java create mode 100644 libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketService.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketService.java index ffebe4cc..e9b5db5e 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketService.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/WebSocketService.java @@ -21,6 +21,7 @@ import ru.gravit.launchserver.socket.websocket.json.auth.*; import ru.gravit.launchserver.socket.websocket.json.update.LauncherResponse; import ru.gravit.launchserver.socket.websocket.json.update.UpdateListResponse; +import ru.gravit.launchserver.socket.websocket.json.update.UpdateResponse; import ru.gravit.utils.helper.LogHelper; import java.lang.reflect.Type; @@ -79,6 +80,7 @@ public void registerResponses() { registerResponse("cmdExec", ExecCommandResponse.class); registerResponse("setProfile", SetProfileResponse.class); registerResponse("addLogListener", AddLogListenerResponse.class); + registerResponse("update", UpdateResponse.class); } public void sendObject(ChannelHandlerContext ctx, Object obj) { diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java new file mode 100644 index 00000000..6c0502c6 --- /dev/null +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/update/UpdateResponse.java @@ -0,0 +1,36 @@ +package ru.gravit.launchserver.socket.websocket.json.update; + +import io.netty.channel.ChannelHandlerContext; +import ru.gravit.launcher.events.request.ErrorRequestEvent; +import ru.gravit.launcher.events.request.UpdateRequestEvent; +import ru.gravit.launcher.profiles.ClientProfile; +import ru.gravit.launchserver.LaunchServer; +import ru.gravit.launchserver.socket.Client; +import ru.gravit.launchserver.socket.websocket.WebSocketService; +import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface; + +public class UpdateResponse implements JsonResponseInterface { + public String dir; + @Override + public String getType() { + return "update"; + } + + @Override + public void execute(WebSocketService service, ChannelHandlerContext ctx, Client client) throws Exception { + if (!client.isAuth || client.type != Client.Type.USER || client.profile == null) { + service.sendObject(ctx,new ErrorRequestEvent("Assess denied")); + return; + } + if (!client.permissions.canAdmin) { + for (ClientProfile p : LaunchServer.server.getProfiles()) { + if (!client.profile.getTitle().equals(p.getTitle())) continue; + if (!p.isWhitelistContains(client.username)) { + service.sendObject(ctx,new ErrorRequestEvent("You don't download this folder")); + return; + } + } + } + service.sendObject(ctx,new UpdateRequestEvent(LaunchServer.server.updatesDirMap.get(dir).object)); + } +} diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java index 98629b59..513c1803 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java @@ -88,6 +88,7 @@ public void registerResults() { registerResult("setProfile", SetProfileRequestEvent.class); registerResult("updateList", UpdateListRequestEvent.class); registerResult("error", ErrorRequestEvent.class); + registerResult("update", UpdateRequestEvent.class); } public void registerHandler(EventHandler eventHandler) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java new file mode 100644 index 00000000..122db396 --- /dev/null +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java @@ -0,0 +1,16 @@ +package ru.gravit.launcher.events.request; + +import ru.gravit.launcher.hasher.HashedDir; +import ru.gravit.launcher.request.ResultInterface; + +public class UpdateRequestEvent implements ResultInterface { + public HashedDir hdir; + @Override + public String getType() { + return "update"; + } + + public UpdateRequestEvent(HashedDir hdir) { + this.hdir = hdir; + } +} From 57fc3b1c04651b8e802f180dbeea62a46346624f Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 17:11:42 +0700 Subject: [PATCH 03/30] =?UTF-8?q?[FIX]=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B0=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D0=B9=D0=BC=D0=B0=20=D0=B4=D0=BB=D1=8F=20UpdateResponse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Launcher/runtime/dialog/dialog.js | 4 +-- .../launcher/client/LauncherSettings.java | 7 ++--- .../request/update/UpdateRequest.java | 26 ++++++++++++------- .../events/request/UpdateRequestEvent.java | 2 ++ 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 3007dea9..673e0570 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -237,7 +237,7 @@ var digest = profile.isUpdateFastCheck(); makeSetProfileRequest(profile, function() { ClientLauncher.setProfile(profile); makeUpdateRequest(assetDirName, assetDir, assetMatcher, digest, function(assetHDir) { - settings.lastHDirs.put(assetDirName, assetHDir); + settings.lastHDirs.put(assetDirName, assetHDir.hdir); // Update client dir update.resetOverlay("Обновление файлов клиента"); @@ -245,7 +245,7 @@ var digest = profile.isUpdateFastCheck(); var clientDir = settings.updatesDir.resolve(clientDirName); var clientMatcher = profile.getClientUpdateMatcher(); makeUpdateRequest(clientDirName, clientDir, clientMatcher, digest, function(clientHDir) { - settings.lastHDirs.put(clientDirName, clientHDir); + settings.lastHDirs.put(clientDirName, clientHDir.hdir); doLaunchClient(assetDir, assetHDir, clientDir, clientHDir, profile, pp, accessToken); }); }); diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java index 1921204c..be8938b8 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java @@ -46,7 +46,7 @@ public class LauncherSettings { @LauncherAPI public List lastProfiles = new LinkedList<>(); @LauncherAPI - public Map> lastHDirs = new HashMap<>(16); + public Map lastHDirs = new HashMap<>(16); @LauncherAPI public void load() throws SignatureException { @@ -103,7 +103,6 @@ public void read(HInput input) throws IOException, SignatureException { setRAM(input.readLength(JVMHelper.RAM)); // Offline cache - RSAPublicKey publicKey = Launcher.getConfig().publicKey; lastDigest = input.readBoolean() ? input.readByteArray(0) : null; lastProfiles.clear(); int lastProfilesCount = input.readLength(0); @@ -114,8 +113,6 @@ public void read(HInput input) throws IOException, SignatureException { int lastHDirsCount = input.readLength(0); for (int i = 0; i < lastHDirsCount; i++) { String name = IOHelper.verifyFileName(input.readString(255)); - VerifyHelper.putIfAbsent(lastHDirs, name, new SignedObjectHolder<>(input, publicKey, HashedDir::new), - java.lang.String.format("Duplicate offline hashed dir: '%s'", name)); } } @@ -153,7 +150,7 @@ public void write(HOutput output) throws IOException { output.writeString(Launcher.gson.toJson(profile), 0); } output.writeLength(lastHDirs.size(), 0); - for (Map.Entry> entry : lastHDirs.entrySet()) { + for (Map.Entry entry : lastHDirs.entrySet()) { output.writeString(entry.getKey(), 0); entry.getValue().write(output); } diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java index 687c656a..80352243 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/update/UpdateRequest.java @@ -3,6 +3,7 @@ import ru.gravit.launcher.Launcher; import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.LauncherConfig; +import ru.gravit.launcher.events.request.UpdateRequestEvent; import ru.gravit.launcher.hasher.FileNameMatcher; import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.hasher.HashedEntry; @@ -11,6 +12,8 @@ import ru.gravit.launcher.request.RequestType; import ru.gravit.launcher.request.UpdateAction; import ru.gravit.launcher.request.update.UpdateRequest.State.Callback; +import ru.gravit.launcher.request.websockets.LegacyRequestBridge; +import ru.gravit.launcher.request.websockets.RequestInterface; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.SerializeLimits; @@ -35,7 +38,12 @@ import java.util.Queue; import java.util.zip.InflaterInputStream; -public final class UpdateRequest extends Request> { +public final class UpdateRequest extends Request implements RequestInterface { + + @Override + public String getType() { + return "update"; + } public static final class State { @FunctionalInterface @@ -189,6 +197,11 @@ private static void fillActionsQueue(Queue queue, HashedDir mismat } } } + @Override + public UpdateRequestEvent requestWebSockets() throws Exception + { + return (UpdateRequestEvent) LegacyRequestBridge.sendRequest(this); + } // Instance private final String dirName; @@ -290,16 +303,9 @@ public Integer getLegacyType() { } @Override - public SignedObjectHolder request() throws Exception { + protected UpdateRequestEvent requestDo(HInput input, HOutput output) throws IOException, SignatureException { Files.createDirectories(dir); localDir = new HashedDir(dir, matcher, false, digest); - - // Start request - return super.request(); - } - - @Override - protected SignedObjectHolder requestDo(HInput input, HOutput output) throws IOException, SignatureException { // Write update dir name output.writeString(dirName, 255); output.flush(); @@ -365,7 +371,7 @@ protected SignedObjectHolder requestDo(HInput input, HOutput output) // Write update completed packet deleteExtraDir(dir, diff.extra, diff.extra.flag); - return remoteHDirHolder; + return new UpdateRequestEvent(remoteHDirHolder.object); } @LauncherAPI diff --git a/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java index 122db396..7829b48e 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/events/request/UpdateRequestEvent.java @@ -1,9 +1,11 @@ package ru.gravit.launcher.events.request; +import ru.gravit.launcher.LauncherNetworkAPI; import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.request.ResultInterface; public class UpdateRequestEvent implements ResultInterface { + @LauncherNetworkAPI public HashedDir hdir; @Override public String getType() { From 2fa638d3c6e9d83e00f523bf76c9a4c6ed8db875 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 17:20:00 +0700 Subject: [PATCH 04/30] [FEATURE] nettyAddress --- .../main/java/ru/gravit/launchserver/LaunchServer.java | 1 + .../ru/gravit/launchserver/binary/JAConfigurator.java | 10 ++++++++++ .../launchserver/binary/tasks/MainBuildTask.java | 5 +++++ .../main/java/ru/gravit/launcher/AutogenConfig.java | 2 ++ 4 files changed, 18 insertions(+) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index b0988ecb..717aac3f 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -188,6 +188,7 @@ public class NettyConfig public boolean clientEnabled; public String launcherURL; public String launcherEXEURL; + public String address; } public class GuardLicenseConf { diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JAConfigurator.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JAConfigurator.java index 70d40735..d6d683c0 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JAConfigurator.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JAConfigurator.java @@ -70,6 +70,11 @@ public void setAddress(String address) { body.append(address); body.append("\";"); } + public void setNettyAddress(String address) { + body.append("this.nettyAddress = \""); + body.append(address); + body.append("\";"); + } public void setProjectName(String name) { body.append("this.projectname = \""); @@ -134,6 +139,11 @@ public void setDownloadJava(boolean b) { body.append(b ? "true" : "false"); body.append(";"); } + public void setNettyEnabled(boolean b) { + body.append("this.isNettyEnabled = "); + body.append(b ? "true" : "false"); + body.append(";"); + } public void setWarningMissArchJava(boolean b) { body.append("this.isWarningMissArchJava = "); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java index 19004884..7c152f26 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/tasks/MainBuildTask.java @@ -130,14 +130,19 @@ public Path process(Path inputJar) throws IOException { server.buildHookManager.hook(context); jaConfigurator.setAddress(server.config.getAddress()); jaConfigurator.setPort(server.config.port); + jaConfigurator.setNettyEnabled(server.config.netty.clientEnabled); if(server.config.netty.clientEnabled) + { jaConfigurator.setNettyPort(server.config.netty.port); + jaConfigurator.setNettyAddress(server.config.netty.address); + } if(server.config.guardLicense != null) jaConfigurator.setGuardLicense(server.config.guardLicense.name, server.config.guardLicense.key, server.config.guardLicense.encryptKey); jaConfigurator.setProjectName(server.config.projectName); jaConfigurator.setSecretKey(SecurityHelper.randomStringAESKey()); jaConfigurator.setClientPort(32148 + SecurityHelper.newRandom().nextInt(512)); jaConfigurator.setUsingWrapper(server.config.isUsingWrapper); + jaConfigurator.setWarningMissArchJava(server.config.isWarningMissArchJava); jaConfigurator.setDownloadJava(server.config.isDownloadJava); jaConfigurator.setEnv(server.config.env); server.buildHookManager.registerAllClientModuleClass(jaConfigurator); diff --git a/libLauncher/src/main/java/ru/gravit/launcher/AutogenConfig.java b/libLauncher/src/main/java/ru/gravit/launcher/AutogenConfig.java index 1845aaf5..508333fa 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/AutogenConfig.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/AutogenConfig.java @@ -3,6 +3,7 @@ public class AutogenConfig { public String projectname; public String address; + public String nettyAddress; public int port; public int nettyPort; public int clientPort; @@ -10,6 +11,7 @@ public class AutogenConfig { private boolean isInitModules; public boolean isUsingWrapper; public boolean isDownloadJava; //Выставление этого флага требует модификации runtime части + public boolean isNettyEnabled; public String secretKeyClient; public String guardLicenseName; public String guardLicenseKey; From 709efdd04e48684ff85ead5b63aca0d77a903ccd Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 17:23:24 +0700 Subject: [PATCH 05/30] [FEATURE] nettyEnabled/nettyAddress --- .../src/main/java/ru/gravit/launcher/request/Request.java | 2 +- .../request/websockets/ClientWebSocketService.java | 8 ++++---- .../launcher/request/websockets/LegacyRequestBridge.java | 8 ++++---- .../src/main/java/ru/gravit/launcher/LauncherConfig.java | 6 ++++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java index 8d1dce9e..5eeba121 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java @@ -58,7 +58,7 @@ public R request() throws Exception { if (!started.compareAndSet(false, true)) throw new IllegalStateException("Request already started"); R wsResult = null; - if(config.nettyPort != 0) + if(config.isNettyEnabled) wsResult = requestWebSockets(); if(wsResult != null) return wsResult; // Make request to LaunchServer diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java index 513c1803..e49fb003 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/ClientWebSocketService.java @@ -22,8 +22,8 @@ public class ClientWebSocketService extends ClientJSONPoint { private HashMap> results; private HashSet handlers; - public ClientWebSocketService(GsonBuilder gsonBuilder, String address, int port, int i) { - super(createURL(address, port), Collections.emptyMap(), i); + public ClientWebSocketService(GsonBuilder gsonBuilder, String address, int i) { + super(createURL(address), Collections.emptyMap(), i); requests = new HashMap<>(); results = new HashMap<>(); handlers = new HashSet<>(); @@ -33,9 +33,9 @@ public ClientWebSocketService(GsonBuilder gsonBuilder, String address, int port, this.gsonBuilder.registerTypeAdapter(HashedEntry.class, new HashedEntryAdapter()); this.gson = gsonBuilder.create(); } - private static URI createURL(String address, int port) { + private static URI createURL(String address) { try { - URI u = new URI("ws://".concat(address).concat(":").concat(String.valueOf(port)).concat("/api")); + URI u = new URI(address); return u; } catch (Throwable e) { LogHelper.error(e); diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/LegacyRequestBridge.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/LegacyRequestBridge.java index 72728fcb..bae9f897 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/LegacyRequestBridge.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/websockets/LegacyRequestBridge.java @@ -33,21 +33,21 @@ public static ResultInterface sendRequest(RequestInterface request) throws IOExc } return result; } - public static void initWebSockets(String address, int port) + public static void initWebSockets(String address) { - service = new ClientWebSocketService(new GsonBuilder(), address, port, 5000); + service = new ClientWebSocketService(new GsonBuilder(), address, 5000); service.registerResults(); service.registerRequests(); service.registerHandler(waitEventHandler); try { if(!service.connectBlocking()) LogHelper.error("Error connecting"); - LogHelper.debug("Connect to %s:%d",address,port); + LogHelper.debug("Connect to %s",address); } catch (InterruptedException e) { e.printStackTrace(); } } static { if(Launcher.getConfig().nettyPort != 0) - initWebSockets(Launcher.getConfig().address.getHostName(),Launcher.getConfig().nettyPort); + initWebSockets(Launcher.getConfig().nettyAddress); } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java b/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java index 6d21dfec..77dfebdc 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java @@ -28,6 +28,7 @@ public static AutogenConfig getAutogenConfig() { // Instance @LauncherAPI public InetSocketAddress address; + public String nettyAddress; public int nettyPort; @LauncherAPI public final String projectname; @@ -42,6 +43,7 @@ public static AutogenConfig getAutogenConfig() { public final boolean isUsingWrapper; public final boolean isDownloadJava; public final boolean isWarningMissArchJava; + public final boolean isNettyEnabled; public final String guardLicenseName; public final String guardLicenseKey; @@ -63,6 +65,8 @@ public LauncherConfig(HInput input) throws IOException, InvalidKeySpecException guardLicenseKey = config.guardLicenseKey; guardLicenseName = config.guardLicenseName; nettyPort = config.nettyPort; + nettyAddress = config.nettyAddress; + isNettyEnabled = config.isNettyEnabled; LauncherEnvironment env; if (config.env == 0) env = LauncherEnvironment.DEV; else if (config.env == 1) env = LauncherEnvironment.DEBUG; @@ -99,6 +103,7 @@ public LauncherConfig(String address, int port, RSAPublicKey publicKey, Map Date: Wed, 20 Feb 2019 17:35:04 +0700 Subject: [PATCH 06/30] =?UTF-8?q?[FEATURE]=20=D0=9A=D0=BE=D0=BD=D1=84?= =?UTF-8?q?=D0=B8=D0=B3=D1=83=D1=80=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20netty=20=D0=BF=D1=80=D0=B8=20=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 717aac3f..54d11037 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -569,6 +569,11 @@ private void generateConfigIfNotExists() throws IOException { newConfig.binaryName = "Launcher"; newConfig.whitelistRejectString = "Вас нет в белом списке"; + newConfig.netty = new NettyConfig(); + newConfig.netty.address = "ws://localhost:9274"; + newConfig.netty.clientEnabled = false; + newConfig.netty.port = 9274; + newConfig.threadCoreCount = 0; // on your own newConfig.threadCount = JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors(); From a738f7566737ba017b94de4c91411c1ef5e93358 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 18:24:26 +0700 Subject: [PATCH 07/30] =?UTF-8?q?[FIX]=20=D0=A4=D0=B8=D0=BA=D1=81=20doLaun?= =?UTF-8?q?chClient?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Launcher/runtime/dialog/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 673e0570..93a6460e 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -246,7 +246,7 @@ var digest = profile.isUpdateFastCheck(); var clientMatcher = profile.getClientUpdateMatcher(); makeUpdateRequest(clientDirName, clientDir, clientMatcher, digest, function(clientHDir) { settings.lastHDirs.put(clientDirName, clientHDir.hdir); - doLaunchClient(assetDir, assetHDir, clientDir, clientHDir, profile, pp, accessToken); + doLaunchClient(assetDir, assetHDir.hdir, clientDir, clientHDir.hdir, profile, pp, accessToken); }); }); }); From 66f773a8cef89baf83e8b70b2b1ba76431a2cf43 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 18:30:14 +0700 Subject: [PATCH 08/30] =?UTF-8?q?[FIX]=20=D0=A4=D0=B8=D0=BA=D1=81=20launch?= =?UTF-8?q?Client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/gravit/launcher/client/ClientLauncher.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index ac486aee..ad331a4a 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -298,7 +298,7 @@ private static void launch(ClientProfile profile, Params params) throws Throwabl @LauncherAPI public static Process launch( - SignedObjectHolder assetHDir, SignedObjectHolder clientHDir, + HashedDir assetHDir, HashedDir clientHDir, ClientProfile profile, Params params, boolean pipeOutput) throws Throwable { // Write params file (instead of CLI; Mustdie32 API can't handle command line > 32767 chars) LogHelper.debug("Writing ClientLauncher params"); @@ -478,7 +478,7 @@ public static void main(String... args) throws Throwable { } @LauncherAPI - public void launchLocal(SignedObjectHolder assetHDir, SignedObjectHolder clientHDir, + public void launchLocal(HashedDir assetHDir, HashedDir clientHDir, ClientProfile profile, Params params) throws Throwable { RSAPublicKey publicKey = Launcher.getConfig().publicKey; LogHelper.debug("Verifying ClientLauncher sign and classpath"); @@ -497,17 +497,17 @@ public void launchLocal(SignedObjectHolder assetHDir, SignedObjectHol LogHelper.debug("Starting JVM and client WatchService"); FileNameMatcher assetMatcher = profile.getAssetUpdateMatcher(); FileNameMatcher clientMatcher = profile.getClientUpdateMatcher(); - try (DirWatcher assetWatcher = new DirWatcher(params.assetDir, assetHDir.object, assetMatcher, digest); - DirWatcher clientWatcher = new DirWatcher(params.clientDir, clientHDir.object, clientMatcher, digest)) { + try (DirWatcher assetWatcher = new DirWatcher(params.assetDir, assetHDir, assetMatcher, digest); + DirWatcher clientWatcher = new DirWatcher(params.clientDir, clientHDir, clientMatcher, digest)) { // Verify current state of all dirs //verifyHDir(IOHelper.JVM_DIR, jvmHDir.object, null, digest); - HashedDir hdir = clientHDir.object; + HashedDir hdir = clientHDir; //for (OptionalFile s : Launcher.profile.getOptional()) { // if (params.updateOptional.contains(s)) s.mark = true; // else hdir.removeR(s.file); //} Launcher.profile.pushOptionalFile(hdir,false); - verifyHDir(params.assetDir, assetHDir.object, assetMatcher, digest); + verifyHDir(params.assetDir, assetHDir, assetMatcher, digest); verifyHDir(params.clientDir, hdir, clientMatcher, digest); Launcher.modulesManager.postInitModules(); // Start WatchService, and only then client From 5d77b9c53ab9153ad1c41b256d6b7bb7245224c8 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 18:44:30 +0700 Subject: [PATCH 09/30] =?UTF-8?q?[FIX]=20=D0=A4=D0=B8=D0=BA=D1=81=20Client?= =?UTF-8?q?Launcher.main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gravit/launcher/client/ClientLauncher.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index ad331a4a..e89b5e6a 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -411,7 +411,7 @@ public static void main(String... args) throws Throwable { LogHelper.debug("Reading ClientLauncher params"); Params params; ClientProfile profile; - SignedObjectHolder assetHDir, clientHDir; + HashedDir assetHDir, clientHDir; RSAPublicKey publicKey = Launcher.getConfig().publicKey; try { try (Socket socket = IOHelper.newSocket()) { @@ -421,8 +421,8 @@ public static void main(String... args) throws Throwable { profile = gson.fromJson(input.readString(0), ClientProfile.class); // Read hdirs - assetHDir = new SignedObjectHolder<>(input, publicKey, HashedDir::new); - clientHDir = new SignedObjectHolder<>(input, publicKey, HashedDir::new); + assetHDir = new HashedDir(input); + clientHDir = new HashedDir(input); } } } catch (IOException ex) { @@ -457,18 +457,17 @@ public static void main(String... args) throws Throwable { LogHelper.debug("Starting JVM and client WatchService"); FileNameMatcher assetMatcher = profile.getAssetUpdateMatcher(); FileNameMatcher clientMatcher = profile.getClientUpdateMatcher(); - try (DirWatcher assetWatcher = new DirWatcher(params.assetDir, assetHDir.object, assetMatcher, digest); - DirWatcher clientWatcher = new DirWatcher(params.clientDir, clientHDir.object, clientMatcher, digest)) { + try (DirWatcher assetWatcher = new DirWatcher(params.assetDir, assetHDir, assetMatcher, digest); + DirWatcher clientWatcher = new DirWatcher(params.clientDir, clientHDir, clientMatcher, digest)) { // Verify current state of all dirs //verifyHDir(IOHelper.JVM_DIR, jvmHDir.object, null, digest); - HashedDir hdir = clientHDir.object; //for (OptionalFile s : Launcher.profile.getOptional()) { // if (params.updateOptional.contains(s)) s.mark = true; // else hdir.removeR(s.file); //} - Launcher.profile.pushOptionalFile(hdir,false); - verifyHDir(params.assetDir, assetHDir.object, assetMatcher, digest); - verifyHDir(params.clientDir, hdir, clientMatcher, digest); + Launcher.profile.pushOptionalFile(clientHDir,false); + verifyHDir(params.assetDir, assetHDir, assetMatcher, digest); + verifyHDir(params.clientDir, clientHDir, clientMatcher, digest); Launcher.modulesManager.postInitModules(); // Start WatchService, and only then client CommonHelper.newThread("Asset Directory Watcher", true, assetWatcher).start(); From 67b88bc5938365726258fc85be7352a91cc1cc7b Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 18:50:54 +0700 Subject: [PATCH 10/30] =?UTF-8?q?[FIX]=20verifyHDir=20=D0=BF=D0=BE=D1=81?= =?UTF-8?q?=D0=BB=D0=B5=20=D1=81=D1=82=D0=B0=D1=80=D1=82=D0=B0=20WatchServ?= =?UTF-8?q?ice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launcher/client/ClientLauncher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index e89b5e6a..c21485f8 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -466,12 +466,12 @@ public static void main(String... args) throws Throwable { // else hdir.removeR(s.file); //} Launcher.profile.pushOptionalFile(clientHDir,false); - verifyHDir(params.assetDir, assetHDir, assetMatcher, digest); - verifyHDir(params.clientDir, clientHDir, clientMatcher, digest); Launcher.modulesManager.postInitModules(); // Start WatchService, and only then client CommonHelper.newThread("Asset Directory Watcher", true, assetWatcher).start(); CommonHelper.newThread("Client Directory Watcher", true, clientWatcher).start(); + verifyHDir(params.assetDir, assetHDir, assetMatcher, digest); + verifyHDir(params.clientDir, clientHDir, clientMatcher, digest); launch(profile, params); } } From fc21e854d3d22f0b316af99ffa2a819c1dd54d7a Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 18:51:22 +0700 Subject: [PATCH 11/30] =?UTF-8?q?[FIX]=20=D0=9F=D0=BE=D0=B4=D0=BD=D1=8F?= =?UTF-8?q?=D1=82=20settingsMagic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launcher/client/LauncherSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java index be8938b8..64fd3a55 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java @@ -21,7 +21,7 @@ import java.util.Map; public class LauncherSettings { - public static int settingsMagic = 0xc0de9; + public static int settingsMagic = 0xc0dea; @LauncherAPI public Path file = DirBridge.dir.resolve("settings.bin"); @LauncherAPI From b9aeacc38bd0f865bfeb33c831e43f19883c234d Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 20 Feb 2019 18:55:16 +0700 Subject: [PATCH 12/30] =?UTF-8?q?[FIX]=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=20URL=20netty.address?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 54d11037..8631d732 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -544,7 +544,7 @@ private void generateConfigIfNotExists() throws IOException { // Create new config LogHelper.info("Creating LaunchServer config"); Config newConfig = new Config(); - newConfig.mirrors = new String[]{"http://mirror.gravitlauncher.ml/"}; + newConfig.mirrors = new String[]{"http://mirror.gravitlauncher.ml/","https://mirror.gravit.pro/"}; newConfig.launch4j = new ExeConf(); newConfig.launch4j.copyright = "© GravitLauncher Team"; newConfig.launch4j.fileDesc = "GravitLauncher ".concat(Launcher.getVersion().getVersionString()); @@ -570,7 +570,7 @@ private void generateConfigIfNotExists() throws IOException { newConfig.whitelistRejectString = "Вас нет в белом списке"; newConfig.netty = new NettyConfig(); - newConfig.netty.address = "ws://localhost:9274"; + newConfig.netty.address = "ws://localhost:9274/api"; newConfig.netty.clientEnabled = false; newConfig.netty.port = 9274; From 637652c1c6046bc36db53598671e4f788c182542 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sat, 23 Feb 2019 18:12:49 +0700 Subject: [PATCH 13/30] =?UTF-8?q?[FIX]=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE=D0=B1=D0=BB?= =?UTF-8?q?=D0=B5=D0=BC=D0=B0=20=D1=81=20settings.bin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launcher/client/LauncherSettings.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java index 64fd3a55..69cab0e0 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java @@ -113,6 +113,8 @@ public void read(HInput input) throws IOException, SignatureException { int lastHDirsCount = input.readLength(0); for (int i = 0; i < lastHDirsCount; i++) { String name = IOHelper.verifyFileName(input.readString(255)); + HashedDir hdir = new HashedDir(input); + lastHDirs.put(name,hdir); } } From 616aa951bce3d427fbb87407ed8b39f4a6efcff0 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 24 Feb 2019 19:45:47 +0700 Subject: [PATCH 14/30] [FIX] Issue #179 --- .../gravit/launcher/hasher/FileNameMatcher.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java index 223cc365..ae367181 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java @@ -9,14 +9,15 @@ public final class FileNameMatcher { private static final String[] NO_ENTRIES = new String[0]; private static boolean anyMatch(String[] entries, Collection path) { - return path.stream().anyMatch(e -> Arrays.stream(entries).anyMatch(p -> p.endsWith(e))); - //for(String p : path) - //{ - // for(String e : entries) - // { - // if(p.endsWith(e)) return true; - // } - //} + //return path.stream().anyMatch(e -> Arrays.stream(entries).anyMatch(p -> p.endsWith(e))); + for(String p : path) + { + for(String e : entries) + { + if(p.endsWith(e)) return true; + } + } + return false; } // Instance From 0819dabc69491a3d7e6efc504522a5c67e3146e1 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 24 Feb 2019 20:59:26 +0700 Subject: [PATCH 15/30] [FIX] Issue #179 --- .../gravit/launcher/hasher/FileNameMatcher.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java index ae367181..88db90e5 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java @@ -1,6 +1,7 @@ package ru.gravit.launcher.hasher; import ru.gravit.launcher.LauncherAPI; +import ru.gravit.utils.helper.LogHelper; import java.util.Arrays; import java.util.Collection; @@ -10,11 +11,20 @@ public final class FileNameMatcher { private static boolean anyMatch(String[] entries, Collection path) { //return path.stream().anyMatch(e -> Arrays.stream(entries).anyMatch(p -> p.endsWith(e))); - for(String p : path) + for(String e : entries) { - for(String e : entries) + String[] split = e.split("/"); + int index = 0; + for(String p : path) { - if(p.endsWith(e)) return true; + if(index>=split.length) + { + return true; + } + if(!p.equals(split[index])) { + break; + } + index++; } } return false; From 0723c8533aab07fdef44a59fffd3b8939d769efe Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Mon, 25 Feb 2019 11:06:24 +0300 Subject: [PATCH 16/30] =?UTF-8?q?[ANY]=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D0=B8?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 90a3b3ea..579a4362 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 90a3b3eac726659a64410ea3134f8bc22893de32 +Subproject commit 579a4362d8f94f0d81fccdccbe8a722f8a5f7d83 From 89e493aa6a74bccd38f23a375ef4032fde682760 Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Mon, 25 Feb 2019 12:11:01 +0300 Subject: [PATCH 17/30] =?UTF-8?q?[ANY]=20=D0=92=D1=8B=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=BE=20organize=20imports.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launcher/client/ClientLauncher.java | 2 -- .../main/java/ru/gravit/launcher/client/LauncherSettings.java | 2 -- .../main/java/ru/gravit/launcher/hasher/FileNameMatcher.java | 3 --- 3 files changed, 7 deletions(-) diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index c21485f8..840f51ff 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -14,7 +14,6 @@ import ru.gravit.launcher.request.update.LegacyLauncherRequest; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; -import ru.gravit.launcher.serialize.signed.SignedObjectHolder; import ru.gravit.launcher.serialize.stream.StreamObject; import ru.gravit.utils.PublicURLClassLoader; import ru.gravit.utils.helper.*; @@ -412,7 +411,6 @@ public static void main(String... args) throws Throwable { Params params; ClientProfile profile; HashedDir assetHDir, clientHDir; - RSAPublicKey publicKey = Launcher.getConfig().publicKey; try { try (Socket socket = IOHelper.newSocket()) { socket.connect(new InetSocketAddress(SOCKET_HOST, SOCKET_PORT)); diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java index 69cab0e0..84d63efd 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherSettings.java @@ -6,7 +6,6 @@ import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; -import ru.gravit.launcher.serialize.signed.SignedObjectHolder; import ru.gravit.utils.helper.*; import javax.crypto.BadPaddingException; @@ -14,7 +13,6 @@ import java.io.IOException; import java.nio.file.Path; import java.security.SignatureException; -import java.security.interfaces.RSAPublicKey; import java.util.HashMap; import java.util.LinkedList; import java.util.List; diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java index 88db90e5..87b39c93 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java @@ -1,9 +1,6 @@ package ru.gravit.launcher.hasher; import ru.gravit.launcher.LauncherAPI; -import ru.gravit.utils.helper.LogHelper; - -import java.util.Arrays; import java.util.Collection; public final class FileNameMatcher { From bda1913ca01e5a4b6274a70e096c9e2365ee87d1 Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 27 Feb 2019 08:34:29 +0700 Subject: [PATCH 18/30] =?UTF-8?q?[FIX]=20=D0=98=D1=81=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D1=83=D0=B5=D0=BC=20String,join=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20FileNameMatcher?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/gravit/launcher/hasher/FileNameMatcher.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java index 88db90e5..cb1e1b22 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/FileNameMatcher.java @@ -11,13 +11,14 @@ public final class FileNameMatcher { private static boolean anyMatch(String[] entries, Collection path) { //return path.stream().anyMatch(e -> Arrays.stream(entries).anyMatch(p -> p.endsWith(e))); + String jpath = String.join("/", path); for(String e : entries) { - String[] split = e.split("/"); - int index = 0; - for(String p : path) - { - if(index>=split.length) + /*String[] split = e.split("/"); + //int index = 0; + //for(String p : path) + //{ + // if(index>=split.length) { return true; } @@ -25,7 +26,8 @@ private static boolean anyMatch(String[] entries, Collection path) { break; } index++; - } + }*/ + if(jpath.startsWith(e)) return true; } return false; } From df39276c2a7bd215d0d0f09f2d8360d8f0baa78a Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 28 Feb 2019 16:26:45 +0700 Subject: [PATCH 19/30] =?UTF-8?q?[FIX]=20=D0=98=D0=B7=D0=B1=D1=8B=D1=82?= =?UTF-8?q?=D0=BE=D1=87=D0=BD=D1=8B=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D0=B8=20=D0=B2=20unmarkOptional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launcher/profiles/ClientProfile.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java index 8de9245a..cf1f2b82 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java @@ -266,13 +266,14 @@ public void unmarkOptional(OptionalFile file) { if (file.dependencies != null) { for (OptionalFile f : file.dependencies) { if (!f.mark) continue; - if (f.dependenciesCount == null) { + unmarkOptional(f); + /*if (f.dependenciesCount == null) { unmarkOptional(f); } else if (f.dependenciesCount.size() <= 1) { f.dependenciesCount.clear(); f.dependenciesCount = null; unmarkOptional(f); - } + }*/ } } } From c25e5a77aad8c8542fc903de5a6f1794549cd610 Mon Sep 17 00:00:00 2001 From: Yaroslavik Date: Fri, 1 Mar 2019 15:01:18 +0200 Subject: [PATCH 20/30] =?UTF-8?q?[FIX]=20=D0=9F=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B8=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D1=8B=20=D0=B4=D0=B5=D1=80=D0=B5=D0=B2=D0=B0?= =?UTF-8?q?=20=D0=BE=D0=BF=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D0=BC=D0=BE=D0=B4=D0=BE=D0=B2=20(#184)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit При перезаходе в лаунчер и отключении основной опциональной модификации (от которой зависят другие) - эти же другие не отключались, что приводило к различным конфликтам. --- Launcher/runtime/dialog/dialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Launcher/runtime/dialog/dialog.js b/Launcher/runtime/dialog/dialog.js index 93a6460e..dfa26435 100644 --- a/Launcher/runtime/dialog/dialog.js +++ b/Launcher/runtime/dialog/dialog.js @@ -198,9 +198,9 @@ function verifyLauncher(e) { } overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) { settings.lastProfiles = result.profiles; - options.load(); // Update profiles list and hide overlay updateProfilesList(result.profiles); + options.load(); overlay.hide(0, function() { if (cliParams.autoLogin) { goAuth(null); From 73fc66da0f97088248e666ddf7823b9a395bf570 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 3 Mar 2019 16:35:43 +0700 Subject: [PATCH 21/30] =?UTF-8?q?[FIX]=20=D0=92=D0=B5=D1=80=D0=BD=D1=83?= =?UTF-8?q?=D0=BB=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20unmarkOptional?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/ru/gravit/launcher/profiles/ClientProfile.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java index cf1f2b82..8de9245a 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/profiles/ClientProfile.java @@ -266,14 +266,13 @@ public void unmarkOptional(OptionalFile file) { if (file.dependencies != null) { for (OptionalFile f : file.dependencies) { if (!f.mark) continue; - unmarkOptional(f); - /*if (f.dependenciesCount == null) { + if (f.dependenciesCount == null) { unmarkOptional(f); } else if (f.dependenciesCount.size() <= 1) { f.dependenciesCount.clear(); f.dependenciesCount = null; unmarkOptional(f); - }*/ + } } } } From c62a3865ddc1e25e77c6987109514acb4e57ea43 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 3 Mar 2019 16:41:47 +0700 Subject: [PATCH 22/30] [FEATURE] GetModulusCommand --- .../command/handler/CommandHandler.java | 1 + .../command/service/GetModulusCommand.java | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java index c3d18b6c..1da94327 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java @@ -124,6 +124,7 @@ protected CommandHandler(LaunchServer server) { registerCommand("serverStatus", new ServerStatusCommand(server)); registerCommand("checkInstall", new CheckInstallCommand(server)); registerCommand("multi", new MultiCommand(server)); + registerCommand("getModulus", new GetModulusCommand(server)); } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java new file mode 100644 index 00000000..3696791f --- /dev/null +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java @@ -0,0 +1,27 @@ +package ru.gravit.launchserver.command.service; + +import io.netty.handler.codec.base64.Base64; +import ru.gravit.launchserver.LaunchServer; +import ru.gravit.launchserver.command.Command; +import ru.gravit.utils.helper.LogHelper; + +public class GetModulusCommand extends Command { + public GetModulusCommand(LaunchServer server) { + super(server); + } + + @Override + public String getArgsDescription() { + return null; + } + + @Override + public String getUsageDescription() { + return null; + } + + @Override + public void invoke(String... args) throws Exception { + LogHelper.info("You publickey modulus: ", LaunchServer.server.publicKey.getModulus().toString(16)); + } +} From 38bf8cc3fa287b36e29979649f0d0ed1aefeac1e Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Sun, 3 Mar 2019 13:37:14 +0300 Subject: [PATCH 23/30] =?UTF-8?q?[ANY]=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D0=B8?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 579a4362..1acfa0df 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 579a4362d8f94f0d81fccdccbe8a722f8a5f7d83 +Subproject commit 1acfa0df31cc42121ae77035a2dadea457a4ed28 From 72d2f1d99509b4aa7475a32e1634e3ca5983eb7b Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 3 Mar 2019 18:14:22 +0700 Subject: [PATCH 24/30] =?UTF-8?q?[ANY]=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B2=D0=BE=D0=BB=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=BE=D0=B2?= =?UTF-8?q?=20DirWatcher=20=D0=BB=D1=8F=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4?= =?UTF-8?q?=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/gravit/launcher/hasher/DirWatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java index e4353e75..582c4ff2 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java @@ -121,8 +121,8 @@ private void processKey(WatchKey key) throws IOException { // Resolve paths and verify is not exclusion Path path = watchDir.resolve((Path) event.context()); - LogHelper.debug("DirWatcher event %s", path.toString()); Deque stringPath = toPath(dir.relativize(path)); + LogHelper.debug("DirWatcher event %s", String.join("/", stringPath)); if (matcher != null && !matcher.shouldVerify(stringPath)) continue; // Exclusion; should not be verified From b9e8f480653493be80233156edb05aba4f8c8d99 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 3 Mar 2019 19:26:14 +0700 Subject: [PATCH 25/30] [FIX] Windows must die --- .../java/ru/gravit/launcher/hasher/DirWatcher.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java index 582c4ff2..3330455e 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java @@ -125,13 +125,12 @@ private void processKey(WatchKey key) throws IOException { LogHelper.debug("DirWatcher event %s", String.join("/", stringPath)); if (matcher != null && !matcher.shouldVerify(stringPath)) continue; // Exclusion; should not be verified - // Verify is REALLY modified (not just attributes) - if (kind.equals(StandardWatchEventKinds.ENTRY_MODIFY)) { - HashedEntry entry = hdir.resolve(stringPath); - if (entry != null && (entry.getType() != Type.FILE || ((HashedFile) entry).isSame(path, digest))) - continue; // Modified attributes, not need to worry :D - } + //if (kind.equals(StandardWatchEventKinds.ENTRY_MODIFY)) { + // HashedEntry entry = hdir.resolve(stringPath); + // if (entry != null && (entry.getType() != Type.FILE || ((HashedFile) entry).isSame(path, digest))) + // continue; // Modified attributes, not need to worry :D + //} // Forbidden modification! throw new SecurityException(String.format("Forbidden modification (%s, %d times): '%s'", kind, event.count(), path)); From 009aa2e6ab7e98d329dbcbaa5d6f3735f49969d2 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 3 Mar 2019 19:38:36 +0700 Subject: [PATCH 26/30] [FIX] Windows must die version 2 --- .../src/main/java/ru/gravit/launcher/hasher/DirWatcher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java index 3330455e..70a2a3e9 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java @@ -40,9 +40,9 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) th // Maybe it's unnecessary to go deeper path.add(IOHelper.getFileName(dir)); - if (matcher != null && !matcher.shouldVerify(path)) { - return FileVisitResult.SKIP_SUBTREE; - } + //if (matcher != null && !matcher.shouldVerify(path)) { + // return FileVisitResult.SKIP_SUBTREE; + //} // Register dir.register(service, KINDS); From 693996a9685efa5ff7edbd59d5212f6d4fdb9343 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 3 Mar 2019 21:32:55 +0700 Subject: [PATCH 27/30] =?UTF-8?q?[FIX]=20optMod.visible=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=B0=D0=BB=D0=B0=20=D0=BD=D0=B5=D0=BA=D0=BE?= =?UTF-8?q?=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Launcher/runtime/dialog/overlay/options/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Launcher/runtime/dialog/overlay/options/options.js b/Launcher/runtime/dialog/overlay/options/options.js index 336c99b8..6430b1f7 100644 --- a/Launcher/runtime/dialog/overlay/options/options.js +++ b/Launcher/runtime/dialog/overlay/options/options.js @@ -100,7 +100,7 @@ var options = { var checkBoxList = new java.util.ArrayList; list.forEach(function(modFile) { var modName = modFile.name, modDescription = "", subLevel = 1; - if(!modFile.isVisible) + if(!modFile.visible) { LogHelper.debug("optionalMod %s hidden",modFile.name); return; From 9bc798108ba7e1e411489521a53081b4ff0f930e Mon Sep 17 00:00:00 2001 From: Gravit Date: Mon, 4 Mar 2019 16:54:36 +0700 Subject: [PATCH 28/30] =?UTF-8?q?[FIX]=20=D0=92=D0=B5=D1=80=D0=BD=D1=83?= =?UTF-8?q?=D0=BB=20=D0=BA=D1=83=D1=81=D0=BE=D0=BA=20=D0=BA=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ru/gravit/launcher/hasher/DirWatcher.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java index 70a2a3e9..6969a37f 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/hasher/DirWatcher.java @@ -126,11 +126,11 @@ private void processKey(WatchKey key) throws IOException { if (matcher != null && !matcher.shouldVerify(stringPath)) continue; // Exclusion; should not be verified // Verify is REALLY modified (not just attributes) - //if (kind.equals(StandardWatchEventKinds.ENTRY_MODIFY)) { - // HashedEntry entry = hdir.resolve(stringPath); - // if (entry != null && (entry.getType() != Type.FILE || ((HashedFile) entry).isSame(path, digest))) - // continue; // Modified attributes, not need to worry :D - //} + if (kind.equals(StandardWatchEventKinds.ENTRY_MODIFY)) { + HashedEntry entry = hdir.resolve(stringPath); + if (entry != null && (entry.getType() != Type.FILE || ((HashedFile) entry).isSame(path, digest))) + continue; // Modified attributes, not need to worry :D + } // Forbidden modification! throw new SecurityException(String.format("Forbidden modification (%s, %d times): '%s'", kind, event.count(), path)); From 7c3c2e8aaad61e65fee6c8cb27cbd8251f1f2693 Mon Sep 17 00:00:00 2001 From: Zaxar163 <35835496+Zaxar163@users.noreply.github.com> Date: Fri, 8 Mar 2019 12:20:35 +0300 Subject: [PATCH 29/30] =?UTF-8?q?[FIX]=20=D0=9B=D0=B8=D1=88=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D1=8B=20=D0=B2=20?= =?UTF-8?q?Gradle.=20(#186)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FIX] Теперь в проектах без исходного кода не появляются файлы gradle и idea. * [FIX] Правильное название rootProject. * [ANY] Обновлены модули. --- build.gradle | 9 +++------ modules | 2 +- settings.gradle | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index feb4e53f..3d42a735 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,6 @@ -allprojects { - apply plugin: 'eclipse' +configure(subprojects.findAll {it.name != 'modules'}) { apply plugin: 'idea' -} - -subprojects { + apply plugin: 'eclipse' apply plugin: 'java' repositories { @@ -29,7 +26,7 @@ } wrapper { - distributionType = Wrapper.DistributionType.ALL + distributionType = Wrapper.DistributionType.ALL } defaultTasks 'build' diff --git a/modules b/modules index 1acfa0df..d4320ce2 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 1acfa0df31cc42121ae77035a2dadea457a4ed28 +Subproject commit d4320ce29b8a142a75b86237139e92a72e00b481 diff --git a/settings.gradle b/settings.gradle index 5b0fea68..0ef17ca5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,4 @@ -rootProject.name = 'Launcher' +rootProject.name = 'GravitLauncher' include 'Launcher' include 'libLauncher' From 87cbfdd1309ad6d23a086f3ef5e48850a0d12300 Mon Sep 17 00:00:00 2001 From: Gravit Date: Fri, 8 Mar 2019 16:48:29 +0700 Subject: [PATCH 30/30] [ANY] 4.4.0 --- libLauncher/src/main/java/ru/gravit/launcher/Launcher.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java b/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java index 4aba4d31..ccca5eaa 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/Launcher.java @@ -59,9 +59,9 @@ public final class Launcher { private static final Pattern UUID_PATTERN = Pattern.compile("-", Pattern.LITERAL); public static final int MAJOR = 4; - public static final int MINOR = 3; - public static final int PATCH = 3; - public static final int BUILD = 2; + public static final int MINOR = 4; + public static final int PATCH = 0; + public static final int BUILD = 1; public static final Version.Type RELEASE = Version.Type.STABLE; public static GsonBuilder gsonBuilder; public static Gson gson;