From f6f6ea13ad958fc6cc5555001b7ce56f725dd81a Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 8 Dec 2023 20:24:31 +0700 Subject: [PATCH 01/73] [ANY] Experimental branch --- LaunchServer/src/main/resources/experimental-build.json | 4 ++-- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LaunchServer/src/main/resources/experimental-build.json b/LaunchServer/src/main/resources/experimental-build.json index ab148d00..19dc64d9 100644 --- a/LaunchServer/src/main/resources/experimental-build.json +++ b/LaunchServer/src/main/resources/experimental-build.json @@ -1,4 +1,4 @@ { - "features": [], - "info": [] + "features": ["nojava8support"], + "info": ["Java below 17 not supported"] } \ No newline at end of file diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index d42ebb45..db44d40f 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -8,7 +8,7 @@ public final class Version implements Comparable { public static final int MINOR = 5; public static final int PATCH = 3; public static final int BUILD = 1; - public static final Version.Type RELEASE = Type.STABLE; + public static final Version.Type RELEASE = Type.EXPERIMENTAL; public final int major; public final int minor; public final int patch; From f8b060422e888c0541088f0f39c7447737da817b Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Wed, 20 Dec 2023 04:45:41 +0700 Subject: [PATCH 02/73] [FEATURE] Improve LaunchServer start --- LaunchServer/build.gradle | 22 ++--- .../launchserver/LaunchServerStarter.java | 10 +-- .../java/pro/gravit/launchserver/Main.java | 53 +++++++++++ .../pro/gravit/launchserver/StarterAgent.java | 43 +-------- .../binary/tasks/exe/Launch4JTask.java | 88 +------------------ .../modules/impl/SimpleModuleManager.java | 2 +- props.gradle | 2 +- 7 files changed, 67 insertions(+), 153 deletions(-) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/Main.java diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index b522f651..57742ddd 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -1,4 +1,4 @@ -def mainClassName = "pro.gravit.launchserver.LaunchServerStarter" +def mainClassName = "pro.gravit.launchserver.Main" def mainAgentName = "pro.gravit.launchserver.StarterAgent" evaluationDependsOn(':Launcher') @@ -65,9 +65,7 @@ archiveClassifier.set('clean') manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, - "Can-Redefine-Classes": "true", - "Can-Retransform-Classes": "true", - "Can-Set-Native-Method-Prefix": "true" + "Automatic-Module-Name": "launchserver" ) from sourceSets.main.output } @@ -84,13 +82,15 @@ pack project(':LauncherModernCore') bundle group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline'] bundle group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: rootProject['verBcpkix'] bundle group: 'org.ow2.asm', name: 'asm-commons', version: rootProject['verAsm'] - bundle group: 'io.netty', name: 'netty-all', version: rootProject['verNetty'] + bundle group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] + bundle group: 'io.netty', name: 'netty-transport-classes-epoll', version: rootProject['verNetty'] + bundle group: 'io.netty', name: 'netty-transport-native-epoll', version: rootProject['verNetty'], classifier: 'linux-x86_64' bundle group: 'org.slf4j', name: 'slf4j-api', version: rootProject['verSlf4j'] bundle group: 'com.mysql', name: 'mysql-connector-j', version: rootProject['verMySQLConn'] bundle group: 'org.postgresql', name: 'postgresql', version: rootProject['verPostgreSQLConn'] bundle group: 'com.guardsquare', name: 'proguard-base', version: rootProject['verProguard'] bundle group: 'org.apache.logging.log4j', name: 'log4j-core', version: rootProject['verLog4j'] - bundle group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: rootProject['verLog4j'] + bundle group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl', version: rootProject['verLog4j'] bundle group: 'io.jsonwebtoken', name: 'jjwt-api', version: rootProject['verJwt'] bundle group: 'io.jsonwebtoken', name: 'jjwt-impl', version: rootProject['verJwt'] bundle group: 'io.jsonwebtoken', name: 'jjwt-gson', version: rootProject['verJwt'] @@ -104,16 +104,6 @@ pack project(':LauncherModernCore') exclude group: 'org.slf4j' } - launch4j('net.sf.launch4j:launch4j:' + rootProject['verLaunch4j']) { - exclude group: 'org.apache.ant' - exclude group: 'net.java.abeille' - exclude group: 'foxtrot' - exclude group: 'com.jgoodies' - exclude group: 'org.slf4j' - } - launch4j('net.sf.launch4j:launch4j:' + rootProject['verLaunch4j'] + ':workdir-win32') { transitive = false } - launch4j('net.sf.launch4j:launch4j:' + rootProject['verLaunch4j'] + ':workdir-linux64') { transitive = false } - compileOnlyA group: 'com.google.guava', name: 'guava', version: rootProject['verGuavaC'] // Do not update (laggy deps). compileOnlyA 'log4j:log4j:1.2.17' diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java index 19b7b01d..23ec6593 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java @@ -28,12 +28,15 @@ import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; +import pro.gravit.utils.launch.LaunchOptions; +import pro.gravit.utils.launch.ModuleLaunch; import java.io.*; import java.nio.file.Files; import java.nio.file.Path; import java.security.Security; import java.security.cert.CertificateException; +import java.util.ArrayList; import java.util.List; public class LaunchServerStarter { @@ -42,15 +45,10 @@ public class LaunchServerStarter { private static final Logger logger = LogManager.getLogger(); public static void main(String[] args) throws Exception { - JVMHelper.checkStackTrace(LaunchServerStarter.class); - JVMHelper.verifySystemProperties(LaunchServer.class, true); + JVMHelper.verifySystemProperties(LaunchServer.class, false); //LogHelper.addOutput(IOHelper.WORKING_DIR.resolve("LaunchServer.log")); LogHelper.printVersion("LaunchServer"); LogHelper.printLicense("LaunchServer"); - if (!StarterAgent.isAgentStarted()) { - LogHelper.error("StarterAgent is not started!"); - LogHelper.error("You should add to JVM options this option: `-javaagent:LaunchServer.jar`"); - } Path dir = IOHelper.WORKING_DIR; Path configFile, runtimeConfigFile; try { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java new file mode 100644 index 00000000..58f90497 --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java @@ -0,0 +1,53 @@ +package pro.gravit.launchserver; + +import pro.gravit.utils.helper.IOHelper; +import pro.gravit.utils.launch.ClassLoaderControl; +import pro.gravit.utils.launch.LaunchOptions; +import pro.gravit.utils.launch.ModuleLaunch; + +import java.nio.file.FileVisitOption; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Stream; + +public class Main { + private static final List classpathOnly = List.of("proguard", "jline", "kotlin", "epoll"); + private static boolean isClasspathOnly(Path path) { + var fileName = path.getFileName().toString(); + for(var e : classpathOnly) { + if(fileName.contains(e)) { + return true; + } + } + return false; + } + + public static void main(String[] args) throws Throwable { + ModuleLaunch launch = new ModuleLaunch(); + LaunchOptions options = new LaunchOptions(); + options.disablePackageDelegateSupport = true; + options.moduleConf = new LaunchOptions.ModuleConf(); + List libraries; + try(Stream files = Files.walk(Path.of("libraries"), FileVisitOption.FOLLOW_LINKS)) { + libraries = new ArrayList<>(files.filter(e -> e.getFileName().toString().endsWith(".jar")).toList()); + } + List classpath = new ArrayList<>(); + List modulepath = new ArrayList<>(); + for(var l : libraries) { + if(isClasspathOnly(l)) { + classpath.add(l); + } else { + modulepath.add(l.toAbsolutePath().toString()); + } + } + classpath.add(IOHelper.getCodeSource(LaunchServerStarter.class)); + options.moduleConf.modulePath.addAll(modulepath); + options.moduleConf.modules.add("ALL-MODULE-PATH"); + ClassLoaderControl control = launch.init(classpath, "natives", options); + ModuleLayer.Controller controller = (ModuleLayer.Controller) control.getJava9ModuleController(); + launch.launch("pro.gravit.launchserver.LaunchServerStarter", null, Arrays.asList(args)); + } +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java index a6edd6b3..2809eac6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java @@ -20,47 +20,6 @@ public static boolean isAgentStarted() { } public static void premain(String agentArgument, Instrumentation inst) { - StarterAgent.inst = inst; - libraries = Paths.get(Optional.ofNullable(agentArgument).map(String::trim).filter(e -> !e.isEmpty()).orElse("libraries")); - isStarted = true; - try { - Files.walkFileTree(libraries, Collections.singleton(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, new StarterVisitor()); - } catch (IOException e) { - e.printStackTrace(System.err); - } - } - - private static final class StarterVisitor extends SimpleFileVisitor { - private static final Set DPERMS; - - static { - Set perms = new HashSet<>(Arrays.asList(PosixFilePermission.values())); - perms.remove(PosixFilePermission.OTHERS_WRITE); - perms.remove(PosixFilePermission.GROUP_WRITE); - DPERMS = Collections.unmodifiableSet(perms); - } - - private final boolean fixLib; - - private StarterVisitor() { - Path filef = StarterAgent.libraries.resolve(".libraries_chmoded"); - this.fixLib = !Files.exists(filef) && !Boolean.getBoolean("launcher.noLibrariesPosixPermsFix"); - if (fixLib) { - try { - Files.deleteIfExists(filef); - Files.createFile(filef); - } catch (Throwable ignored) { - } - } - } - - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { - if (fixLib && Files.getFileAttributeView(file, PosixFileAttributeView.class) != null) - Files.setPosixFilePermissions(file, DPERMS); - if (file.toFile().getName().endsWith(".jar")) - inst.appendToSystemClassLoaderSearch(new JarFile(file.toFile())); - return super.visitFile(file, attrs); - } + throw new UnsupportedOperationException("Please remove -javaagent option from start.sh"); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java index 400d529c..51197ee1 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java @@ -1,8 +1,5 @@ package pro.gravit.launchserver.binary.tasks.exe; -import net.sf.launch4j.Builder; -import net.sf.launch4j.Log; -import net.sf.launch4j.config.*; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import pro.gravit.launchserver.LaunchServer; @@ -37,89 +34,6 @@ public String getName() { @Override public Path process(Path inputFile) throws IOException { - logger.info("Building launcher EXE binary file (Using Launch4J)"); - Path output = setConfig(); - - // Set favicon path - Config config = ConfigPersister.getInstance().getConfig(); - if (IOHelper.isFile(faviconFile)) - config.setIcon(faviconFile.toFile()); - else { - config.setIcon(null); - logger.warn("Missing favicon.ico file"); - } - - // Start building - Builder builder = new Builder(Launch4JLog.INSTANCE); - try { - builder.build(); - } catch (Throwable e) { - throw new IOException(e); - } - return output; - } - - private Path setConfig() { - Path path = server.launcherEXEBinary.nextPath(getName()); - Config config = new Config(); - // Set file options - config.setChdir("."); - config.setErrTitle("JVM Error"); - config.setDownloadUrl(server.config.launch4j.downloadUrl); - if (server.config.launch4j.supportURL != null) config.setSupportUrl(server.config.launch4j.supportURL); - // Set boolean options - config.setPriorityIndex(0); - config.setHeaderType(Config.GUI_HEADER); - config.setStayAlive(false); - config.setRestartOnCrash(false); - - // Prepare JRE - Jre jre = new Jre(); - jre.setMinVersion(server.config.launch4j.minVersion); - if (server.config.launch4j.setMaxVersion) - jre.setMaxVersion(server.config.launch4j.maxVersion); - jre.setPath(System.getProperty("java.home")); - config.setJre(jre); - - // Prepare version info (product) - VersionInfo info = new VersionInfo(); - info.setProductName(server.config.launch4j.productName); - info.setProductVersion(formatVars(server.config.launch4j.productVer)); - info.setFileDescription(server.config.launch4j.fileDesc); - info.setFileVersion(formatVars(server.config.launch4j.fileVer)); - info.setCopyright(server.config.launch4j.copyright); - info.setTrademarks(server.config.launch4j.trademarks); - info.setInternalName(formatVars(server.config.launch4j.internalName)); - // Prepare version info (file) - info.setTxtFileVersion(formatVars(server.config.launch4j.txtFileVersion)); - info.setTxtProductVersion(formatVars(server.config.launch4j.txtProductVersion)); - // Prepare version info (misc) - info.setOriginalFilename(path.getFileName().toString()); - info.setLanguage(LanguageID.RUSSIAN); - config.setVersionInfo(info); - - // Set JAR wrapping options - config.setDontWrapJar(false); - config.setJar(server.launcherBinary.syncBinaryFile.toFile()); - config.setOutfile(path.toFile()); - - // Return prepared config - ConfigPersister.getInstance().setAntConfig(config, null); - return path; - } - - private final static class Launch4JLog extends Log { - private static final Launch4JLog INSTANCE = new Launch4JLog(); - private static final Logger logger = LogManager.getLogger(); - - @Override - public void append(String s) { - logger.info(s); - } - - @Override - public void clear() { - // Do nothing - } + throw new UnsupportedOperationException("Launch4j not supported"); } } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java index 773e2f72..db72e805 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java @@ -33,7 +33,7 @@ public class SimpleModuleManager implements LauncherModulesManager { protected final ModulesConfigManager modulesConfigManager; protected final Path modulesDir; protected final LauncherTrustManager trustManager; - protected final PublicURLClassLoader classLoader = new PublicURLClassLoader(new URL[]{}); + protected final PublicURLClassLoader classLoader = new PublicURLClassLoader(new URL[]{}, SimpleModuleManager.class.getClassLoader()); protected LauncherInitContext initContext; public SimpleModuleManager(Path modulesDir, Path configDir) { diff --git a/props.gradle b/props.gradle index d8072da7..5af02d67 100644 --- a/props.gradle +++ b/props.gradle @@ -10,7 +10,7 @@ verBcprov = '1.70' verGson = '2.10.1' verBcpkix = '1.70' - verSlf4j = '1.7.36' + verSlf4j = '2.0.9' verLog4j = '2.20.0' verMySQLConn = '8.1.0' verPostgreSQLConn = '42.6.0' From c9b6b0279a5c5e7ad41bd3bc1ebccf03960e2b22 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 23 Dec 2023 12:05:23 +0700 Subject: [PATCH 03/73] [REFACTOR] Renaming --- .../pro/gravit/launchserver/LaunchServer.java | 2 +- .../launchserver/LaunchServerStarter.java | 2 +- .../launchserver/asm/InjectClassAcceptor.java | 4 +-- .../launchserver/binary/BuildContext.java | 4 +-- .../command/modules/ModulesCommand.java | 2 +- .../launchermodules/LauncherModuleLoader.java | 2 +- .../manangers/CertificateManager.java | 2 +- .../manangers/LaunchServerGsonManager.java | 2 +- .../manangers/UpdatesManager.java | 6 ++-- .../impl/LaunchServerModulesManager.java | 2 +- .../response/update/UpdateResponse.java | 2 +- .../gravit/launchserver/defaults/proguard.cfg | 8 ++--- .../launchserver/ASMTransformersTest.java | 2 +- .../{ => client/runtime}/LauncherEngine.java | 30 +++++++++++-------- .../runtime}/LauncherEngineWrapper.java | 3 +- .../runtime}/NewLauncherSettings.java | 9 ++---- .../client}/ClientLauncherProcess.java | 16 +++++----- .../client}/RuntimeGsonManager.java | 5 ++-- .../client}/RuntimeLauncherCoreModule.java | 2 +- .../{ => runtime/client}/ServerPinger.java | 6 ++-- .../{ => runtime/client}/UserSettings.java | 2 +- .../client}/events/ClientEngineInitPhase.java | 4 +-- .../client}/events/ClientGuiPhase.java | 4 +-- .../client}/events/ClientPreGuiPhase.java | 4 +-- .../events/ClientUnlockConsoleEvent.java | 2 +- .../ClientProcessBuilderCreateEvent.java | 4 +-- .../ClientProcessBuilderLaunchedEvent.java | 4 +-- ...lientProcessBuilderParamsWrittedEvent.java | 4 +-- .../ClientProcessBuilderPreLaunchEvent.java | 4 +-- .../runtime}/console/GetPublicKeyCommand.java | 4 +-- .../runtime}/console/ModulesCommand.java | 8 ++--- .../runtime}/console/SignDataCommand.java | 4 +-- .../runtime}/console/UnlockCommand.java | 6 ++-- .../test/PrintHardwareInfoCommand.java | 4 +-- .../runtime}/debug/ClientRuntimeProvider.java | 10 +++---- .../debug/DebugLauncherTrustManager.java | 4 +-- .../{ => client/runtime}/debug/DebugMain.java | 12 ++++---- .../runtime}/gui/NoRuntimeProvider.java | 2 +- .../runtime}/gui/RuntimeProvider.java | 2 +- .../runtime}/managers/ConsoleManager.java | 10 +++---- .../runtime}/managers/SettingsManager.java | 17 ++--------- .../runtime}/utils/HWIDProvider.java | 2 +- .../runtime}/utils/LauncherUpdater.java | 6 ++-- .../gravit/launcher/ClientPermissions.java | 2 ++ .../java/pro/gravit/launcher/Launcher.java | 4 +-- .../pro/gravit/launcher/LauncherConfig.java | 9 ++++-- .../{ => client}/api/AuthService.java | 2 +- .../{ => client}/api/ClientService.java | 2 +- .../{ => client}/api/ConfigService.java | 2 +- .../launcher/{ => client}/api/KeyService.java | 2 +- .../runtime}/managers/ConfigManager.java | 2 +- .../managers/SimpleModulesConfigManager.java | 2 +- .../launcher/events/NotificationEvent.java | 2 +- .../gravit/launcher/events/RequestEvent.java | 2 +- .../events/request/AuthRequestEvent.java | 2 +- .../BatchProfileByUsernameRequestEvent.java | 2 +- .../request/CheckServerRequestEvent.java | 2 +- .../events/request/ErrorRequestEvent.java | 2 +- .../GetAvailabilityAuthRequestEvent.java | 2 +- .../request/JoinServerRequestEvent.java | 2 +- .../events/request/LauncherRequestEvent.java | 2 +- .../request/ProfileByUUIDRequestEvent.java | 2 +- .../ProfileByUsernameRequestEvent.java | 2 +- .../events/request/ProfilesRequestEvent.java | 2 +- .../request/SetProfileRequestEvent.java | 2 +- .../request/UpdateListRequestEvent.java | 2 +- .../events/request/UpdateRequestEvent.java | 4 +-- .../launcher/modules/LauncherModule.java | 2 +- .../modules/impl/SimpleModuleManager.java | 4 +-- .../launcher/profiles/ClientProfile.java | 4 +-- .../pro/gravit/launcher/profiles/Texture.java | 4 +-- .../profiles/optional/OptionalDepend.java | 2 +- .../profiles/optional/OptionalFile.java | 2 +- .../optional/actions/OptionalActionFile.java | 2 +- .../pro/gravit/launcher/request/Request.java | 2 +- .../launcher/request/auth/AuthRequest.java | 2 +- .../request/auth/CheckServerRequest.java | 2 +- .../request/auth/JoinServerRequest.java | 2 +- .../request/auth/SetProfileRequest.java | 2 +- .../auth/password/AuthAESPassword.java | 2 +- .../auth/password/AuthPlainPassword.java | 2 +- .../request/update/LauncherRequest.java | 2 +- .../request/update/UpdateRequest.java | 2 +- .../uuid/BatchProfileByUsernameRequest.java | 2 +- .../request/uuid/ProfileByUUIDRequest.java | 2 +- .../uuid/ProfileByUsernameRequest.java | 2 +- .../request/websockets/ClientJSONPoint.java | 4 +-- .../websockets/ClientWebSocketService.java | 4 +-- .../BasicLauncherEventHandler.java | 4 +-- .../{ => client}/ClientLauncherMethods.java | 16 +++++----- .../launcher/{ => client}/LauncherAgent.java | 4 +-- .../{ => client}/api/CertificateService.java | 8 ++--- .../{ => client}/api/DialogService.java | 2 +- .../{ => client}/api/SystemService.java | 4 +-- .../client}/ClientGsonManager.java | 4 +-- .../client}/ClientLauncherCoreModule.java | 2 +- .../client}/ClientLauncherEntryPoint.java | 23 +++++++------- .../client}/ClientModuleManager.java | 4 +-- .../{ => runtime/client}/ClientParams.java | 4 +-- .../{ => runtime/client}/DirBridge.java | 2 +- .../client}/events/ClientExitPhase.java | 2 +- .../client/ClientProcessClassLoaderEvent.java | 2 +- .../events/client/ClientProcessInitPhase.java | 4 +-- .../client/ClientProcessLaunchEvent.java | 4 +-- .../ClientProcessPreInvokeMainClassEvent.java | 4 +-- .../client/ClientProcessReadyEvent.java | 4 +-- .../runtime}/utils/ApiBridgeService.java | 4 +-- .../runtime}/utils/DirWatcher.java | 12 ++++---- .../runtime}/utils/NativeJVMHalt.java | 2 +- .../CertificatePinningTrustManager.java | 2 +- .../launcher/{ => core}/LauncherInject.java | 2 +- .../LauncherInjectionConstructor.java | 2 +- .../{ => core}/LauncherNetworkAPI.java | 2 +- .../{ => core}/LauncherTrustManager.java | 2 +- .../{ => core}/hasher/FileNameMatcher.java | 2 +- .../launcher/{ => core}/hasher/HashedDir.java | 10 +++---- .../{ => core}/hasher/HashedEntry.java | 10 +++---- .../{ => core}/hasher/HashedEntryAdapter.java | 2 +- .../{ => core}/hasher/HashedFile.java | 8 ++--- .../{ => core}/managers/GsonManager.java | 6 ++-- .../launcher/{ => core}/serialize/HInput.java | 2 +- .../{ => core}/serialize/HOutput.java | 2 +- .../serialize/signed/DigestBytesHolder.java | 8 ++--- .../serialize/stream/EnumSerializer.java | 8 ++--- .../serialize/stream/StreamObject.java | 6 ++-- .../pro/gravit/utils/helper/LogHelper.java | 2 +- .../gravit/launcher/modern/Downloader.java | 4 +-- .../{ => start}/ClientLauncherWrapper.java | 10 ++++--- .../{ => start}/ClientWrapperModule.java | 4 +-- .../RuntimeModuleManager.java | 6 ++-- .../gravit/launcher/server/ServerWrapper.java | 11 +++---- .../server/ServerWrapperGsonManager.java | 2 +- modules | 2 +- 133 files changed, 287 insertions(+), 288 deletions(-) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/LauncherEngine.java (90%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/LauncherEngineWrapper.java (94%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/NewLauncherSettings.java (54%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/ClientLauncherProcess.java (94%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/RuntimeGsonManager.java (83%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/RuntimeLauncherCoreModule.java (90%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/ServerPinger.java (98%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/UserSettings.java (74%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/ClientEngineInitPhase.java (68%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/ClientGuiPhase.java (69%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/ClientPreGuiPhase.java (69%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/ClientUnlockConsoleEvent.java (84%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessBuilderCreateEvent.java (70%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessBuilderLaunchedEvent.java (70%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessBuilderParamsWrittedEvent.java (69%) rename Launcher/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessBuilderPreLaunchEvent.java (70%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/console/GetPublicKeyCommand.java (86%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/console/ModulesCommand.java (88%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/console/SignDataCommand.java (88%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/console/UnlockCommand.java (82%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/console/test/PrintHardwareInfoCommand.java (95%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/debug/ClientRuntimeProvider.java (96%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/debug/DebugLauncherTrustManager.java (89%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/debug/DebugMain.java (92%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/gui/NoRuntimeProvider.java (89%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/gui/RuntimeProvider.java (72%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/managers/ConsoleManager.java (87%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/managers/SettingsManager.java (64%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/utils/HWIDProvider.java (98%) rename Launcher/src/main/java/pro/gravit/launcher/{ => client/runtime}/utils/LauncherUpdater.java (95%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => client}/api/AuthService.java (94%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => client}/api/ClientService.java (93%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => client}/api/ConfigService.java (88%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => client}/api/KeyService.java (84%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => client/runtime}/managers/ConfigManager.java (96%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => client/runtime}/managers/SimpleModulesConfigManager.java (95%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client}/BasicLauncherEventHandler.java (94%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client}/ClientLauncherMethods.java (92%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client}/LauncherAgent.java (94%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client}/api/CertificateService.java (94%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client}/api/DialogService.java (98%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client}/api/SystemService.java (69%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/ClientGsonManager.java (85%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/ClientLauncherCoreModule.java (90%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/ClientLauncherEntryPoint.java (95%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/ClientModuleManager.java (90%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/ClientParams.java (97%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/DirBridge.java (98%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/ClientExitPhase.java (78%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessClassLoaderEvent.java (90%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessInitPhase.java (65%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessLaunchEvent.java (66%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessPreInvokeMainClassEvent.java (81%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{ => runtime/client}/events/client/ClientProcessReadyEvent.java (66%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client/runtime}/utils/ApiBridgeService.java (86%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client/runtime}/utils/DirWatcher.java (93%) rename LauncherClient/src/main/java/pro/gravit/launcher/{ => client/runtime}/utils/NativeJVMHalt.java (94%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/CertificatePinningTrustManager.java (98%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/LauncherInject.java (89%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/LauncherInjectionConstructor.java (89%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/LauncherNetworkAPI.java (94%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/LauncherTrustManager.java (99%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/hasher/FileNameMatcher.java (97%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/hasher/HashedDir.java (98%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/hasher/HashedEntry.java (72%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/hasher/HashedEntryAdapter.java (96%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/hasher/HashedFile.java (92%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/managers/GsonManager.java (86%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/serialize/HInput.java (98%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/serialize/HOutput.java (98%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/serialize/signed/DigestBytesHolder.java (86%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/serialize/stream/EnumSerializer.java (79%) rename LauncherCore/src/main/java/pro/gravit/launcher/{ => core}/serialize/stream/StreamObject.java (81%) rename LauncherStart/src/main/java/pro/gravit/launcher/{ => start}/ClientLauncherWrapper.java (96%) rename LauncherStart/src/main/java/pro/gravit/launcher/{ => start}/ClientWrapperModule.java (60%) rename LauncherStart/src/main/java/pro/gravit/launcher/{client => start}/RuntimeModuleManager.java (88%) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index d016db56..3482f317 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -5,7 +5,7 @@ import pro.gravit.launcher.Launcher; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.managers.ConfigManager; +import pro.gravit.launcher.client.runtime.managers.ConfigManager; import pro.gravit.launcher.modules.events.ClosePhase; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launchserver.auth.AuthProviderPair; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java index 19b7b01d..3072b4cb 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; import org.bouncycastle.jce.provider.BouncyCastleProvider; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.events.PreConfigPhase; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java index c0e6d454..a673bbe0 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java @@ -4,8 +4,8 @@ import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.tree.*; -import pro.gravit.launcher.LauncherInject; -import pro.gravit.launcher.LauncherInjectionConstructor; +import pro.gravit.launcher.core.LauncherInject; +import pro.gravit.launcher.core.LauncherInjectionConstructor; import pro.gravit.launchserver.binary.BuildContext; import pro.gravit.launchserver.binary.tasks.MainBuildTask; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java index 6d00a5cc..069a5e3c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java @@ -3,8 +3,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.serialize.HOutput; -import pro.gravit.launcher.serialize.stream.StreamObject; +import pro.gravit.launcher.core.serialize.HOutput; +import pro.gravit.launcher.core.serialize.stream.StreamObject; import pro.gravit.launchserver.binary.tasks.MainBuildTask; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.SecurityHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java index d76c0b59..e535b365 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.modules.LauncherModuleInfo; import pro.gravit.launchserver.LaunchServer; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java index de2555f0..df68ff85 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java @@ -3,7 +3,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.asm.InjectClassAcceptor; import pro.gravit.launchserver.binary.tasks.MainBuildTask; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/CertificateManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/CertificateManager.java index 51f63436..fa822fcf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/CertificateManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/CertificateManager.java @@ -11,7 +11,7 @@ import org.bouncycastle.util.io.pem.PemObject; import org.bouncycastle.util.io.pem.PemReader; import org.bouncycastle.util.io.pem.PemWriter; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java index 8b5e3c14..c3f4e575 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java @@ -3,7 +3,7 @@ import com.google.gson.GsonBuilder; import marcono1234.gson.recordadapter.RecordTypeAdapterFactory; import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; -import pro.gravit.launcher.managers.GsonManager; +import pro.gravit.launcher.core.managers.GsonManager; import pro.gravit.launcher.modules.events.PreGsonPhase; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java index 47e9f4f6..848fa27b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java @@ -2,9 +2,9 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; +import pro.gravit.launcher.core.hasher.HashedDir; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.modules.events.LaunchServerUpdatesSyncEvent; import pro.gravit.utils.helper.IOHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java index daa4b592..1149eaa6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.impl; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.modules.impl.SimpleModuleManager; import pro.gravit.launchserver.LaunchServer; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java index 47f12185..f1a3cd1e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java @@ -2,7 +2,7 @@ import io.netty.channel.ChannelHandlerContext; import pro.gravit.launcher.events.request.UpdateRequestEvent; -import pro.gravit.launcher.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedDir; import pro.gravit.launchserver.auth.protect.interfaces.ProfilesProtectHandler; import pro.gravit.launchserver.config.LaunchServerConfig; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg b/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg index 03507d17..ca10f5fa 100644 --- a/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg +++ b/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg @@ -16,19 +16,19 @@ -keeppackagenames com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.api.**, pro.gravit.utils.**, pro.gravit.launcher.request.**, pro.gravit.launcher.events.**, pro.gravit.launcher.profiles.** --keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.api.**, pro.gravit.utils.**, pro.gravit.launcher.request.**, pro.gravit.launcher.events.**, pro.gravit.launcher.profiles.**, pro.gravit.launcher.LauncherEngineWrapper { +-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.client.api.**, pro.gravit.utils.**, pro.gravit.launcher.request.**, pro.gravit.launcher.events.**, pro.gravit.launcher.profiles.**, pro.gravit.launcher.LauncherEngineWrapper { *; } --keepclassmembers @pro.gravit.launcher.LauncherNetworkAPI class ** { +-keepclassmembers @pro.gravit.launcher.core.LauncherNetworkAPI class ** { ; ; } -keepclassmembers class ** { - @pro.gravit.launcher.LauncherNetworkAPI + @pro.gravit.launcher.core.LauncherNetworkAPI ; - @pro.gravit.launcher.LauncherNetworkAPI + @pro.gravit.launcher.core.LauncherNetworkAPI ; } diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java b/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java index 112fbc13..1d9d8e2d 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java @@ -6,7 +6,7 @@ import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.tree.ClassNode; -import pro.gravit.launcher.LauncherInject; +import pro.gravit.launcher.core.LauncherInject; import pro.gravit.launchserver.asm.InjectClassAcceptor; import pro.gravit.utils.helper.JarHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/LauncherEngine.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngine.java similarity index 90% rename from Launcher/src/main/java/pro/gravit/launcher/LauncherEngine.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngine.java index 6acaa780..9c4be3e3 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/LauncherEngine.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngine.java @@ -1,15 +1,21 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.client.runtime; -import pro.gravit.launcher.client.*; -import pro.gravit.launcher.client.events.ClientEngineInitPhase; -import pro.gravit.launcher.client.events.ClientExitPhase; -import pro.gravit.launcher.client.events.ClientPreGuiPhase; -import pro.gravit.launcher.console.GetPublicKeyCommand; -import pro.gravit.launcher.console.ModulesCommand; -import pro.gravit.launcher.console.SignDataCommand; -import pro.gravit.launcher.gui.NoRuntimeProvider; -import pro.gravit.launcher.gui.RuntimeProvider; -import pro.gravit.launcher.managers.ConsoleManager; +import pro.gravit.launcher.*; +import pro.gravit.launcher.client.BasicLauncherEventHandler; +import pro.gravit.launcher.client.ClientLauncherMethods; +import pro.gravit.launcher.client.LauncherAgent; +import pro.gravit.launcher.client.runtime.client.*; +import pro.gravit.launcher.client.runtime.client.events.ClientEngineInitPhase; +import pro.gravit.launcher.client.runtime.client.events.ClientExitPhase; +import pro.gravit.launcher.client.runtime.client.events.ClientPreGuiPhase; +import pro.gravit.launcher.client.runtime.console.GetPublicKeyCommand; +import pro.gravit.launcher.client.runtime.console.ModulesCommand; +import pro.gravit.launcher.client.runtime.console.SignDataCommand; +import pro.gravit.launcher.client.runtime.gui.NoRuntimeProvider; +import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; +import pro.gravit.launcher.client.runtime.managers.ConsoleManager; +import pro.gravit.launcher.client.runtime.utils.NativeJVMHalt; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.events.OfflineModeEvent; import pro.gravit.launcher.modules.events.PreConfigPhase; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; @@ -20,7 +26,7 @@ import pro.gravit.launcher.request.auth.*; import pro.gravit.launcher.request.websockets.OfflineRequestService; import pro.gravit.launcher.request.websockets.StdWebSocketService; -import pro.gravit.launcher.utils.NativeJVMHalt; +import pro.gravit.launcher.start.RuntimeModuleManager; import pro.gravit.utils.helper.*; import java.io.IOException; diff --git a/Launcher/src/main/java/pro/gravit/launcher/LauncherEngineWrapper.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngineWrapper.java similarity index 94% rename from Launcher/src/main/java/pro/gravit/launcher/LauncherEngineWrapper.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngineWrapper.java index a637a571..01d588aa 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/LauncherEngineWrapper.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngineWrapper.java @@ -1,5 +1,6 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.client.runtime; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.launch.LaunchOptions; import pro.gravit.utils.launch.ModuleLaunch; diff --git a/Launcher/src/main/java/pro/gravit/launcher/NewLauncherSettings.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/NewLauncherSettings.java similarity index 54% rename from Launcher/src/main/java/pro/gravit/launcher/NewLauncherSettings.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/NewLauncherSettings.java index e7019d0a..bcb5c355 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/NewLauncherSettings.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/NewLauncherSettings.java @@ -1,12 +1,9 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.client.runtime; -import pro.gravit.launcher.client.UserSettings; -import pro.gravit.launcher.hasher.HashedDir; +import pro.gravit.launcher.client.runtime.client.UserSettings; +import pro.gravit.launcher.core.LauncherNetworkAPI; -import java.nio.file.Path; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; public class NewLauncherSettings { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherProcess.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java similarity index 94% rename from Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherProcess.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java index a224e176..29b42036 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherProcess.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java @@ -1,20 +1,20 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.launcher.Launcher; import pro.gravit.launcher.LauncherConfig; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.client.events.client.ClientProcessBuilderCreateEvent; -import pro.gravit.launcher.client.events.client.ClientProcessBuilderLaunchedEvent; -import pro.gravit.launcher.client.events.client.ClientProcessBuilderParamsWrittedEvent; -import pro.gravit.launcher.client.events.client.ClientProcessBuilderPreLaunchEvent; -import pro.gravit.launcher.hasher.HashedDir; +import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderCreateEvent; +import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderLaunchedEvent; +import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderParamsWrittedEvent; +import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderPreLaunchEvent; +import pro.gravit.launcher.core.hasher.HashedDir; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.PlayerProfile; import pro.gravit.launcher.profiles.optional.OptionalView; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; import pro.gravit.launcher.profiles.optional.actions.OptionalActionJvmArgs; import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.serialize.HOutput; +import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.utils.helper.*; import java.io.File; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/RuntimeGsonManager.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeGsonManager.java similarity index 83% rename from Launcher/src/main/java/pro/gravit/launcher/client/RuntimeGsonManager.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeGsonManager.java index b8789cf4..0ea95006 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/RuntimeGsonManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeGsonManager.java @@ -1,7 +1,8 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import com.google.gson.GsonBuilder; -import pro.gravit.launcher.managers.GsonManager; +import pro.gravit.launcher.start.RuntimeModuleManager; +import pro.gravit.launcher.core.managers.GsonManager; import pro.gravit.launcher.modules.events.PreGsonPhase; import pro.gravit.launcher.request.websockets.ClientWebSocketService; import pro.gravit.utils.UniversalJsonAdapter; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/RuntimeLauncherCoreModule.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeLauncherCoreModule.java similarity index 90% rename from Launcher/src/main/java/pro/gravit/launcher/client/RuntimeLauncherCoreModule.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeLauncherCoreModule.java index 76b85182..6b948c01 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/RuntimeLauncherCoreModule.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeLauncherCoreModule.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.launcher.modules.LauncherInitContext; import pro.gravit.launcher.modules.LauncherModule; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ServerPinger.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ServerPinger.java similarity index 98% rename from Launcher/src/main/java/pro/gravit/launcher/client/ServerPinger.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ServerPinger.java index c798f3d3..f0a83ea1 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ServerPinger.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ServerPinger.java @@ -1,12 +1,12 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.ClientProfileVersions; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.VerifyHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/UserSettings.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/UserSettings.java similarity index 74% rename from Launcher/src/main/java/pro/gravit/launcher/client/UserSettings.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/UserSettings.java index 1f6fb9b5..6a9b0c9d 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/UserSettings.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/UserSettings.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.utils.ProviderMap; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientEngineInitPhase.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientEngineInitPhase.java similarity index 68% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/ClientEngineInitPhase.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientEngineInitPhase.java index b877971f..1a54cc43 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientEngineInitPhase.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientEngineInitPhase.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events; +package pro.gravit.launcher.client.runtime.client.events; -import pro.gravit.launcher.LauncherEngine; +import pro.gravit.launcher.client.runtime.LauncherEngine; import pro.gravit.launcher.modules.events.InitPhase; public class ClientEngineInitPhase extends InitPhase { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientGuiPhase.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientGuiPhase.java similarity index 69% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/ClientGuiPhase.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientGuiPhase.java index 2e70f857..daee9373 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientGuiPhase.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientGuiPhase.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events; +package pro.gravit.launcher.client.runtime.client.events; -import pro.gravit.launcher.gui.RuntimeProvider; +import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; import pro.gravit.launcher.modules.LauncherModule; public class ClientGuiPhase extends LauncherModule.Event { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientPreGuiPhase.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientPreGuiPhase.java similarity index 69% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/ClientPreGuiPhase.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientPreGuiPhase.java index ebbad380..e3bce78d 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientPreGuiPhase.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientPreGuiPhase.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events; +package pro.gravit.launcher.client.runtime.client.events; -import pro.gravit.launcher.gui.RuntimeProvider; +import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; import pro.gravit.launcher.modules.LauncherModule; public class ClientPreGuiPhase extends LauncherModule.Event { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientUnlockConsoleEvent.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientUnlockConsoleEvent.java similarity index 84% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/ClientUnlockConsoleEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientUnlockConsoleEvent.java index 2bf5ba5b..814b5729 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/ClientUnlockConsoleEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientUnlockConsoleEvent.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.events; +package pro.gravit.launcher.client.runtime.client.events; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.utils.command.CommandHandler; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderCreateEvent.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderCreateEvent.java similarity index 70% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderCreateEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderCreateEvent.java index 2fe33846..7df12606 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderCreateEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderCreateEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientLauncherProcess; +import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; import pro.gravit.launcher.modules.LauncherModule; public class ClientProcessBuilderCreateEvent extends LauncherModule.Event { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderLaunchedEvent.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderLaunchedEvent.java similarity index 70% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderLaunchedEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderLaunchedEvent.java index dc5e4ffc..5383f328 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderLaunchedEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderLaunchedEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientLauncherProcess; +import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; import pro.gravit.launcher.modules.LauncherModule; public class ClientProcessBuilderLaunchedEvent extends LauncherModule.Event { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderParamsWrittedEvent.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderParamsWrittedEvent.java similarity index 69% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderParamsWrittedEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderParamsWrittedEvent.java index bb535568..469d92ad 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderParamsWrittedEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderParamsWrittedEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientLauncherProcess; +import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; import pro.gravit.launcher.modules.LauncherModule; public class ClientProcessBuilderParamsWrittedEvent extends LauncherModule.Event { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderPreLaunchEvent.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderPreLaunchEvent.java similarity index 70% rename from Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderPreLaunchEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderPreLaunchEvent.java index 2b9b1025..188bd42d 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessBuilderPreLaunchEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderPreLaunchEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientLauncherProcess; +import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; import pro.gravit.launcher.modules.LauncherModule; public class ClientProcessBuilderPreLaunchEvent extends LauncherModule.Event { diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/GetPublicKeyCommand.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/GetPublicKeyCommand.java similarity index 86% rename from Launcher/src/main/java/pro/gravit/launcher/console/GetPublicKeyCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/GetPublicKeyCommand.java index e20313fc..7a63a5eb 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/GetPublicKeyCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/GetPublicKeyCommand.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.console; +package pro.gravit.launcher.client.runtime.console; -import pro.gravit.launcher.LauncherEngine; +import pro.gravit.launcher.client.runtime.LauncherEngine; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/ModulesCommand.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/ModulesCommand.java similarity index 88% rename from Launcher/src/main/java/pro/gravit/launcher/console/ModulesCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/ModulesCommand.java index 94b03799..e4d42437 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/ModulesCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/ModulesCommand.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.console; +package pro.gravit.launcher.client.runtime.console; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.LauncherTrustManager; -import pro.gravit.launcher.managers.ConsoleManager; +import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.client.runtime.managers.ConsoleManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.modules.LauncherModuleInfo; import pro.gravit.utils.command.Command; diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/SignDataCommand.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/SignDataCommand.java similarity index 88% rename from Launcher/src/main/java/pro/gravit/launcher/console/SignDataCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/SignDataCommand.java index 2757a64a..f74051cb 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/SignDataCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/SignDataCommand.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.console; +package pro.gravit.launcher.client.runtime.console; -import pro.gravit.launcher.LauncherEngine; +import pro.gravit.launcher.client.runtime.LauncherEngine; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/UnlockCommand.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/UnlockCommand.java similarity index 82% rename from Launcher/src/main/java/pro/gravit/launcher/console/UnlockCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/UnlockCommand.java index 6d678051..4e1677c5 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/UnlockCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/UnlockCommand.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.console; +package pro.gravit.launcher.client.runtime.console; -import pro.gravit.launcher.managers.ConsoleManager; -import pro.gravit.launcher.managers.SettingsManager; +import pro.gravit.launcher.client.runtime.managers.ConsoleManager; +import pro.gravit.launcher.client.runtime.managers.SettingsManager; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/test/PrintHardwareInfoCommand.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/test/PrintHardwareInfoCommand.java similarity index 95% rename from Launcher/src/main/java/pro/gravit/launcher/console/test/PrintHardwareInfoCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/test/PrintHardwareInfoCommand.java index 93bbe490..3c4a3112 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/test/PrintHardwareInfoCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/test/PrintHardwareInfoCommand.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.console.test; +package pro.gravit.launcher.client.runtime.console.test; -import pro.gravit.launcher.utils.HWIDProvider; +import pro.gravit.launcher.client.runtime.utils.HWIDProvider; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/debug/ClientRuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/ClientRuntimeProvider.java similarity index 96% rename from Launcher/src/main/java/pro/gravit/launcher/debug/ClientRuntimeProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/ClientRuntimeProvider.java index f9a1a682..254bbce9 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/debug/ClientRuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/ClientRuntimeProvider.java @@ -1,13 +1,13 @@ -package pro.gravit.launcher.debug; +package pro.gravit.launcher.client.runtime.debug; import pro.gravit.launcher.ClientPermissions; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.api.AuthService; -import pro.gravit.launcher.api.ClientService; +import pro.gravit.launcher.client.api.AuthService; +import pro.gravit.launcher.client.api.ClientService; +import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; import pro.gravit.launcher.events.request.AuthRequestEvent; import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.gui.RuntimeProvider; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.auth.AuthRequest; diff --git a/Launcher/src/main/java/pro/gravit/launcher/debug/DebugLauncherTrustManager.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugLauncherTrustManager.java similarity index 89% rename from Launcher/src/main/java/pro/gravit/launcher/debug/DebugLauncherTrustManager.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugLauncherTrustManager.java index e49d79d2..3be634d1 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/debug/DebugLauncherTrustManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugLauncherTrustManager.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.debug; +package pro.gravit.launcher.client.runtime.debug; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import java.security.cert.X509Certificate; diff --git a/Launcher/src/main/java/pro/gravit/launcher/debug/DebugMain.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugMain.java similarity index 92% rename from Launcher/src/main/java/pro/gravit/launcher/debug/DebugMain.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugMain.java index e3529e76..39b33d2f 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/debug/DebugMain.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugMain.java @@ -1,12 +1,12 @@ -package pro.gravit.launcher.debug; +package pro.gravit.launcher.client.runtime.debug; -import pro.gravit.launcher.ClientLauncherMethods; import pro.gravit.launcher.Launcher; import pro.gravit.launcher.LauncherConfig; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.client.RuntimeLauncherCoreModule; -import pro.gravit.launcher.client.RuntimeModuleManager; -import pro.gravit.launcher.managers.ConsoleManager; +import pro.gravit.launcher.client.ClientLauncherMethods; +import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.client.runtime.client.RuntimeLauncherCoreModule; +import pro.gravit.launcher.client.runtime.managers.ConsoleManager; +import pro.gravit.launcher.start.RuntimeModuleManager; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.modules.events.OfflineModeEvent; import pro.gravit.launcher.modules.events.PreConfigPhase; diff --git a/Launcher/src/main/java/pro/gravit/launcher/gui/NoRuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/NoRuntimeProvider.java similarity index 89% rename from Launcher/src/main/java/pro/gravit/launcher/gui/NoRuntimeProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/NoRuntimeProvider.java index 14e75afb..46ea445c 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/gui/NoRuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/NoRuntimeProvider.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.gui; +package pro.gravit.launcher.client.runtime.gui; import javax.swing.*; diff --git a/Launcher/src/main/java/pro/gravit/launcher/gui/RuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/RuntimeProvider.java similarity index 72% rename from Launcher/src/main/java/pro/gravit/launcher/gui/RuntimeProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/RuntimeProvider.java index bee04f48..08f12cb2 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/gui/RuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/RuntimeProvider.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.gui; +package pro.gravit.launcher.client.runtime.gui; public interface RuntimeProvider { void run(String[] args); diff --git a/Launcher/src/main/java/pro/gravit/launcher/managers/ConsoleManager.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/ConsoleManager.java similarity index 87% rename from Launcher/src/main/java/pro/gravit/launcher/managers/ConsoleManager.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/ConsoleManager.java index bffca63e..0a13e180 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/managers/ConsoleManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/ConsoleManager.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.managers; +package pro.gravit.launcher.client.runtime.managers; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.client.events.ClientUnlockConsoleEvent; -import pro.gravit.launcher.console.UnlockCommand; -import pro.gravit.launcher.console.test.PrintHardwareInfoCommand; +import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.client.runtime.client.events.ClientUnlockConsoleEvent; +import pro.gravit.launcher.client.runtime.console.UnlockCommand; +import pro.gravit.launcher.client.runtime.console.test.PrintHardwareInfoCommand; import pro.gravit.utils.command.CommandHandler; import pro.gravit.utils.command.JLineCommandHandler; import pro.gravit.utils.command.StdCommandHandler; diff --git a/Launcher/src/main/java/pro/gravit/launcher/managers/SettingsManager.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/SettingsManager.java similarity index 64% rename from Launcher/src/main/java/pro/gravit/launcher/managers/SettingsManager.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/SettingsManager.java index 54185d6f..bff7307b 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/managers/SettingsManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/SettingsManager.java @@ -1,21 +1,10 @@ -package pro.gravit.launcher.managers; +package pro.gravit.launcher.client.runtime.managers; -import pro.gravit.launcher.NewLauncherSettings; -import pro.gravit.launcher.client.DirBridge; +import pro.gravit.launcher.client.runtime.NewLauncherSettings; +import pro.gravit.launcher.client.runtime.client.DirBridge; import pro.gravit.launcher.config.JsonConfigurable; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; -import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; -import java.io.IOException; -import java.nio.file.FileVisitResult; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.SimpleFileVisitor; -import java.nio.file.attribute.BasicFileAttributes; - public class SettingsManager extends JsonConfigurable { public static NewLauncherSettings settings; diff --git a/Launcher/src/main/java/pro/gravit/launcher/utils/HWIDProvider.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java similarity index 98% rename from Launcher/src/main/java/pro/gravit/launcher/utils/HWIDProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java index 2cc8dd06..31e7b261 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/utils/HWIDProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.utils; +package pro.gravit.launcher.client.runtime.utils; import oshi.SystemInfo; import oshi.hardware.*; diff --git a/Launcher/src/main/java/pro/gravit/launcher/utils/LauncherUpdater.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/LauncherUpdater.java similarity index 95% rename from Launcher/src/main/java/pro/gravit/launcher/utils/LauncherUpdater.java rename to Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/LauncherUpdater.java index f2712a0e..f4998402 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/utils/LauncherUpdater.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/LauncherUpdater.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.utils; +package pro.gravit.launcher.client.runtime.utils; -import pro.gravit.launcher.LauncherEngine; -import pro.gravit.launcher.LauncherInject; +import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.core.LauncherInject; import pro.gravit.launcher.request.update.LauncherRequest; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/ClientPermissions.java b/LauncherAPI/src/main/java/pro/gravit/launcher/ClientPermissions.java index e42164cc..6edb6178 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/ClientPermissions.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/ClientPermissions.java @@ -1,5 +1,7 @@ package pro.gravit.launcher; +import pro.gravit.launcher.core.LauncherNetworkAPI; + import java.util.*; public class ClientPermissions { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java b/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java index 165f2bfb..261053be 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java @@ -1,8 +1,8 @@ package pro.gravit.launcher; -import pro.gravit.launcher.managers.GsonManager; +import pro.gravit.launcher.core.managers.GsonManager; import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.serialize.HInput; +import pro.gravit.launcher.core.serialize.HInput; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java b/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java index 10fbcea4..19e26ccd 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java @@ -1,10 +1,13 @@ package pro.gravit.launcher; +import pro.gravit.launcher.core.LauncherInject; +import pro.gravit.launcher.core.LauncherInjectionConstructor; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.modules.LauncherModulesManager; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; -import pro.gravit.launcher.serialize.stream.StreamObject; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; +import pro.gravit.launcher.core.serialize.stream.StreamObject; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/api/AuthService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/AuthService.java similarity index 94% rename from LauncherAPI/src/main/java/pro/gravit/launcher/api/AuthService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/client/api/AuthService.java index 0020d954..529c3b5b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/api/AuthService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/AuthService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.api; +package pro.gravit.launcher.client.api; import pro.gravit.launcher.ClientPermissions; import pro.gravit.launcher.profiles.ClientProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/api/ClientService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ClientService.java similarity index 93% rename from LauncherAPI/src/main/java/pro/gravit/launcher/api/ClientService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ClientService.java index 50c3a8da..f7964574 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/api/ClientService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ClientService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.api; +package pro.gravit.launcher.client.api; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/api/ConfigService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ConfigService.java similarity index 88% rename from LauncherAPI/src/main/java/pro/gravit/launcher/api/ConfigService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ConfigService.java index 01bafb3d..afa438f7 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/api/ConfigService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ConfigService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.api; +package pro.gravit.launcher.client.api; public class ConfigService { public static boolean disableLogging; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/api/KeyService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/KeyService.java similarity index 84% rename from LauncherAPI/src/main/java/pro/gravit/launcher/api/KeyService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/client/api/KeyService.java index 5976d4f8..4b3eac7e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/api/KeyService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/KeyService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.api; +package pro.gravit.launcher.client.api; import java.security.interfaces.ECPublicKey; import java.security.interfaces.RSAPublicKey; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/managers/ConfigManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/ConfigManager.java similarity index 96% rename from LauncherAPI/src/main/java/pro/gravit/launcher/managers/ConfigManager.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/ConfigManager.java index cda96970..a1843aaf 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/managers/ConfigManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/ConfigManager.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.managers; +package pro.gravit.launcher.client.runtime.managers; import pro.gravit.launcher.config.JsonConfigurable; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/managers/SimpleModulesConfigManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/SimpleModulesConfigManager.java similarity index 95% rename from LauncherAPI/src/main/java/pro/gravit/launcher/managers/SimpleModulesConfigManager.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/SimpleModulesConfigManager.java index 4e954886..3a57e209 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/managers/SimpleModulesConfigManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/SimpleModulesConfigManager.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.managers; +package pro.gravit.launcher.client.runtime.managers; import pro.gravit.launcher.config.SimpleConfigurable; import pro.gravit.launcher.modules.ModulesConfigManager; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java index a5fef64b..3b492876 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.request.WebSocketEvent; public class NotificationEvent implements WebSocketEvent { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java index 60323f61..627ec74b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.request.WebSocketEvent; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AuthRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AuthRequestEvent.java index 3881ebe7..0a614634 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AuthRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AuthRequestEvent.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.events.request; import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.profiles.PlayerProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java index c6d57f94..1bf0aad0 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.profiles.PlayerProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CheckServerRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CheckServerRequestEvent.java index 47a78f93..c66ee020 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CheckServerRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CheckServerRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.profiles.PlayerProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ErrorRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ErrorRequestEvent.java index e8c3b822..9bb510d8 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ErrorRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ErrorRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAvailabilityAuthRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAvailabilityAuthRequestEvent.java index c0768207..629c82a4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAvailabilityAuthRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAvailabilityAuthRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.utils.TypeSerializeInterface; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/JoinServerRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/JoinServerRequestEvent.java index dc13f759..519c2c8d 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/JoinServerRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/JoinServerRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/LauncherRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/LauncherRequestEvent.java index 17d94488..9802973b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/LauncherRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/LauncherRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.ExtendedTokenRequestEvent; import pro.gravit.launcher.events.RequestEvent; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java index b2bad307..33c9aa43 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.profiles.PlayerProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java index 6c3c532c..6675cdc7 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.profiles.PlayerProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfilesRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfilesRequestEvent.java index 383becab..626f282e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfilesRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfilesRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.profiles.ClientProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SetProfileRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SetProfileRequestEvent.java index 6596ac9a..7dd5cbe1 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SetProfileRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SetProfileRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import pro.gravit.launcher.profiles.ClientProfile; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java index 5f54432c..7cfbc2ba 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; import java.util.HashSet; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateRequestEvent.java index e5f357f8..8c98b284 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateRequestEvent.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.events.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedDir; public class UpdateRequestEvent extends RequestEvent { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java index 65ed59a4..26eee8be 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.modules; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.utils.Version; import java.util.ArrayList; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java index 773e2f72..f754e6c8 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.modules.impl; -import pro.gravit.launcher.LauncherTrustManager; -import pro.gravit.launcher.managers.SimpleModulesConfigManager; +import pro.gravit.launcher.core.LauncherTrustManager; +import pro.gravit.launcher.client.runtime.managers.SimpleModulesConfigManager; import pro.gravit.launcher.modules.*; import pro.gravit.utils.PublicURLClassLoader; import pro.gravit.utils.Version; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java index 70d9dd2a..dd789dbc 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.profiles; import com.google.gson.*; -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.hasher.FileNameMatcher; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.core.hasher.FileNameMatcher; import pro.gravit.launcher.profiles.optional.OptionalDepend; import pro.gravit.launcher.profiles.optional.OptionalFile; import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/Texture.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/Texture.java index f4a070d9..1e4a637e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/Texture.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/Texture.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.profiles; -import pro.gravit.launcher.serialize.HOutput; -import pro.gravit.launcher.serialize.stream.StreamObject; +import pro.gravit.launcher.core.serialize.HOutput; +import pro.gravit.launcher.core.serialize.stream.StreamObject; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.SecurityHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalDepend.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalDepend.java index c5acde22..55c7c0a5 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalDepend.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalDepend.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.profiles.optional; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; public class OptionalDepend { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java index 36b57c83..1884e443 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.profiles.optional; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; import java.util.List; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionFile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionFile.java index e2999b22..9f831635 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionFile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionFile.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.profiles.optional.actions; -import pro.gravit.launcher.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedDir; import pro.gravit.utils.helper.LogHelper; import java.util.Map; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java index 47de5f3a..991a638d 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.AuthRequestEvent; import pro.gravit.launcher.events.request.CurrentUserRequestEvent; import pro.gravit.launcher.events.request.RefreshTokenRequestEvent; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java index 679ae5bb..da3081c2 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.auth; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.AuthRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.auth.password.*; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java index 9e3ff5f6..998fb903 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.auth; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.CheckServerRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.websockets.WebSocketRequest; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java index 54c8df02..685c171d 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.auth; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.JoinServerRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.websockets.WebSocketRequest; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/SetProfileRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/SetProfileRequest.java index 3c72b502..9948243c 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/SetProfileRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/SetProfileRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.auth; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.SetProfileRequestEvent; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.request.Request; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthAESPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthAESPassword.java index 974afbec..545cd5a3 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthAESPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthAESPassword.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.auth.password; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.request.auth.AuthRequest; public class AuthAESPassword implements AuthRequest.AuthPasswordInterface { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthPlainPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthPlainPassword.java index 9e83e6a2..1f0714b1 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthPlainPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthPlainPassword.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.auth.password; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.request.auth.AuthRequest; public class AuthPlainPassword implements AuthRequest.AuthPasswordInterface { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/LauncherRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/LauncherRequest.java index b2345410..4e8d0be7 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/LauncherRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/LauncherRequest.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.request.update; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.LauncherRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.RequestService; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateRequest.java index 9f82311b..b851b55c 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.update; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.UpdateRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.websockets.WebSocketRequest; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java index a3f1ab2e..8f4f3c4f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.uuid; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.BatchProfileByUsernameRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.websockets.WebSocketRequest; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUUIDRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUUIDRequest.java index 4531f85c..ea95fa98 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUUIDRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUUIDRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.uuid; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.ProfileByUUIDRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.websockets.WebSocketRequest; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java index d164b28e..784f710f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.request.uuid; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.events.request.ProfileByUsernameRequestEvent; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.websockets.WebSocketRequest; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java index 255c3267..0afe1267 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java @@ -14,8 +14,8 @@ import io.netty.handler.codec.http.websocketx.WebSocketVersion; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; -import pro.gravit.launcher.CertificatePinningTrustManager; -import pro.gravit.launcher.LauncherInject; +import pro.gravit.launcher.core.CertificatePinningTrustManager; +import pro.gravit.launcher.core.LauncherInject; import pro.gravit.utils.helper.LogHelper; import javax.net.ssl.SSLException; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java index c7c269fa..5d18b124 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java @@ -5,8 +5,8 @@ import pro.gravit.launcher.Launcher; import pro.gravit.launcher.events.NotificationEvent; import pro.gravit.launcher.events.request.*; -import pro.gravit.launcher.hasher.HashedEntry; -import pro.gravit.launcher.hasher.HashedEntryAdapter; +import pro.gravit.launcher.core.hasher.HashedEntry; +import pro.gravit.launcher.core.hasher.HashedEntryAdapter; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/BasicLauncherEventHandler.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java similarity index 94% rename from LauncherClient/src/main/java/pro/gravit/launcher/BasicLauncherEventHandler.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java index 3e5e5cd2..aea92c9d 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/BasicLauncherEventHandler.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.client; -import pro.gravit.launcher.api.DialogService; +import pro.gravit.launcher.client.api.DialogService; import pro.gravit.launcher.events.ExtendedTokenRequestEvent; import pro.gravit.launcher.events.NotificationEvent; import pro.gravit.launcher.events.request.SecurityReportRequestEvent; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/ClientLauncherMethods.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherMethods.java similarity index 92% rename from LauncherClient/src/main/java/pro/gravit/launcher/ClientLauncherMethods.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherMethods.java index 3715b1e5..2774a122 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/ClientLauncherMethods.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherMethods.java @@ -1,10 +1,12 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.client; -import pro.gravit.launcher.client.ClientGsonManager; -import pro.gravit.launcher.client.ClientLauncherEntryPoint; -import pro.gravit.launcher.client.ClientModuleManager; -import pro.gravit.launcher.client.ClientParams; -import pro.gravit.launcher.client.events.ClientExitPhase; +import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.core.LauncherTrustManager; +import pro.gravit.launcher.client.runtime.client.ClientGsonManager; +import pro.gravit.launcher.client.runtime.client.ClientLauncherEntryPoint; +import pro.gravit.launcher.client.runtime.client.ClientModuleManager; +import pro.gravit.launcher.client.runtime.client.ClientParams; +import pro.gravit.launcher.client.runtime.client.events.ClientExitPhase; import pro.gravit.launcher.events.request.*; import pro.gravit.launcher.modules.LauncherModulesManager; import pro.gravit.launcher.modules.events.OfflineModeEvent; @@ -21,7 +23,7 @@ import pro.gravit.launcher.request.uuid.ProfileByUUIDRequest; import pro.gravit.launcher.request.uuid.ProfileByUsernameRequest; import pro.gravit.launcher.request.websockets.OfflineRequestService; -import pro.gravit.launcher.utils.NativeJVMHalt; +import pro.gravit.launcher.client.runtime.utils.NativeJVMHalt; import pro.gravit.utils.helper.JVMHelper; import java.security.cert.X509Certificate; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/LauncherAgent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/LauncherAgent.java similarity index 94% rename from LauncherClient/src/main/java/pro/gravit/launcher/LauncherAgent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/LauncherAgent.java index 63d96485..27924bba 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/LauncherAgent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/LauncherAgent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.client; -import pro.gravit.launcher.utils.NativeJVMHalt; +import pro.gravit.launcher.client.runtime.utils.NativeJVMHalt; import pro.gravit.utils.helper.LogHelper; import java.io.File; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/api/CertificateService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java similarity index 94% rename from LauncherClient/src/main/java/pro/gravit/launcher/api/CertificateService.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java index b21cb0b5..1bfbe960 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/api/CertificateService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.api; +package pro.gravit.launcher.client.api; -import pro.gravit.launcher.ClientLauncherMethods; -import pro.gravit.launcher.LauncherTrustManager; -import pro.gravit.launcher.utils.ApiBridgeService; +import pro.gravit.launcher.client.ClientLauncherMethods; +import pro.gravit.launcher.core.LauncherTrustManager; +import pro.gravit.launcher.client.runtime.utils.ApiBridgeService; import java.security.cert.X509Certificate; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/api/DialogService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/DialogService.java similarity index 98% rename from LauncherClient/src/main/java/pro/gravit/launcher/api/DialogService.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/api/DialogService.java index 7180c757..0132ef3d 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/api/DialogService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/DialogService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.api; +package pro.gravit.launcher.client.api; import pro.gravit.launcher.events.NotificationEvent; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/api/SystemService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/SystemService.java similarity index 69% rename from LauncherClient/src/main/java/pro/gravit/launcher/api/SystemService.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/api/SystemService.java index 9d8aed49..4b7f2674 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/api/SystemService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/SystemService.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.api; +package pro.gravit.launcher.client.api; -import pro.gravit.launcher.ClientLauncherMethods; +import pro.gravit.launcher.client.ClientLauncherMethods; public class SystemService { private SystemService() { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientGsonManager.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientGsonManager.java similarity index 85% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/ClientGsonManager.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientGsonManager.java index bcd99ccc..9a503091 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientGsonManager.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientGsonManager.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import com.google.gson.GsonBuilder; -import pro.gravit.launcher.managers.GsonManager; +import pro.gravit.launcher.core.managers.GsonManager; import pro.gravit.launcher.modules.events.PreGsonPhase; import pro.gravit.launcher.request.websockets.ClientWebSocketService; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherCoreModule.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherCoreModule.java similarity index 90% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherCoreModule.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherCoreModule.java index 21e3c8af..5dd32863 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherCoreModule.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherCoreModule.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.launcher.modules.LauncherInitContext; import pro.gravit.launcher.modules.LauncherModule; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherEntryPoint.java similarity index 95% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherEntryPoint.java index 15436bd5..e73b31cb 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherEntryPoint.java @@ -1,13 +1,16 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.launcher.*; -import pro.gravit.launcher.api.AuthService; -import pro.gravit.launcher.api.ClientService; -import pro.gravit.launcher.api.KeyService; -import pro.gravit.launcher.client.events.client.*; -import pro.gravit.launcher.hasher.FileNameMatcher; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.hasher.HashedEntry; +import pro.gravit.launcher.client.BasicLauncherEventHandler; +import pro.gravit.launcher.client.ClientLauncherMethods; +import pro.gravit.launcher.client.LauncherAgent; +import pro.gravit.launcher.client.api.AuthService; +import pro.gravit.launcher.client.api.ClientService; +import pro.gravit.launcher.client.api.KeyService; +import pro.gravit.launcher.client.runtime.client.events.client.*; +import pro.gravit.launcher.core.hasher.FileNameMatcher; +import pro.gravit.launcher.core.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedEntry; import pro.gravit.launcher.modules.events.PreConfigPhase; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.ClientProfileVersions; @@ -18,8 +21,8 @@ import pro.gravit.launcher.request.RequestException; import pro.gravit.launcher.request.RequestService; import pro.gravit.launcher.request.websockets.StdWebSocketService; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.utils.DirWatcher; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.client.runtime.utils.DirWatcher; import pro.gravit.utils.helper.*; import pro.gravit.utils.launch.*; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java similarity index 90% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java index 648685e7..046cbc33 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.modules.impl.SimpleModuleManager; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientParams.java similarity index 97% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientParams.java index da72aba6..e8047887 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientParams.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.launcher.Launcher; import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedDir; import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.ClientProfileVersions; import pro.gravit.launcher.profiles.PlayerProfile; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/DirBridge.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/DirBridge.java similarity index 98% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/DirBridge.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/DirBridge.java index 397c056d..3167bfef 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/DirBridge.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/DirBridge.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.client.runtime.client; import pro.gravit.launcher.Launcher; import pro.gravit.utils.helper.IOHelper; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientExitPhase.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientExitPhase.java similarity index 78% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientExitPhase.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientExitPhase.java index 230ea6d8..199bf0e4 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientExitPhase.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientExitPhase.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.events; +package pro.gravit.launcher.client.runtime.client.events; import pro.gravit.launcher.modules.events.ClosePhase; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessClassLoaderEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessClassLoaderEvent.java similarity index 90% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessClassLoaderEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessClassLoaderEvent.java index e42c17a9..7d193807 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessClassLoaderEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessClassLoaderEvent.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.profiles.ClientProfile; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessInitPhase.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessInitPhase.java similarity index 65% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessInitPhase.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessInitPhase.java index 613d696f..a7f27384 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessInitPhase.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessInitPhase.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.client.runtime.client.ClientParams; import pro.gravit.launcher.modules.events.InitPhase; public class ClientProcessInitPhase extends InitPhase { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessLaunchEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessLaunchEvent.java similarity index 66% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessLaunchEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessLaunchEvent.java index c43a9c5c..5954e801 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessLaunchEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessLaunchEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.client.runtime.client.ClientParams; import pro.gravit.launcher.modules.LauncherModule; public class ClientProcessLaunchEvent extends LauncherModule.Event { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessPreInvokeMainClassEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessPreInvokeMainClassEvent.java similarity index 81% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessPreInvokeMainClassEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessPreInvokeMainClassEvent.java index 731f2c84..c84e7904 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessPreInvokeMainClassEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessPreInvokeMainClassEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.client.runtime.client.ClientParams; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.profiles.ClientProfile; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessReadyEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessReadyEvent.java similarity index 66% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessReadyEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessReadyEvent.java index 574814a6..87399ece 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/events/client/ClientProcessReadyEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessReadyEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.events.client; +package pro.gravit.launcher.client.runtime.client.events.client; -import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.client.runtime.client.ClientParams; import pro.gravit.launcher.modules.events.PostInitPhase; public class ClientProcessReadyEvent extends PostInitPhase { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/utils/ApiBridgeService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/ApiBridgeService.java similarity index 86% rename from LauncherClient/src/main/java/pro/gravit/launcher/utils/ApiBridgeService.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/ApiBridgeService.java index 8e0dcab9..ce675a57 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/utils/ApiBridgeService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/ApiBridgeService.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.utils; +package pro.gravit.launcher.client.runtime.utils; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import java.security.cert.X509Certificate; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/utils/DirWatcher.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/DirWatcher.java similarity index 93% rename from LauncherClient/src/main/java/pro/gravit/launcher/utils/DirWatcher.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/DirWatcher.java index 1ee0949b..a3ab7053 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/utils/DirWatcher.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/DirWatcher.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.utils; +package pro.gravit.launcher.client.runtime.utils; -import pro.gravit.launcher.ClientLauncherMethods; -import pro.gravit.launcher.hasher.FileNameMatcher; -import pro.gravit.launcher.hasher.HashedDir; -import pro.gravit.launcher.hasher.HashedEntry; -import pro.gravit.launcher.hasher.HashedFile; +import pro.gravit.launcher.client.ClientLauncherMethods; +import pro.gravit.launcher.core.hasher.FileNameMatcher; +import pro.gravit.launcher.core.hasher.HashedDir; +import pro.gravit.launcher.core.hasher.HashedEntry; +import pro.gravit.launcher.core.hasher.HashedFile; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.JVMHelper.OS; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/NativeJVMHalt.java similarity index 94% rename from LauncherClient/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/NativeJVMHalt.java index 34eea24c..c442c264 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/NativeJVMHalt.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.utils; +package pro.gravit.launcher.client.runtime.utils; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/CertificatePinningTrustManager.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/CertificatePinningTrustManager.java similarity index 98% rename from LauncherCore/src/main/java/pro/gravit/launcher/CertificatePinningTrustManager.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/CertificatePinningTrustManager.java index e60311eb..854c9422 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/CertificatePinningTrustManager.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/CertificatePinningTrustManager.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.core; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherInject.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherInject.java similarity index 89% rename from LauncherCore/src/main/java/pro/gravit/launcher/LauncherInject.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherInject.java index b76203ad..8d9d43ff 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherInject.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherInject.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.core; import java.lang.annotation.Retention; import java.lang.annotation.Target; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherInjectionConstructor.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherInjectionConstructor.java similarity index 89% rename from LauncherCore/src/main/java/pro/gravit/launcher/LauncherInjectionConstructor.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherInjectionConstructor.java index 9c2359df..27dc6dfe 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherInjectionConstructor.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherInjectionConstructor.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.core; import java.lang.annotation.Retention; import java.lang.annotation.Target; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherNetworkAPI.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherNetworkAPI.java similarity index 94% rename from LauncherCore/src/main/java/pro/gravit/launcher/LauncherNetworkAPI.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherNetworkAPI.java index 9c2fad06..b767adbd 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherNetworkAPI.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherNetworkAPI.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.core; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherTrustManager.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherTrustManager.java similarity index 99% rename from LauncherCore/src/main/java/pro/gravit/launcher/LauncherTrustManager.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherTrustManager.java index 52a4f894..b5d0a268 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/LauncherTrustManager.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/LauncherTrustManager.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.core; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/FileNameMatcher.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/FileNameMatcher.java similarity index 97% rename from LauncherCore/src/main/java/pro/gravit/launcher/hasher/FileNameMatcher.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/FileNameMatcher.java index de19d4a9..c1698d0e 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/FileNameMatcher.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/FileNameMatcher.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.hasher; +package pro.gravit.launcher.core.hasher; import java.util.Collection; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedDir.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java similarity index 98% rename from LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedDir.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java index 71b28e17..14ed4211 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedDir.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.hasher; +package pro.gravit.launcher.core.hasher; -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; -import pro.gravit.launcher.serialize.stream.EnumSerializer; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; +import pro.gravit.launcher.core.serialize.stream.EnumSerializer; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.VerifyHelper; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedEntry.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedEntry.java similarity index 72% rename from LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedEntry.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedEntry.java index d8e491c9..af21ce9f 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedEntry.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedEntry.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.hasher; +package pro.gravit.launcher.core.hasher; -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.stream.EnumSerializer; -import pro.gravit.launcher.serialize.stream.StreamObject; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.stream.EnumSerializer; +import pro.gravit.launcher.core.serialize.stream.StreamObject; import java.io.IOException; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedEntryAdapter.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedEntryAdapter.java similarity index 96% rename from LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedEntryAdapter.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedEntryAdapter.java index bc70cd91..1c555492 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedEntryAdapter.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedEntryAdapter.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.hasher; +package pro.gravit.launcher.core.hasher; import com.google.gson.*; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedFile.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedFile.java similarity index 92% rename from LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedFile.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedFile.java index cc36bf50..f4712fa1 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedFile.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedFile.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.hasher; +package pro.gravit.launcher.core.hasher; -import pro.gravit.launcher.LauncherNetworkAPI; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; +import pro.gravit.launcher.core.LauncherNetworkAPI; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.SecurityHelper; import pro.gravit.utils.helper.SecurityHelper.DigestAlgorithm; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/managers/GsonManager.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/managers/GsonManager.java similarity index 86% rename from LauncherCore/src/main/java/pro/gravit/launcher/managers/GsonManager.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/managers/GsonManager.java index 5b06d10b..76466a63 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/managers/GsonManager.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/managers/GsonManager.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.managers; +package pro.gravit.launcher.core.managers; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import pro.gravit.launcher.hasher.HashedEntry; -import pro.gravit.launcher.hasher.HashedEntryAdapter; +import pro.gravit.launcher.core.hasher.HashedEntry; +import pro.gravit.launcher.core.hasher.HashedEntryAdapter; import pro.gravit.utils.helper.CommonHelper; public class GsonManager { diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/HInput.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HInput.java similarity index 98% rename from LauncherCore/src/main/java/pro/gravit/launcher/serialize/HInput.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HInput.java index 8e456425..9ee4e103 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/HInput.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HInput.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.serialize; +package pro.gravit.launcher.core.serialize; import pro.gravit.utils.helper.IOHelper; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/HOutput.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HOutput.java similarity index 98% rename from LauncherCore/src/main/java/pro/gravit/launcher/serialize/HOutput.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HOutput.java index 37ee3dc7..aa9f136e 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/HOutput.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HOutput.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.serialize; +package pro.gravit.launcher.core.serialize; import pro.gravit.utils.helper.IOHelper; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/signed/DigestBytesHolder.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/signed/DigestBytesHolder.java similarity index 86% rename from LauncherCore/src/main/java/pro/gravit/launcher/serialize/signed/DigestBytesHolder.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/signed/DigestBytesHolder.java index 34ae728f..b311ae29 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/signed/DigestBytesHolder.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/signed/DigestBytesHolder.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.serialize.signed; +package pro.gravit.launcher.core.serialize.signed; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; -import pro.gravit.launcher.serialize.stream.StreamObject; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; +import pro.gravit.launcher.core.serialize.stream.StreamObject; import pro.gravit.utils.helper.SecurityHelper; import java.io.IOException; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/stream/EnumSerializer.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/stream/EnumSerializer.java similarity index 79% rename from LauncherCore/src/main/java/pro/gravit/launcher/serialize/stream/EnumSerializer.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/stream/EnumSerializer.java index e0bdf871..7c5a113d 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/stream/EnumSerializer.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/stream/EnumSerializer.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.serialize.stream; +package pro.gravit.launcher.core.serialize.stream; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; -import pro.gravit.launcher.serialize.stream.EnumSerializer.Itf; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; +import pro.gravit.launcher.core.serialize.stream.EnumSerializer.Itf; import pro.gravit.utils.helper.VerifyHelper; import java.io.IOException; diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/stream/StreamObject.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/stream/StreamObject.java similarity index 81% rename from LauncherCore/src/main/java/pro/gravit/launcher/serialize/stream/StreamObject.java rename to LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/stream/StreamObject.java index c66c0741..d30bb14d 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/serialize/stream/StreamObject.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/stream/StreamObject.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.serialize.stream; +package pro.gravit.launcher.core.serialize.stream; -import pro.gravit.launcher.serialize.HInput; -import pro.gravit.launcher.serialize.HOutput; +import pro.gravit.launcher.core.serialize.HInput; +import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.utils.helper.IOHelper; import java.io.ByteArrayOutputStream; diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java index d63fa7f6..36d6b00b 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java @@ -1,6 +1,6 @@ package pro.gravit.utils.helper; -import pro.gravit.launcher.LauncherNetworkAPI; +import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.utils.logging.LogHelperAppender; import pro.gravit.utils.logging.SimpleLogHelperImpl; import pro.gravit.utils.logging.Slf4jLogHelperImpl; diff --git a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java b/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java index 6cecfc9e..9ab8fae7 100644 --- a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java +++ b/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.modern; -import pro.gravit.launcher.CertificatePinningTrustManager; -import pro.gravit.launcher.LauncherInject; +import pro.gravit.launcher.core.CertificatePinningTrustManager; +import pro.gravit.launcher.core.LauncherInject; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherStart/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java b/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientLauncherWrapper.java similarity index 96% rename from LauncherStart/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java rename to LauncherStart/src/main/java/pro/gravit/launcher/start/ClientLauncherWrapper.java index 30e4301b..a068b3db 100644 --- a/LauncherStart/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java +++ b/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientLauncherWrapper.java @@ -1,8 +1,10 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.start; -import pro.gravit.launcher.client.RuntimeModuleManager; -import pro.gravit.launcher.client.DirBridge; -import pro.gravit.launcher.utils.DirWatcher; +import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.LauncherConfig; +import pro.gravit.launcher.client.runtime.client.DirBridge; +import pro.gravit.launcher.client.runtime.utils.DirWatcher; +import pro.gravit.launcher.core.LauncherInject; import pro.gravit.utils.Version; import pro.gravit.utils.helper.*; diff --git a/LauncherStart/src/main/java/pro/gravit/launcher/ClientWrapperModule.java b/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientWrapperModule.java similarity index 60% rename from LauncherStart/src/main/java/pro/gravit/launcher/ClientWrapperModule.java rename to LauncherStart/src/main/java/pro/gravit/launcher/start/ClientWrapperModule.java index 6c4feafb..af380726 100644 --- a/LauncherStart/src/main/java/pro/gravit/launcher/ClientWrapperModule.java +++ b/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientWrapperModule.java @@ -1,6 +1,4 @@ -package pro.gravit.launcher; - -import pro.gravit.launcher.ClientLauncherWrapper; +package pro.gravit.launcher.start; public interface ClientWrapperModule { void wrapperPhase(ClientLauncherWrapper.ClientLauncherWrapperContext context); diff --git a/LauncherStart/src/main/java/pro/gravit/launcher/client/RuntimeModuleManager.java b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java similarity index 88% rename from LauncherStart/src/main/java/pro/gravit/launcher/client/RuntimeModuleManager.java rename to LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java index c3f92075..597d086b 100644 --- a/LauncherStart/src/main/java/pro/gravit/launcher/client/RuntimeModuleManager.java +++ b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java @@ -1,9 +1,7 @@ -package pro.gravit.launcher.client; +package pro.gravit.launcher.start; -import pro.gravit.launcher.ClientLauncherWrapper; -import pro.gravit.launcher.ClientWrapperModule; import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherTrustManager; +import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.modules.LauncherModule; import pro.gravit.launcher.modules.impl.SimpleModuleManager; diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index 4b82b2a3..734fc1fa 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -1,17 +1,15 @@ package pro.gravit.launcher.server; -import pro.gravit.launcher.ClientPermissions; import pro.gravit.launcher.Launcher; import pro.gravit.launcher.LauncherConfig; -import pro.gravit.launcher.api.AuthService; -import pro.gravit.launcher.api.ClientService; -import pro.gravit.launcher.api.ConfigService; -import pro.gravit.launcher.api.KeyService; +import pro.gravit.launcher.client.api.AuthService; +import pro.gravit.launcher.client.api.ClientService; +import pro.gravit.launcher.client.api.ConfigService; +import pro.gravit.launcher.client.api.KeyService; import pro.gravit.launcher.config.JsonConfigurable; import pro.gravit.launcher.events.request.AuthRequestEvent; import pro.gravit.launcher.events.request.ProfilesRequestEvent; import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.PlayerProfile; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; import pro.gravit.launcher.request.Request; @@ -21,7 +19,6 @@ import pro.gravit.launcher.request.websockets.StdWebSocketService; import pro.gravit.launcher.server.authlib.InstallAuthlib; import pro.gravit.launcher.server.setup.ServerWrapperSetup; -import pro.gravit.utils.PublicURLClassLoader; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java index bb19fc5f..3c20fe6b 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java @@ -1,7 +1,7 @@ package pro.gravit.launcher.server; import com.google.gson.GsonBuilder; -import pro.gravit.launcher.managers.GsonManager; +import pro.gravit.launcher.core.managers.GsonManager; import pro.gravit.launcher.request.websockets.ClientWebSocketService; public class ServerWrapperGsonManager extends GsonManager { diff --git a/modules b/modules index 7581b6c0..7f4eb168 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 7581b6c01470a5ec32ac67170635d10f6f589b0a +Subproject commit 7f4eb1684725565d161beeeda093f5964ab550ca From dfbb6e507ae348fa183a9e5d30c1bab121382628 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 23 Dec 2023 12:18:10 +0700 Subject: [PATCH 04/73] [REFACTOR] Using Java 17 --- LauncherAPI/build.gradle | 23 +- LauncherClient/build.gradle | 4 +- LauncherCore/build.gradle | 22 +- .../pro/gravit/utils/helper/JVMHelper.java | 29 +- .../pro/gravit/utils/launch/ModuleHacks.java | 0 .../pro/gravit/utils/launch/ModuleLaunch.java | 316 ++++++++++++++++- .../pro/gravit/utils/helper/JVMHelper.java | 213 ------------ .../pro/gravit/utils/launch/ModuleLaunch.java | 323 ------------------ LauncherStart/build.gradle | 4 +- ServerWrapper/build.gradle | 24 +- 10 files changed, 324 insertions(+), 634 deletions(-) rename LauncherCore/src/main/{java11 => java}/pro/gravit/utils/launch/ModuleHacks.java (100%) delete mode 100644 LauncherCore/src/main/java11/pro/gravit/utils/helper/JVMHelper.java delete mode 100644 LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index 8a418fc6..d50a567e 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -1,5 +1,5 @@ -sourceCompatibility = '1.8' -targetCompatibility = '1.8' +sourceCompatibility = '17' +targetCompatibility = '17' dependencies { api project(':LauncherCore') @@ -14,29 +14,10 @@ api project(':LauncherCore') } } -sourceSets { - java11 { - java { - srcDirs = ['src/main/java11'] - } - dependencies { - java11Implementation files(sourceSets.main.output.classesDirs) { builtBy compileJava } - } - } -} - jar { - into('META-INF/versions/11') { - from sourceSets.java11.output - } archiveClassifier.set('clean') } -compileJava11Java { - sourceCompatibility = 11 - targetCompatibility = 11 -} - tasks.register('sourcesJar', Jar) { from sourceSets.main.allJava archiveClassifier.set('sources') diff --git a/LauncherClient/build.gradle b/LauncherClient/build.gradle index 5c62ac48..9a59ce29 100644 --- a/LauncherClient/build.gradle +++ b/LauncherClient/build.gradle @@ -8,8 +8,8 @@ url "https://repo.spring.io/plugins-release/" } } -sourceCompatibility = '1.8' -targetCompatibility = '1.8' +sourceCompatibility = '17' +targetCompatibility = '17' jar { archiveClassifier.set('clean') diff --git a/LauncherCore/build.gradle b/LauncherCore/build.gradle index 86420ba1..efd55c0a 100644 --- a/LauncherCore/build.gradle +++ b/LauncherCore/build.gradle @@ -1,5 +1,5 @@ -sourceCompatibility = '1.8' -targetCompatibility = '1.8' +sourceCompatibility = '17' +targetCompatibility = '17' dependencies { compileOnly group: 'org.fusesource.jansi', name: 'jansi', version: rootProject['verJansi'] @@ -21,28 +21,10 @@ events "passed", "skipped", "failed" } } -sourceSets { - java11 { - java { - srcDirs = ['src/main/java11'] - } - dependencies { - java11Implementation group: 'com.google.code.gson', name: 'gson', version: rootProject['verGson'] - java11Implementation files(sourceSets.main.output.classesDirs) { builtBy compileJava } - } - } -} jar { - into('META-INF/versions/11') { - from sourceSets.java11.output - } archiveClassifier.set('clean') manifest.attributes("Multi-Release": "true") } -compileJava11Java { - sourceCompatibility = 11 - targetCompatibility = 11 -} tasks.register('sourcesJar', Jar) { from sourceSets.main.allJava diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java index e691aacb..d2779207 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java @@ -53,35 +53,12 @@ public static ARCH getArch(String arch) { } public static int getVersion() { - String version = System.getProperty("java.version"); - if (version.startsWith("1.")) { - version = version.substring(2, 3); - } else { - int dot = version.indexOf("."); - if (dot != -1) { - version = version.substring(0, dot); - } - } - return Integer.parseInt(version); + //System.out.println("[DEBUG] JVMHelper 11 version"); + return Runtime.version().feature(); } public static int getBuild() { - String version = System.getProperty("java.version"); - int dot; - if (version.startsWith("1.")) { - dot = version.indexOf("_"); - } else { - dot = version.lastIndexOf("."); - } - if (dot != -1) { - version = version.substring(dot + 1); - } - try { - return Integer.parseInt(version); - } catch (NumberFormatException exception) { - return 0; - } - + return Runtime.version().update(); } public static String getNativeExtension(JVMHelper.OS OS_TYPE) { diff --git a/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleHacks.java b/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleHacks.java similarity index 100% rename from LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleHacks.java rename to LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleHacks.java diff --git a/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java b/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java index 0301ad02..ab4d829d 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java @@ -1,17 +1,323 @@ package pro.gravit.utils.launch; +import pro.gravit.utils.helper.HackHelper; +import pro.gravit.utils.helper.IOHelper; +import pro.gravit.utils.helper.JVMHelper; +import pro.gravit.utils.helper.LogHelper; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.lang.module.Configuration; +import java.lang.module.ModuleFinder; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URL; +import java.net.URLClassLoader; import java.nio.file.Path; -import java.util.Collection; -import java.util.List; +import java.nio.file.Paths; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; public class ModuleLaunch implements Launch { + private ModuleClassLoader moduleClassLoader; + private Configuration configuration; + private ModuleLayer.Controller controller; + private ModuleFinder moduleFinder; + private ModuleLayer layer; + private MethodHandles.Lookup hackLookup; + private boolean disablePackageDelegateSupport; @Override public ClassLoaderControl init(List files, String nativePath, LaunchOptions options) { - throw new UnsupportedOperationException("Please use Multi-Release JAR"); + this.disablePackageDelegateSupport = options.disablePackageDelegateSupport; + moduleClassLoader = new ModuleClassLoader(files.stream().map((e) -> { + try { + return e.toUri().toURL(); + } catch (MalformedURLException ex) { + throw new RuntimeException(ex); + } + }).toArray(URL[]::new), ClassLoader.getPlatformClassLoader()); + moduleClassLoader.nativePath = nativePath; + { + if(options.enableHacks) { + hackLookup = HackHelper.createHackLookup(ModuleLaunch.class); + } + if(options.moduleConf != null) { + // Create Module Layer + moduleFinder = ModuleFinder.of(options.moduleConf.modulePath.stream().map(Paths::get).map(Path::toAbsolutePath).toArray(Path[]::new)); + ModuleLayer bootLayer = ModuleLayer.boot(); + if(options.moduleConf.modules.contains("ALL-MODULE-PATH")) { + var set = moduleFinder.findAll(); + if(LogHelper.isDevEnabled()) { + for(var m : set) { + LogHelper.dev("Found module %s in %s", m.descriptor().name(), m.location().map(URI::toString).orElse("unknown")); + } + LogHelper.dev("Found %d modules", set.size()); + } + for(var m : set) { + options.moduleConf.modules.add(m.descriptor().name()); + } + options.moduleConf.modules.remove("ALL-MODULE-PATH"); + } + configuration = bootLayer.configuration() + .resolveAndBind(moduleFinder, ModuleFinder.of(), options.moduleConf.modules); + controller = ModuleLayer.defineModulesWithOneLoader(configuration, List.of(bootLayer), moduleClassLoader); + layer = controller.layer(); + // Configure exports / opens + for(var e : options.moduleConf.exports.entrySet()) { + String[] split = e.getKey().split("/"); + String moduleName = split[0]; + String pkg = split[1]; + LogHelper.dev("Export module: %s package: %s to %s", moduleName, pkg, e.getValue()); + Module source = layer.findModule(split[0]).orElse(null); + if(source == null) { + throw new RuntimeException(String.format("Module %s not found", moduleName)); + } + Module target = layer.findModule(e.getValue()).orElse(null); + if(target == null) { + throw new RuntimeException(String.format("Module %s not found", e.getValue())); + } + if(options.enableHacks && source.getLayer() != layer) { + ModuleHacks.createController(hackLookup, source.getLayer()).addExports(source, pkg, target); + } else { + controller.addExports(source, pkg, target); + } + } + for(var e : options.moduleConf.opens.entrySet()) { + String[] split = e.getKey().split("/"); + String moduleName = split[0]; + String pkg = split[1]; + LogHelper.dev("Open module: %s package: %s to %s", moduleName, pkg, e.getValue()); + Module source = layer.findModule(split[0]).orElse(null); + if(source == null) { + throw new RuntimeException(String.format("Module %s not found", moduleName)); + } + Module target = layer.findModule(e.getValue()).orElse(null); + if(target == null) { + throw new RuntimeException(String.format("Module %s not found", e.getValue())); + } + if(options.enableHacks && source.getLayer() != layer) { + ModuleHacks.createController(hackLookup, source.getLayer()).addOpens(source, pkg, target); + } else { + controller.addOpens(source, pkg, target); + } + } + for(var e : options.moduleConf.reads.entrySet()) { + LogHelper.dev("Read module %s to %s", e.getKey(), e.getValue()); + Module source = layer.findModule(e.getKey()).orElse(null); + if(source == null) { + throw new RuntimeException(String.format("Module %s not found", e.getKey())); + } + Module target = layer.findModule(e.getValue()).orElse(null); + if(target == null) { + throw new RuntimeException(String.format("Module %s not found", e.getValue())); + } + if(options.enableHacks && source.getLayer() != layer) { + ModuleHacks.createController(hackLookup, source.getLayer()).addReads(source, target); + } else { + controller.addReads(source, target); + } + } + moduleClassLoader.initializeWithLayer(layer); + } + } + return moduleClassLoader.makeControl(); } @Override - public void launch(String mainClass, String mainModule, Collection args) throws Throwable { - throw new UnsupportedOperationException("Please use Multi-Release JAR"); + public void launch(String mainClass, String mainModuleName, Collection args) throws Throwable { + Thread.currentThread().setContextClassLoader(moduleClassLoader); + if(mainModuleName == null) { + Class mainClazz = Class.forName(mainClass, true, moduleClassLoader); + MethodHandle mainMethod = MethodHandles.lookup().findStatic(mainClazz, "main", MethodType.methodType(void.class, String[].class)).asFixedArity(); + JVMHelper.fullGC(); + mainMethod.asFixedArity().invokeWithArguments((Object) args.toArray(new String[0])); + return; + } + Module mainModule = layer.findModule(mainModuleName).orElseThrow(); + Module unnamed = ModuleLaunch.class.getClassLoader().getUnnamedModule(); + if(unnamed != null) { + controller.addOpens(mainModule, getPackageFromClass(mainClass), unnamed); + } + // Start main class + ClassLoader loader = mainModule.getClassLoader(); + Class mainClazz = Class.forName(mainClass, true, loader); + MethodHandle mainMethod = MethodHandles.lookup().findStatic(mainClazz, "main", MethodType.methodType(void.class, String[].class)); + mainMethod.asFixedArity().invokeWithArguments((Object) args.toArray(new String[0])); + } + + private static String getPackageFromClass(String clazz) { + int index = clazz.lastIndexOf("."); + if(index >= 0) { + return clazz.substring(0, index); + } + return clazz; + } + + private class ModuleClassLoader extends URLClassLoader { + private final ClassLoader SYSTEM_CLASS_LOADER = ClassLoader.getSystemClassLoader(); + private final List transformers = new ArrayList<>(); + private final Map> classMap = new ConcurrentHashMap<>(); + private final Map packageToModule = new HashMap<>(); + private String nativePath; + + private final List packages = new ArrayList<>(); + public ModuleClassLoader(URL[] urls, ClassLoader parent) { + super("LAUNCHER", urls, parent); + packages.add("pro.gravit.launcher."); + packages.add("pro.gravit.utils."); + } + + private void initializeWithLayer(ModuleLayer layer) { + for(var m : layer.modules()) { + for(var p : m.getPackages()) { + packageToModule.put(p, m); + } + } + } + + @Override + protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { + if(name != null && !disablePackageDelegateSupport) { + for(String pkg : packages) { + if(name.startsWith(pkg)) { + return SYSTEM_CLASS_LOADER.loadClass(name); + } + } + } + return super.loadClass(name, resolve); + } + + @Override + protected Class findClass(String name) throws ClassNotFoundException { + var clazz = findClass(null, name); + if(clazz == null) { + throw new ClassNotFoundException(name); + } + return clazz; + } + + @Override + protected Class findClass(String moduleName, String name) { + Class clazz; + { + clazz = classMap.get(name); + if(clazz != null) { + return clazz; + } + } + if(name != null && !transformers.isEmpty()) { + boolean needTransform = false; + for(ClassLoaderControl.ClassTransformer t : transformers) { + if(t.filter(moduleName, name)) { + needTransform = true; + break; + } + } + if(needTransform) { + String rawClassName = name.replace(".", "/").concat(".class"); + try(InputStream input = getResourceAsStream(rawClassName)) { + byte[] bytes = IOHelper.read(input); + for(ClassLoaderControl.ClassTransformer t : transformers) { + bytes = t.transform(moduleName, name, null, bytes); + } + clazz = defineClass(name, bytes, 0, bytes.length); + } catch (IOException e) { + return null; + } + } + } + if(clazz == null && layer != null && name != null) { + var pkg = getPackageFromClass(name); + var module = packageToModule.get(pkg); + if(module != null) { + try { + clazz = module.getClassLoader().loadClass(name); + } catch (ClassNotFoundException e) { + return null; + } + } + } + if(clazz == null) { + try { + clazz = super.findClass(name); + } catch (ClassNotFoundException e) { + return null; + } + } + if(clazz != null) { + classMap.put(name, clazz); + return clazz; + } else { + return null; + } + } + + @Override + public String findLibrary(String name) { + return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION); + } + + public void addAllowedPackage(String pkg) { + packages.add(pkg); + } + + private ModuleClassLoaderControl makeControl() { + return new ModuleClassLoaderControl(); + } + + private class ModuleClassLoaderControl implements ClassLoaderControl { + + @Override + public void addLauncherPackage(String prefix) { + addAllowedPackage(prefix); + } + + @Override + public void addTransformer(ClassTransformer transformer) { + transformers.add(transformer); + } + + @Override + public void addURL(URL url) { + ModuleClassLoader.this.addURL(url); + } + + @Override + public void addJar(Path path) { + try { + ModuleClassLoader.this.addURL(path.toUri().toURL()); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + + @Override + public URL[] getURLs() { + return ModuleClassLoader.this.getURLs(); + } + + @Override + public Class getClass(String name) throws ClassNotFoundException { + return Class.forName(name, false, ModuleClassLoader.this); + } + + @Override + public ClassLoader getClassLoader() { + return ModuleClassLoader.this; + } + + @Override + public Object getJava9ModuleController() { + return controller; + } + + @Override + public MethodHandles.Lookup getHackLookup() { + return hackLookup; + } + } } } diff --git a/LauncherCore/src/main/java11/pro/gravit/utils/helper/JVMHelper.java b/LauncherCore/src/main/java11/pro/gravit/utils/helper/JVMHelper.java deleted file mode 100644 index d2779207..00000000 --- a/LauncherCore/src/main/java11/pro/gravit/utils/helper/JVMHelper.java +++ /dev/null @@ -1,213 +0,0 @@ -package pro.gravit.utils.helper; - -import java.io.File; -import java.lang.invoke.MethodHandles; -import java.lang.management.ManagementFactory; -import java.lang.management.OperatingSystemMXBean; -import java.lang.management.RuntimeMXBean; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.cert.X509Certificate; -import java.util.Arrays; -import java.util.Collection; -import java.util.Locale; -import java.util.Map; - -public final class JVMHelper { - - // MXBeans exports - public static final RuntimeMXBean RUNTIME_MXBEAN = ManagementFactory.getRuntimeMXBean(); - public static final OperatingSystemMXBean OPERATING_SYSTEM_MXBEAN = - ManagementFactory.getOperatingSystemMXBean(); - public static final OS OS_TYPE = OS.byName(OPERATING_SYSTEM_MXBEAN.getName()); - public static final int OS_BITS = getCorrectOSArch(); - // System properties - public static final String OS_VERSION = OPERATING_SYSTEM_MXBEAN.getVersion(); - public static final ARCH ARCH_TYPE = getArch(System.getProperty("os.arch")); - public static final String NATIVE_EXTENSION = getNativeExtension(OS_TYPE); - public static final String NATIVE_PREFIX = getNativePrefix(OS_TYPE); - public static final int JVM_BITS = Integer.parseInt(System.getProperty("sun.arch.data.model")); - // Public static fields - public static final Runtime RUNTIME = Runtime.getRuntime(); - public static final ClassLoader LOADER = ClassLoader.getSystemClassLoader(); - public static final int JVM_VERSION = getVersion(); - public static final int JVM_BUILD = getBuild(); - - static { - try { - MethodHandles.publicLookup(); // Just to initialize class - } catch (Throwable exc) { - throw new InternalError(exc); - } - } - - private JVMHelper() { - } - - public static ARCH getArch(String arch) { - if (arch.equals("amd64") || arch.equals("x86-64") || arch.equals("x86_64")) return ARCH.X86_64; - if (arch.equals("i386") || arch.equals("i686") || arch.equals("x86")) return ARCH.X86; - if (arch.startsWith("armv8") || arch.startsWith("aarch64")) return ARCH.ARM64; - if (arch.startsWith("arm") || arch.startsWith("aarch32")) return ARCH.ARM32; - throw new InternalError(String.format("Unsupported arch '%s'", arch)); - } - - public static int getVersion() { - //System.out.println("[DEBUG] JVMHelper 11 version"); - return Runtime.version().feature(); - } - - public static int getBuild() { - return Runtime.version().update(); - } - - public static String getNativeExtension(JVMHelper.OS OS_TYPE) { - switch (OS_TYPE) { - case MUSTDIE: - return ".dll"; - case LINUX: - return ".so"; - case MACOSX: - return ".dylib"; - default: - throw new InternalError(String.format("Unsupported OS TYPE '%s'", OS_TYPE)); - } - } - - public static String getNativePrefix(JVMHelper.OS OS_TYPE) { - switch (OS_TYPE) { - case LINUX: - case MACOSX: - return "lib"; - default: - return ""; - } - } - - public static void appendVars(ProcessBuilder builder, Map vars) { - builder.environment().putAll(vars); - } - - public static Class firstClass(String... names) throws ClassNotFoundException { - for (String name : names) - try { - return Class.forName(name, false, LOADER); - } catch (ClassNotFoundException ignored) { - // Expected - } - throw new ClassNotFoundException(Arrays.toString(names)); - } - - public static void fullGC() { - RUNTIME.gc(); - LogHelper.debug("Used heap: %d MiB", RUNTIME.totalMemory() - RUNTIME.freeMemory() >> 20); - } - - public static String[] getClassPath() { - return System.getProperty("java.class.path").split(File.pathSeparator); - } - - public static URL[] getClassPathURL() { - String[] cp = System.getProperty("java.class.path").split(File.pathSeparator); - URL[] list = new URL[cp.length]; - - for (int i = 0; i < cp.length; i++) { - URL url = null; - try { - url = new URL(cp[i]); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - list[i] = url; - } - return list; - } - - public static X509Certificate[] getCertificates(Class clazz) { - Object[] signers = clazz.getSigners(); - if (signers == null) return null; - return Arrays.stream(signers).filter((c) -> c instanceof X509Certificate).map((c) -> (X509Certificate) c).toArray(X509Certificate[]::new); - } - - public static void checkStackTrace(Class mainClass) { - LogHelper.debug("Testing stacktrace"); - Exception e = new Exception("Testing stacktrace"); - StackTraceElement[] list = e.getStackTrace(); - if (!list[list.length - 1].getClassName().equals(mainClass.getName())) { - throw new SecurityException(String.format("Invalid StackTraceElement: %s", list[list.length - 1].getClassName())); - } - } - - private static int getCorrectOSArch() { - // As always, mustdie must die - if (OS_TYPE == OS.MUSTDIE) - return System.getenv("ProgramFiles(x86)") == null ? 32 : 64; - - // Or trust system property (maybe incorrect) - return System.getProperty("os.arch").contains("64") ? 64 : 32; - } - - public static String getEnvPropertyCaseSensitive(String name) { - return System.getenv().get(name); - } - - public static boolean isJVMMatchesSystemArch() { - return JVM_BITS == OS_BITS; - } - - public static String jvmProperty(String name, String value) { - return String.format("-D%s=%s", name, value); - } - - public static String systemToJvmProperty(String name) { - return String.format("-D%s=%s", name, System.getProperties().getProperty(name)); - } - - public static void addSystemPropertyToArgs(Collection args, String name) { - String property = System.getProperty(name); - if (property != null) - args.add(String.format("-D%s=%s", name, property)); - } - - public static void verifySystemProperties(Class mainClass, boolean requireSystem) { - Locale.setDefault(Locale.US); - // Verify class loader - LogHelper.debug("Verifying class loader"); - if (requireSystem && !mainClass.getClassLoader().equals(LOADER)) - throw new SecurityException("ClassLoader should be system"); - - // Verify system and java architecture - LogHelper.debug("Verifying JVM architecture"); - } - - public enum ARCH { - X86("x86"), X86_64("x86-64"), ARM64("arm64"), ARM32("arm32"); - - public final String name; - - ARCH(String name) { - this.name = name; - } - } - - public enum OS { - MUSTDIE("mustdie"), LINUX("linux"), MACOSX("macosx"); - - public final String name; - - OS(String name) { - this.name = name; - } - - public static OS byName(String name) { - if (name.startsWith("Windows")) - return MUSTDIE; - if (name.startsWith("Linux")) - return LINUX; - if (name.startsWith("Mac OS X")) - return MACOSX; - throw new RuntimeException(String.format("This shit is not yet supported: '%s'", name)); - } - } - -} diff --git a/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java b/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java deleted file mode 100644 index ab4d829d..00000000 --- a/LauncherCore/src/main/java11/pro/gravit/utils/launch/ModuleLaunch.java +++ /dev/null @@ -1,323 +0,0 @@ -package pro.gravit.utils.launch; - -import pro.gravit.utils.helper.HackHelper; -import pro.gravit.utils.helper.IOHelper; -import pro.gravit.utils.helper.JVMHelper; -import pro.gravit.utils.helper.LogHelper; - -import java.io.IOException; -import java.io.InputStream; -import java.lang.invoke.MethodHandle; -import java.lang.invoke.MethodHandles; -import java.lang.invoke.MethodType; -import java.lang.module.Configuration; -import java.lang.module.ModuleFinder; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URL; -import java.net.URLClassLoader; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -public class ModuleLaunch implements Launch { - private ModuleClassLoader moduleClassLoader; - private Configuration configuration; - private ModuleLayer.Controller controller; - private ModuleFinder moduleFinder; - private ModuleLayer layer; - private MethodHandles.Lookup hackLookup; - private boolean disablePackageDelegateSupport; - @Override - public ClassLoaderControl init(List files, String nativePath, LaunchOptions options) { - this.disablePackageDelegateSupport = options.disablePackageDelegateSupport; - moduleClassLoader = new ModuleClassLoader(files.stream().map((e) -> { - try { - return e.toUri().toURL(); - } catch (MalformedURLException ex) { - throw new RuntimeException(ex); - } - }).toArray(URL[]::new), ClassLoader.getPlatformClassLoader()); - moduleClassLoader.nativePath = nativePath; - { - if(options.enableHacks) { - hackLookup = HackHelper.createHackLookup(ModuleLaunch.class); - } - if(options.moduleConf != null) { - // Create Module Layer - moduleFinder = ModuleFinder.of(options.moduleConf.modulePath.stream().map(Paths::get).map(Path::toAbsolutePath).toArray(Path[]::new)); - ModuleLayer bootLayer = ModuleLayer.boot(); - if(options.moduleConf.modules.contains("ALL-MODULE-PATH")) { - var set = moduleFinder.findAll(); - if(LogHelper.isDevEnabled()) { - for(var m : set) { - LogHelper.dev("Found module %s in %s", m.descriptor().name(), m.location().map(URI::toString).orElse("unknown")); - } - LogHelper.dev("Found %d modules", set.size()); - } - for(var m : set) { - options.moduleConf.modules.add(m.descriptor().name()); - } - options.moduleConf.modules.remove("ALL-MODULE-PATH"); - } - configuration = bootLayer.configuration() - .resolveAndBind(moduleFinder, ModuleFinder.of(), options.moduleConf.modules); - controller = ModuleLayer.defineModulesWithOneLoader(configuration, List.of(bootLayer), moduleClassLoader); - layer = controller.layer(); - // Configure exports / opens - for(var e : options.moduleConf.exports.entrySet()) { - String[] split = e.getKey().split("/"); - String moduleName = split[0]; - String pkg = split[1]; - LogHelper.dev("Export module: %s package: %s to %s", moduleName, pkg, e.getValue()); - Module source = layer.findModule(split[0]).orElse(null); - if(source == null) { - throw new RuntimeException(String.format("Module %s not found", moduleName)); - } - Module target = layer.findModule(e.getValue()).orElse(null); - if(target == null) { - throw new RuntimeException(String.format("Module %s not found", e.getValue())); - } - if(options.enableHacks && source.getLayer() != layer) { - ModuleHacks.createController(hackLookup, source.getLayer()).addExports(source, pkg, target); - } else { - controller.addExports(source, pkg, target); - } - } - for(var e : options.moduleConf.opens.entrySet()) { - String[] split = e.getKey().split("/"); - String moduleName = split[0]; - String pkg = split[1]; - LogHelper.dev("Open module: %s package: %s to %s", moduleName, pkg, e.getValue()); - Module source = layer.findModule(split[0]).orElse(null); - if(source == null) { - throw new RuntimeException(String.format("Module %s not found", moduleName)); - } - Module target = layer.findModule(e.getValue()).orElse(null); - if(target == null) { - throw new RuntimeException(String.format("Module %s not found", e.getValue())); - } - if(options.enableHacks && source.getLayer() != layer) { - ModuleHacks.createController(hackLookup, source.getLayer()).addOpens(source, pkg, target); - } else { - controller.addOpens(source, pkg, target); - } - } - for(var e : options.moduleConf.reads.entrySet()) { - LogHelper.dev("Read module %s to %s", e.getKey(), e.getValue()); - Module source = layer.findModule(e.getKey()).orElse(null); - if(source == null) { - throw new RuntimeException(String.format("Module %s not found", e.getKey())); - } - Module target = layer.findModule(e.getValue()).orElse(null); - if(target == null) { - throw new RuntimeException(String.format("Module %s not found", e.getValue())); - } - if(options.enableHacks && source.getLayer() != layer) { - ModuleHacks.createController(hackLookup, source.getLayer()).addReads(source, target); - } else { - controller.addReads(source, target); - } - } - moduleClassLoader.initializeWithLayer(layer); - } - } - return moduleClassLoader.makeControl(); - } - - @Override - public void launch(String mainClass, String mainModuleName, Collection args) throws Throwable { - Thread.currentThread().setContextClassLoader(moduleClassLoader); - if(mainModuleName == null) { - Class mainClazz = Class.forName(mainClass, true, moduleClassLoader); - MethodHandle mainMethod = MethodHandles.lookup().findStatic(mainClazz, "main", MethodType.methodType(void.class, String[].class)).asFixedArity(); - JVMHelper.fullGC(); - mainMethod.asFixedArity().invokeWithArguments((Object) args.toArray(new String[0])); - return; - } - Module mainModule = layer.findModule(mainModuleName).orElseThrow(); - Module unnamed = ModuleLaunch.class.getClassLoader().getUnnamedModule(); - if(unnamed != null) { - controller.addOpens(mainModule, getPackageFromClass(mainClass), unnamed); - } - // Start main class - ClassLoader loader = mainModule.getClassLoader(); - Class mainClazz = Class.forName(mainClass, true, loader); - MethodHandle mainMethod = MethodHandles.lookup().findStatic(mainClazz, "main", MethodType.methodType(void.class, String[].class)); - mainMethod.asFixedArity().invokeWithArguments((Object) args.toArray(new String[0])); - } - - private static String getPackageFromClass(String clazz) { - int index = clazz.lastIndexOf("."); - if(index >= 0) { - return clazz.substring(0, index); - } - return clazz; - } - - private class ModuleClassLoader extends URLClassLoader { - private final ClassLoader SYSTEM_CLASS_LOADER = ClassLoader.getSystemClassLoader(); - private final List transformers = new ArrayList<>(); - private final Map> classMap = new ConcurrentHashMap<>(); - private final Map packageToModule = new HashMap<>(); - private String nativePath; - - private final List packages = new ArrayList<>(); - public ModuleClassLoader(URL[] urls, ClassLoader parent) { - super("LAUNCHER", urls, parent); - packages.add("pro.gravit.launcher."); - packages.add("pro.gravit.utils."); - } - - private void initializeWithLayer(ModuleLayer layer) { - for(var m : layer.modules()) { - for(var p : m.getPackages()) { - packageToModule.put(p, m); - } - } - } - - @Override - protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { - if(name != null && !disablePackageDelegateSupport) { - for(String pkg : packages) { - if(name.startsWith(pkg)) { - return SYSTEM_CLASS_LOADER.loadClass(name); - } - } - } - return super.loadClass(name, resolve); - } - - @Override - protected Class findClass(String name) throws ClassNotFoundException { - var clazz = findClass(null, name); - if(clazz == null) { - throw new ClassNotFoundException(name); - } - return clazz; - } - - @Override - protected Class findClass(String moduleName, String name) { - Class clazz; - { - clazz = classMap.get(name); - if(clazz != null) { - return clazz; - } - } - if(name != null && !transformers.isEmpty()) { - boolean needTransform = false; - for(ClassLoaderControl.ClassTransformer t : transformers) { - if(t.filter(moduleName, name)) { - needTransform = true; - break; - } - } - if(needTransform) { - String rawClassName = name.replace(".", "/").concat(".class"); - try(InputStream input = getResourceAsStream(rawClassName)) { - byte[] bytes = IOHelper.read(input); - for(ClassLoaderControl.ClassTransformer t : transformers) { - bytes = t.transform(moduleName, name, null, bytes); - } - clazz = defineClass(name, bytes, 0, bytes.length); - } catch (IOException e) { - return null; - } - } - } - if(clazz == null && layer != null && name != null) { - var pkg = getPackageFromClass(name); - var module = packageToModule.get(pkg); - if(module != null) { - try { - clazz = module.getClassLoader().loadClass(name); - } catch (ClassNotFoundException e) { - return null; - } - } - } - if(clazz == null) { - try { - clazz = super.findClass(name); - } catch (ClassNotFoundException e) { - return null; - } - } - if(clazz != null) { - classMap.put(name, clazz); - return clazz; - } else { - return null; - } - } - - @Override - public String findLibrary(String name) { - return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION); - } - - public void addAllowedPackage(String pkg) { - packages.add(pkg); - } - - private ModuleClassLoaderControl makeControl() { - return new ModuleClassLoaderControl(); - } - - private class ModuleClassLoaderControl implements ClassLoaderControl { - - @Override - public void addLauncherPackage(String prefix) { - addAllowedPackage(prefix); - } - - @Override - public void addTransformer(ClassTransformer transformer) { - transformers.add(transformer); - } - - @Override - public void addURL(URL url) { - ModuleClassLoader.this.addURL(url); - } - - @Override - public void addJar(Path path) { - try { - ModuleClassLoader.this.addURL(path.toUri().toURL()); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - } - - @Override - public URL[] getURLs() { - return ModuleClassLoader.this.getURLs(); - } - - @Override - public Class getClass(String name) throws ClassNotFoundException { - return Class.forName(name, false, ModuleClassLoader.this); - } - - @Override - public ClassLoader getClassLoader() { - return ModuleClassLoader.this; - } - - @Override - public Object getJava9ModuleController() { - return controller; - } - - @Override - public MethodHandles.Lookup getHackLookup() { - return hackLookup; - } - } - } -} diff --git a/LauncherStart/build.gradle b/LauncherStart/build.gradle index bdc73a50..225658f7 100644 --- a/LauncherStart/build.gradle +++ b/LauncherStart/build.gradle @@ -8,8 +8,8 @@ url "https://repo.spring.io/plugins-release/" } } -sourceCompatibility = '1.8' -targetCompatibility = '1.8' +sourceCompatibility = '17' +targetCompatibility = '17' jar { archiveClassifier.set('clean') diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index 66520bef..9937f08f 100644 --- a/ServerWrapper/build.gradle +++ b/ServerWrapper/build.gradle @@ -14,30 +14,10 @@ } } -sourceSets { - java11 { - java { - srcDirs = ['src/main/java11'] - } - dependencies { - java11Implementation project(':LauncherAPI') - java11Implementation files(sourceSets.main.output.classesDirs) { builtBy compileJava } - } - } -} - -sourceCompatibility = '1.8' -targetCompatibility = '1.8' - -compileJava11Java { - sourceCompatibility = 11 - targetCompatibility = 11 -} +sourceCompatibility = '17' +targetCompatibility = '17' jar { - into('META-INF/versions/11') { - from sourceSets.java11.output - } archiveClassifier.set('clean') manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, From e6516a89911d0d6ec90706d5551db7ec4ac53c86 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 23 Dec 2023 12:25:11 +0700 Subject: [PATCH 05/73] [REFACTOR] IDEA mini refactor --- .../launchserver/LaunchServerStarter.java | 3 --- .../pro/gravit/launchserver/StarterAgent.java | 6 ----- .../launchserver/auth/AuthProviderPair.java | 8 +++--- .../auth/core/MySQLCoreProvider.java | 2 +- .../AuthSupportExtendedCheckServer.java | 1 - .../auth/protect/StdProtectHandler.java | 2 +- .../launchserver/binary/BinaryPipeline.java | 2 -- .../binary/tasks/exe/Launch4JTask.java | 1 - .../command/hash/SaveProfilesCommand.java | 2 +- .../config/LaunchServerConfig.java | 2 +- .../gravit/launchserver/socket/Client.java | 1 - .../launchserver/FeatureCollectionTest.java | 2 -- .../runtime/client/ClientLauncherProcess.java | 8 +++--- .../client/runtime/utils/HWIDProvider.java | 4 +-- .../pro/gravit/launcher/LauncherConfig.java | 4 +-- .../pro/gravit/launcher/request/Request.java | 4 +-- .../websockets/StdWebSocketService.java | 3 +-- .../websockets/WebSocketClientHandler.java | 6 ++--- .../client/BasicLauncherEventHandler.java | 3 +-- .../client/api/CertificateService.java | 22 ++++++--------- .../runtime/client/ClientModuleManager.java | 2 +- .../launcher/core/hasher/HashedDir.java | 15 ++++------- .../launcher/core/serialize/HInput.java | 13 ++++----- .../pro/gravit/utils/helper/CommonHelper.java | 2 +- .../pro/gravit/utils/helper/FormatHelper.java | 17 +++++------- .../pro/gravit/utils/helper/HackHelper.java | 2 -- .../pro/gravit/utils/helper/IOHelper.java | 26 +++++------------- .../pro/gravit/utils/helper/JVMHelper.java | 27 +++++++------------ .../pro/gravit/utils/helper/JavaHelper.java | 12 ++------- .../gravit/launcher/modern/Downloader.java | 8 ++---- .../launcher/start/RuntimeModuleManager.java | 2 +- .../gravit/launcher/server/ServerWrapper.java | 7 +++-- .../server/authlib/InstallAuthlib.java | 4 +-- 33 files changed, 75 insertions(+), 148 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java index 57d87cf3..e7b93168 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java @@ -28,15 +28,12 @@ import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; -import pro.gravit.utils.launch.LaunchOptions; -import pro.gravit.utils.launch.ModuleLaunch; import java.io.*; import java.nio.file.Files; import java.nio.file.Path; import java.security.Security; import java.security.cert.CertificateException; -import java.util.ArrayList; import java.util.List; public class LaunchServerStarter { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java index 2809eac6..484d754e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/StarterAgent.java @@ -1,13 +1,7 @@ package pro.gravit.launchserver; -import java.io.IOException; import java.lang.instrument.Instrumentation; import java.nio.file.*; -import java.nio.file.attribute.BasicFileAttributes; -import java.nio.file.attribute.PosixFileAttributeView; -import java.nio.file.attribute.PosixFilePermission; -import java.util.*; -import java.util.jar.JarFile; public final class StarterAgent { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java index 9645fa01..72c198f2 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java @@ -57,7 +57,7 @@ public static void getFeatures(Class clazz, Set list) { } } - public final T isSupport(Class clazz) { + public T isSupport(Class clazz) { if (core == null) return null; T result = core.isSupport(clazz); if (result == null && mixes != null) { @@ -71,7 +71,7 @@ public final T isSupport(Class clazz) { return result; } - public final void init(LaunchServer srv, String name) { + public void init(LaunchServer srv, String name) { this.name = name; if (links != null) link(srv); core.init(srv); @@ -85,7 +85,7 @@ public final void init(LaunchServer srv, String name) { } } - public final void link(LaunchServer srv) { + public void link(LaunchServer srv) { links.forEach((k, v) -> { AuthProviderPair pair = srv.config.getAuthProviderPair(v); if (pair == null) { @@ -99,7 +99,7 @@ public final void link(LaunchServer srv) { }); } - public final void close() throws IOException { + public void close() throws IOException { core.close(); if (textureProvider != null) { textureProvider.close(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java index ce093a2e..c5ed101a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java @@ -332,7 +332,7 @@ public String toString() { } } - public class MySQLUser extends SQLUser { + public static class MySQLUser extends SQLUser { protected long hwidId; public MySQLUser(UUID uuid, String username, String accessToken, String serverId, String password, ClientPermissions permissions, long hwidId) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExtendedCheckServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExtendedCheckServer.java index fb188782..a0eb8365 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExtendedCheckServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExtendedCheckServer.java @@ -1,6 +1,5 @@ package pro.gravit.launchserver.auth.core.interfaces.provider; -import pro.gravit.launchserver.auth.core.User; import pro.gravit.launchserver.auth.core.UserSession; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java index 1b34b7ac..1188dcab 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java @@ -22,7 +22,7 @@ public boolean allowGetAccessToken(AuthResponse.AuthContext context) { @Override public void init(LaunchServer server) { - if (profileWhitelist != null && profileWhitelist.size() > 0) { + if (profileWhitelist != null && !profileWhitelist.isEmpty()) { logger.warn("profileWhitelist deprecated. Please use permission 'launchserver.profile.PROFILE_UUID.show' and 'launchserver.profile.PROFILE_UUID.enter'"); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java index dec8e0e2..86fbf9c3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BinaryPipeline.java @@ -7,12 +7,10 @@ import pro.gravit.utils.helper.IOHelper; import java.io.IOException; -import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; import java.util.Optional; -import java.util.concurrent.atomic.AtomicLong; import java.util.function.Predicate; import java.util.stream.Collectors; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java index 51197ee1..f9390719 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java @@ -5,7 +5,6 @@ import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.binary.tasks.LauncherBuildTask; import pro.gravit.utils.Version; -import pro.gravit.utils.helper.IOHelper; import java.io.IOException; import java.nio.file.Path; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java index 151011ba..c4609883 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java @@ -24,7 +24,7 @@ public SaveProfilesCommand(LaunchServer server) { public static void saveProfile(ClientProfile profile, Path path) throws IOException { if (profile.getUUID() == null) profile.setUUID(UUID.randomUUID()); - if (profile.getServers().size() == 0) { + if (profile.getServers().isEmpty()) { ClientProfile.ServerProfile serverProfile = new ClientProfile.ServerProfile(); serverProfile.isDefault = true; serverProfile.name = profile.getTitle(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 502889f8..8f01b866 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -142,7 +142,7 @@ public void setEnv(LauncherConfig.LauncherEnvironment env) { } public void verify() { - if (auth == null || auth.size() < 1) { + if (auth == null || auth.isEmpty()) { throw new NullPointerException("AuthProviderPair`s count should be at least one"); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java index 3853bf93..32b4fdf4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java @@ -2,7 +2,6 @@ import pro.gravit.launcher.ClientPermissions; import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.secure.HardwareReportRequest; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.interfaces.UserHardware; diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/FeatureCollectionTest.java b/LaunchServer/src/test/java/pro/gravit/launchserver/FeatureCollectionTest.java index f222f818..670d95a2 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/FeatureCollectionTest.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/FeatureCollectionTest.java @@ -5,8 +5,6 @@ import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.Feature; -import java.util.List; - public class FeatureCollectionTest { public static class TestClass1 implements TextInterface1 { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java index 3942d933..29239476 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java @@ -197,18 +197,18 @@ private void applyJava9Params(List processArgs) { StringBuilder modulesPath = new StringBuilder(); StringBuilder modulesAdd = new StringBuilder(); for (String moduleName : jvmModules) { - if (modulesAdd.length() > 0) modulesAdd.append(","); + if (!modulesAdd.isEmpty()) modulesAdd.append(","); modulesAdd.append(moduleName); } for (String modulePath : jvmModulesPaths) { - if (modulesPath.length() > 0) modulesPath.append(File.pathSeparator); + if (!modulesPath.isEmpty()) modulesPath.append(File.pathSeparator); modulesPath.append(modulePath); } - if (modulesAdd.length() > 0) { + if (!modulesAdd.isEmpty()) { processArgs.add("--add-modules"); processArgs.add(modulesAdd.toString()); } - if (modulesPath.length() > 0) { + if (!modulesPath.isEmpty()) { processArgs.add("--module-path"); processArgs.add(modulesPath.toString()); } diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java index 31e7b261..4e1c8d4c 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java @@ -41,7 +41,7 @@ public int getProcessorLogicalCount() { public boolean isBattery() { List powerSources = hardware.getPowerSources(); - return powerSources != null && powerSources.size() != 0; + return powerSources != null && !powerSources.isEmpty(); } //Hardware Information @@ -93,7 +93,7 @@ public long getGraphicCardMemory() { public byte[] getDisplayID() { List displays = hardware.getDisplays(); - if (displays == null || displays.size() == 0) return null; + if (displays == null || displays.isEmpty()) return null; for (Display display : displays) { return display.getEdid(); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java b/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java index 19e26ccd..4b923236 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java @@ -96,7 +96,7 @@ public LauncherConfig(String address, ECPublicKey ecdsaPublicKey, RSAPublicKey r this.address = address; this.ecdsaPublicKey = ecdsaPublicKey; this.rsaPublicKey = rsaPublicKey; - this.runtime = Collections.unmodifiableMap(new HashMap<>(runtime)); + this.runtime = Map.copyOf(runtime); this.projectName = projectName; this.clientPort = 32148; environment = LauncherEnvironment.STD; @@ -109,7 +109,7 @@ public LauncherConfig(String address, ECPublicKey ecdsaPublicKey, RSAPublicKey r public LauncherConfig(String address, Map runtime, String projectName, LauncherEnvironment env, LauncherTrustManager trustManager) { this.address = address; - this.runtime = Collections.unmodifiableMap(new HashMap<>(runtime)); + this.runtime = Map.copyOf(runtime); this.projectName = projectName; this.clientPort = 32148; this.trustManager = trustManager; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java index 991a638d..593e309b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java @@ -203,12 +203,12 @@ public static synchronized RequestRestoreReport restore(boolean needUserInfo, bo } RestoreRequestEvent event = request.request(); List invalidTokens = null; - if (event.invalidTokens != null && event.invalidTokens.size() > 0) { + if (event.invalidTokens != null && !event.invalidTokens.isEmpty()) { Map tokens = makeNewTokens(event.invalidTokens); if (!tokens.isEmpty()) { request = new RestoreRequest(authId, null, tokens, false); event = request.request(); - if (event.invalidTokens != null && event.invalidTokens.size() > 0) { + if (event.invalidTokens != null && !event.invalidTokens.isEmpty()) { LogHelper.warning("Tokens %s not restored", String.join(",", event.invalidTokens)); } } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java index 1ee786f8..c4946129 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java @@ -72,8 +72,7 @@ public void processEventHandlers(T event) { @SuppressWarnings({"unchecked"}) public void eventHandle(T webSocketEvent) { - if (webSocketEvent instanceof RequestEvent) { - RequestEvent event = (RequestEvent) webSocketEvent; + if (webSocketEvent instanceof RequestEvent event) { if (event.requestUUID == null) { LogHelper.warning("Request event type %s.requestUUID is null", event.getType() == null ? "null" : event.getType()); return; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java index 1fa99c11..99739729 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java @@ -51,15 +51,13 @@ protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Except return; } - if (msg instanceof FullHttpResponse) { - final FullHttpResponse response = (FullHttpResponse) msg; + if (msg instanceof FullHttpResponse response) { throw new Exception("Unexpected FullHttpResponse (getStatus=" + response.status() + ", content=" + response.content().toString(CharsetUtil.UTF_8) + ')'); } final WebSocketFrame frame = (WebSocketFrame) msg; - if (frame instanceof TextWebSocketFrame) { - final TextWebSocketFrame textFrame = (TextWebSocketFrame) frame; + if (frame instanceof TextWebSocketFrame textFrame) { if (LogHelper.isDevEnabled()) { LogHelper.dev("Message: %s", textFrame.text()); } diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java index aea92c9d..8b36651f 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java @@ -28,8 +28,7 @@ public boolean eventHandle(T event) { if (token != null) { Request.addExtendedToken(event1.getExtendedTokenName(), new Request.ExtendedToken(event1.getExtendedToken(), event1.getExtendedTokenExpire())); } - } else if (event instanceof NotificationEvent) { - NotificationEvent n = (NotificationEvent) event; + } else if (event instanceof NotificationEvent n) { if (DialogService.isNotificationsAvailable()) { DialogService.createNotification(n.icon, n.head, n.message); } diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java index 1bfbe960..222c8de6 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java @@ -78,20 +78,14 @@ private static CheckClassResultApi fromCheckClassResult(LauncherTrustManager.Che private static CheckClassResultTypeApi fromType(LauncherTrustManager.CheckClassResultType type) { if (type == null) return null; - switch (type) { - case NOT_SIGNED: - return CheckClassResultTypeApi.NOT_SIGNED; - case SUCCESS: - return CheckClassResultTypeApi.SUCCESS; - case UNTRUSTED: - return CheckClassResultTypeApi.UNTRUSTED; - case UNVERIFED: - return CheckClassResultTypeApi.UNVERIFED; - case UNCOMPAT: - return CheckClassResultTypeApi.UNCOMPAT; - default: - return CheckClassResultTypeApi.UNKNOWN; - } + return switch (type) { + case NOT_SIGNED -> CheckClassResultTypeApi.NOT_SIGNED; + case SUCCESS -> CheckClassResultTypeApi.SUCCESS; + case UNTRUSTED -> CheckClassResultTypeApi.UNTRUSTED; + case UNVERIFED -> CheckClassResultTypeApi.UNVERIFED; + case UNCOMPAT -> CheckClassResultTypeApi.UNCOMPAT; + default -> CheckClassResultTypeApi.UNKNOWN; + }; } } } diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java index 046cbc33..e89b8af5 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java @@ -34,7 +34,7 @@ public List getModules() { } @Override - public final boolean verifyClassCheckResult(LauncherTrustManager.CheckClassResult result) { + public boolean verifyClassCheckResult(LauncherTrustManager.CheckClassResult result) { return result.type == LauncherTrustManager.CheckClassResultType.SUCCESS; } } diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java index 14ed4211..232e98ce 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java @@ -30,16 +30,11 @@ public HashedDir(HInput input) throws IOException { // Read entry HashedEntry entry; Type type = Type.read(input); - switch (type) { - case FILE: - entry = new HashedFile(input); - break; - case DIR: - entry = new HashedDir(input); - break; - default: - throw new AssertionError("Unsupported hashed entry type: " + type.name()); - } + entry = switch (type) { + case FILE -> new HashedFile(input); + case DIR -> new HashedDir(input); + default -> throw new AssertionError("Unsupported hashed entry type: " + type.name()); + }; // Try add entry to map VerifyHelper.putIfAbsent(map, name, entry, String.format("Duplicate dir entry: '%s'", name)); diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HInput.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HInput.java index 9ee4e103..5b8161a7 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HInput.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/serialize/HInput.java @@ -42,14 +42,11 @@ public BigInteger readBigInteger(int maxBytes) throws IOException { public boolean readBoolean() throws IOException { int b = readUnsignedByte(); - switch (b) { - case 0b0: - return false; - case 0b1: - return true; - default: - throw new IOException("Invalid boolean state: " + b); - } + return switch (b) { + case 0b0 -> false; + case 0b1 -> true; + default -> throw new IOException("Invalid boolean state: " + b); + }; } diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java index ccaeb8ea..1d5d7ac9 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java @@ -73,7 +73,7 @@ public static String[] parseCommand(CharSequence line) throws CommandException { throw new CommandException("Quotes wasn't closed"); // Empty args are ignored (except if was quoted) - if (wasQuoted || builder.length() > 0) + if (wasQuoted || !builder.isEmpty()) result.add(builder.toString()); // Reset file builder diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/FormatHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/FormatHelper.java index 9043f27d..a69e0f73 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/FormatHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/FormatHelper.java @@ -14,17 +14,12 @@ public class FormatHelper { public static Ansi rawAnsiFormat(LogHelper.Level level, String dateTime, boolean sub) { Ansi.Color levelColor; boolean bright = level != LogHelper.Level.DEBUG; - switch (level) { - case WARNING: - levelColor = Ansi.Color.YELLOW; - break; - case ERROR: - levelColor = Ansi.Color.RED; - break; - default: // INFO, DEBUG, Unknown - levelColor = Ansi.Color.WHITE; - break; - } + levelColor = switch (level) { + case WARNING -> Ansi.Color.YELLOW; + case ERROR -> Ansi.Color.RED; + default -> // INFO, DEBUG, Unknown + Ansi.Color.WHITE; + }; // Date-time Ansi ansi = new Ansi(); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/HackHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/HackHelper.java index 8be8d890..21acd3d4 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/HackHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/HackHelper.java @@ -3,8 +3,6 @@ import java.lang.invoke.MethodHandles; import java.lang.reflect.Constructor; import java.lang.reflect.Field; -import java.util.Arrays; -import java.util.function.Consumer; public class HackHelper { private static native MethodHandles.Lookup createHackLookupNative(Class lookupClass); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java index 4151dc98..0c8425de 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java @@ -138,17 +138,13 @@ public static String getIP(SocketAddress address) { } public static Path getRoot() { - switch (JVMHelper.OS_TYPE) { - case MUSTDIE: { + return switch (JVMHelper.OS_TYPE) { + case MUSTDIE -> { String drive = System.getenv("SystemDrive").concat("\\"); - return Paths.get(drive); + yield Paths.get(drive); } - case LINUX: - case MACOSX: { - return Paths.get("/"); - } - } - throw new UnsupportedOperationException(); + case LINUX, MACOSX -> Paths.get("/"); + }; } public static byte[] getResourceBytes(String name) throws IOException { @@ -545,19 +541,11 @@ public static void transfer(Path file, OutputStream output) throws IOException { } public static String urlDecode(String s) { - try { - return URLDecoder.decode(s, UNICODE_CHARSET.name()); - } catch (UnsupportedEncodingException e) { - throw new InternalError(e); - } + return URLDecoder.decode(s, UNICODE_CHARSET); } public static String urlEncode(String s) { - try { - return URLEncoder.encode(s, UNICODE_CHARSET.name()); - } catch (UnsupportedEncodingException e) { - throw new InternalError(e); - } + return URLEncoder.encode(s, UNICODE_CHARSET); } public static String verifyFileName(String fileName) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java index d2779207..a7cdb354 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java @@ -62,26 +62,19 @@ public static int getBuild() { } public static String getNativeExtension(JVMHelper.OS OS_TYPE) { - switch (OS_TYPE) { - case MUSTDIE: - return ".dll"; - case LINUX: - return ".so"; - case MACOSX: - return ".dylib"; - default: - throw new InternalError(String.format("Unsupported OS TYPE '%s'", OS_TYPE)); - } + return switch (OS_TYPE) { + case MUSTDIE -> ".dll"; + case LINUX -> ".so"; + case MACOSX -> ".dylib"; + default -> throw new InternalError(String.format("Unsupported OS TYPE '%s'", OS_TYPE)); + }; } public static String getNativePrefix(JVMHelper.OS OS_TYPE) { - switch (OS_TYPE) { - case LINUX: - case MACOSX: - return "lib"; - default: - return ""; - } + return switch (OS_TYPE) { + case LINUX, MACOSX -> "lib"; + default -> ""; + }; } public static void appendVars(ProcessBuilder builder, Map vars) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java index a4d1f58f..2bfb54cf 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java @@ -13,15 +13,7 @@ public class JavaHelper { public static final List javaFxModules; static { - List modules = new ArrayList<>(); - modules.add("javafx.base"); - modules.add("javafx.graphics"); - modules.add("javafx.fxml"); - modules.add("javafx.controls"); - modules.add("javafx.swing"); - modules.add("javafx.media"); - modules.add("javafx.web"); - javaFxModules = Collections.unmodifiableList(modules); + javaFxModules = List.of("javafx.base", "javafx.graphics", "javafx.fxml", "javafx.controls", "javafx.swing", "javafx.media", "javafx.web"); } public static Path tryGetOpenJFXPath(Path jvmDir) { @@ -60,7 +52,7 @@ public static boolean tryAddModule(List paths, String moduleName, StringBu if (path == null) continue; Path result = tryFindModule(path, moduleName); if (result != null) { - if (args.length() != 0) args.append(File.pathSeparatorChar); + if (!args.isEmpty()) args.append(File.pathSeparatorChar); args.append(result.toAbsolutePath()); return true; } diff --git a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java b/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java index 9ab8fae7..1d7e052d 100644 --- a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java +++ b/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java @@ -78,9 +78,7 @@ public static Downloader downloadFile(URI uri, Path path, ExecutorService execut downloader.future = downloader.downloadFile(uri, path); if (closeExecutor) { ExecutorService finalExecutor = executor; - downloader.future = downloader.future.thenAccept((e) -> { - finalExecutor.shutdownNow(); - }).exceptionallyCompose((ex) -> { + downloader.future = downloader.future.thenAccept((e) -> finalExecutor.shutdownNow()).exceptionallyCompose((ex) -> { finalExecutor.shutdownNow(); return CompletableFuture.failedFuture(ex); }); @@ -99,9 +97,7 @@ public static Downloader downloadList(List files, String baseURL, Pat downloader.future = downloader.downloadFiles(files, baseURL, targetDir, callback, executor, threads); if (closeExecutor) { ExecutorService finalExecutor = executor; - downloader.future = downloader.future.thenAccept((e) -> { - finalExecutor.shutdownNow(); - }).exceptionallyCompose((ex) -> { + downloader.future = downloader.future.thenAccept((e) -> finalExecutor.shutdownNow()).exceptionallyCompose((ex) -> { finalExecutor.shutdownNow(); return CompletableFuture.failedFuture(ex); }); diff --git a/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java index 597d086b..8f5a350c 100644 --- a/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java +++ b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java @@ -34,7 +34,7 @@ public List getModules() { } @Override - public final boolean verifyClassCheckResult(LauncherTrustManager.CheckClassResult result) { + public boolean verifyClassCheckResult(LauncherTrustManager.CheckClassResult result) { return result.type == LauncherTrustManager.CheckClassResultType.SUCCESS; } diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index 596dfdf2..77faaa45 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -122,8 +122,7 @@ public void run(String... args) throws Throwable { LogHelper.debug("Read ServerWrapperConfig.json"); loadConfig(); updateLauncherConfig(); - if (config.env != null) Launcher.applyLauncherEnv(config.env); - else Launcher.applyLauncherEnv(LauncherConfig.LauncherEnvironment.STD); + Launcher.applyLauncherEnv(Objects.requireNonNullElse(config.env, LauncherConfig.LauncherEnvironment.STD)); StdWebSocketService service = StdWebSocketService.initWebSockets(config.address).get(); service.reconnectCallback = () -> { @@ -153,7 +152,7 @@ public void run(String... args) throws Throwable { KeyService.serverEcPublicKey = SecurityHelper.toPublicECDSAKey(config.encodedServerEcPublicKey); } String classname = (config.mainclass == null || config.mainclass.isEmpty()) ? args[0] : config.mainclass; - if (classname.length() == 0) { + if (classname.isEmpty()) { LogHelper.error("MainClass not found. Please set MainClass for ServerWrapper.json or first commandline argument"); System.exit(-1); } @@ -174,7 +173,7 @@ public void run(String... args) throws Throwable { LogHelper.info("ServerWrapper: LaunchServer address: %s. Title: %s", config.address, Launcher.profile != null ? Launcher.profile.getTitle() : "unknown"); LogHelper.info("Minecraft Version (for profile): %s", wrapper.profile == null ? "unknown" : wrapper.profile.getVersion().toString()); String[] real_args; - if(config.args != null && config.args.size() > 0) { + if(config.args != null && !config.args.isEmpty()) { real_args = config.args.toArray(new String[0]); } else if (args.length > 0) { real_args = new String[args.length - 1]; diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java index aa6fdbef..3cdf6d22 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java @@ -41,10 +41,10 @@ public void run(String... args) throws Exception { } context.workdir = IOHelper.WORKING_DIR; LogHelper.info("Search .jar files in %s", context.workdir.toAbsolutePath()); - IOHelper.walk(context.workdir, new SimpleFileVisitor() { + IOHelper.walk(context.workdir, new SimpleFileVisitor<>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { - if(file.getFileName().toString().endsWith(".jar")) { + if (file.getFileName().toString().endsWith(".jar")) { context.files.add(file); } return FileVisitResult.CONTINUE; From 4607ab88bf983f856b97a48bd0e265d287c6941a Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 23 Dec 2023 12:25:55 +0700 Subject: [PATCH 06/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 7f4eb168..9b1740cc 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 7f4eb1684725565d161beeeda093f5964ab550ca +Subproject commit 9b1740ccc426de8a8ac332545c64afbe9c17f89f From 64635cbb9bf9f384e190d133eec67d4531475f30 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 23 Dec 2023 17:58:09 +0700 Subject: [PATCH 07/73] [REFACTOR] Renaming --- LaunchServer/build.gradle | 1 - .../gravit/launchserver/HttpRequester.java | 2 +- .../pro/gravit/launchserver/LaunchServer.java | 11 +- .../launchserver/LaunchServerStarter.java | 12 +- .../java/pro/gravit/launchserver/Main.java | 26 +++ .../launchserver/auth/AuthException.java | 2 +- .../auth/core/AbstractSQLCoreProvider.java | 6 +- .../auth/core/AuthCoreProvider.java | 12 +- .../auth/core/MemoryAuthCoreProvider.java | 8 +- .../auth/core/MergeAuthCoreProvider.java | 2 +- .../auth/core/MySQLCoreProvider.java | 4 +- .../auth/core/RejectAuthCoreProvider.java | 2 +- .../gravit/launchserver/auth/core/User.java | 2 +- .../auth/core/interfaces/UserHardware.java | 2 +- .../provider/AuthSupportAssetUpload.java | 6 +- .../provider/AuthSupportHardware.java | 2 +- .../provider/AuthSupportRegistration.java | 2 +- .../interfaces/user/UserSupportTextures.java | 4 +- .../auth/mix/UploadAssetMixProvider.java | 2 +- .../auth/password/JsonPasswordVerifier.java | 2 +- .../auth/protect/AdvancedProtectHandler.java | 6 +- .../auth/protect/StdProtectHandler.java | 2 +- .../interfaces/ProfilesProtectHandler.java | 2 +- .../interfaces/SecureProtectHandler.java | 6 +- .../auth/texture/JsonTextureProvider.java | 2 +- .../auth/texture/NullTextureProvider.java | 2 +- .../auth/texture/RequestTextureProvider.java | 4 +- .../auth/texture/TextureProvider.java | 2 +- .../auth/texture/VoidTextureProvider.java | 2 +- .../launchserver/binary/BuildContext.java | 2 +- .../binary/JARLauncherBinary.java | 2 +- .../binary/tasks/MainBuildTask.java | 4 +- .../gravit/launchserver/command/Command.java | 6 +- .../command/hash/DownloadAssetCommand.java | 4 +- .../command/hash/DownloadClientCommand.java | 6 +- .../command/hash/IndexAssetCommand.java | 2 +- .../command/hash/MakeProfileCommand.java | 4 +- .../command/hash/SaveProfilesCommand.java | 4 +- .../command/modules/ModulesCommand.java | 4 +- .../command/service/ComponentCommand.java | 2 +- .../command/service/NotifyCommand.java | 4 +- .../command/service/SecurityCheckCommand.java | 2 +- .../command/service/TokenCommand.java | 2 +- .../config/LaunchServerConfig.java | 4 +- .../launchserver/helper/HttpHelper.java | 4 +- .../helper/MakeProfileHelper.java | 14 +- .../launchermodules/LauncherModuleLoader.java | 2 +- .../launchserver/manangers/AuthManager.java | 12 +- .../manangers}/ConfigManager.java | 4 +- .../manangers/LaunchServerGsonManager.java | 18 +- .../launchserver/manangers/MirrorManager.java | 2 +- .../events/LaunchServerFullInitEvent.java | 2 +- .../modules/events/LaunchServerInitPhase.java | 2 +- .../events/LaunchServerLauncherExeInit.java | 2 +- .../LaunchServerNettyFullInitEvent.java | 2 +- .../events/LaunchServerPostInitPhase.java | 2 +- .../events/LaunchServerProfilesSyncEvent.java | 2 +- .../events/LaunchServerUpdatesSyncEvent.java | 2 +- .../events/NewLaunchServerInstanceEvent.java | 2 +- .../security/SecurityReportModuleEvent.java | 4 +- .../modules/impl/LaunchServerCoreModule.java | 8 +- .../modules/impl/LaunchServerInitContext.java | 2 +- .../impl/LaunchServerModulesManager.java | 4 +- .../gravit/launchserver/socket/Client.java | 4 +- .../launchserver/socket/WebSocketService.java | 10 +- .../socket/handlers/NettyWebAPIHandler.java | 2 +- .../socket/response/SimpleResponse.java | 4 +- .../response/WebSocketServerResponse.java | 2 +- .../response/auth/AdditionalDataResponse.java | 2 +- .../socket/response/auth/AuthResponse.java | 4 +- .../response/auth/CheckServerResponse.java | 2 +- .../response/auth/CurrentUserResponse.java | 2 +- .../socket/response/auth/ExitResponse.java | 4 +- .../auth/FetchClientProfileKeyResponse.java | 2 +- .../auth/GetAvailabilityAuthResponse.java | 2 +- .../response/auth/JoinServerResponse.java | 2 +- .../response/auth/ProfilesResponse.java | 4 +- .../response/auth/RefreshTokenResponse.java | 4 +- .../socket/response/auth/RestoreResponse.java | 6 +- .../response/auth/SetProfileResponse.java | 4 +- .../cabinet/GetAssetUploadInfoResponse.java | 2 +- .../response/management/FeaturesResponse.java | 2 +- .../management/GetPublicKeyResponse.java | 2 +- .../profile/BatchProfileByUsername.java | 4 +- .../profile/ProfileByUUIDResponse.java | 2 +- .../response/profile/ProfileByUsername.java | 4 +- .../secure/GetSecureLevelInfoResponse.java | 2 +- .../secure/HardwareReportResponse.java | 4 +- .../secure/SecurityReportResponse.java | 2 +- .../response/update/LauncherResponse.java | 2 +- .../response/update/UpdateListResponse.java | 2 +- .../response/update/UpdateResponse.java | 2 +- .../gravit/launchserver/defaults/proguard.cfg | 4 +- .../launchserver/ConfigurationTest.java | 2 +- .../launchserver/StartLaunchServerTest.java | 2 +- Launcher/build.gradle | 6 +- .../{client => }/runtime/LauncherEngine.java | 51 +++--- .../runtime/LauncherEngineWrapper.java | 2 +- .../runtime/NewLauncherSettings.java | 4 +- .../runtime/client/ClientLauncherProcess.java | 30 ++-- .../launcher}/runtime/client/DirBridge.java | 4 +- .../runtime/client/RuntimeGsonManager.java | 6 +- .../runtime/client/ServerPinger.java | 6 +- .../runtime/client/UserSettings.java | 2 +- .../client/events/ClientEngineInitPhase.java | 6 +- .../runtime/client/events/ClientGuiPhase.java | 6 +- .../client/events/ClientPreGuiPhase.java | 6 +- .../ClientProcessBuilderCreateEvent.java | 6 +- .../ClientProcessBuilderLaunchedEvent.java | 6 +- ...lientProcessBuilderParamsWrittedEvent.java | 6 +- .../ClientProcessBuilderPreLaunchEvent.java | 6 +- .../runtime/console/GetPublicKeyCommand.java | 4 +- .../runtime/console/ModulesCommand.java | 10 +- .../runtime/console/SignDataCommand.java | 4 +- .../runtime/console/UnlockCommand.java | 6 +- .../test/PrintHardwareInfoCommand.java | 4 +- .../runtime/debug/ClientRuntimeProvider.java | 26 +-- .../debug/DebugLauncherTrustManager.java | 2 +- .../{client => }/runtime/debug/DebugMain.java | 26 +-- .../runtime/gui/NoRuntimeProvider.java | 2 +- .../runtime/gui/RuntimeProvider.java | 2 +- .../runtime/managers/ConsoleManager.java | 12 +- .../runtime/managers/SettingsManager.java | 8 +- .../runtime/utils/HWIDProvider.java | 4 +- .../runtime/utils/LauncherUpdater.java | 8 +- LauncherAPI/build.gradle | 1 - .../{ => base}/ClientPermissions.java | 2 +- .../pro/gravit/launcher/base}/Downloader.java | 2 +- .../gravit/launcher/{ => base}/Launcher.java | 4 +- .../launcher/{ => base}/LauncherConfig.java | 6 +- .../{client => base}/api/AuthService.java | 6 +- .../{client => base}/api/ClientService.java | 2 +- .../{client => base}/api/ConfigService.java | 2 +- .../{client => base}/api/KeyService.java | 2 +- .../{ => base}/config/JsonConfigurable.java | 2 +- .../config/JsonConfigurableInterface.java | 4 +- .../{ => base}/config/SimpleConfig.java | 2 +- .../{ => base}/config/SimpleConfigurable.java | 2 +- .../events/ExtendedTokenRequestEvent.java | 2 +- .../{ => base}/events/NotificationEvent.java | 4 +- .../{ => base}/events/RequestEvent.java | 4 +- .../request/AdditionalDataRequestEvent.java | 4 +- .../request/AssetUploadInfoRequestEvent.java | 4 +- .../events/request/AuthRequestEvent.java | 8 +- .../BatchProfileByUsernameRequestEvent.java | 6 +- .../request/CheckServerRequestEvent.java | 6 +- .../request/CurrentUserRequestEvent.java | 8 +- .../events/request/ErrorRequestEvent.java | 4 +- .../events/request/ExitRequestEvent.java | 4 +- .../events/request/FeaturesRequestEvent.java | 4 +- .../FetchClientProfileKeyRequestEvent.java | 4 +- .../GetAssetUploadUrlRequestEvent.java | 4 +- .../GetAvailabilityAuthRequestEvent.java | 4 +- .../request/GetPublicKeyRequestEvent.java | 4 +- .../GetSecureLevelInfoRequestEvent.java | 4 +- .../request/HardwareReportRequestEvent.java | 6 +- .../request/JoinServerRequestEvent.java | 4 +- .../events/request/LauncherRequestEvent.java | 6 +- .../request/ProfileByUUIDRequestEvent.java | 6 +- .../ProfileByUsernameRequestEvent.java | 6 +- .../events/request/ProfilesRequestEvent.java | 6 +- .../request/RefreshTokenRequestEvent.java | 4 +- .../events/request/RestoreRequestEvent.java | 4 +- .../request/SecurityReportRequestEvent.java | 4 +- .../request/SetProfileRequestEvent.java | 6 +- .../request/UpdateListRequestEvent.java | 4 +- .../events/request/UpdateRequestEvent.java | 4 +- .../VerifySecureLevelKeyRequestEvent.java | 6 +- .../modules/LauncherInitContext.java | 2 +- .../{ => base}/modules/LauncherModule.java | 2 +- .../modules/LauncherModuleInfo.java | 2 +- .../modules/LauncherModulesContext.java | 2 +- .../modules/LauncherModulesManager.java | 2 +- .../modules/ModulesConfigManager.java | 4 +- .../base/modules/events/ClosePhase.java | 6 + .../base/modules/events/InitPhase.java | 6 + .../modules/events/OfflineModeEvent.java | 6 +- .../base/modules/events/PostInitPhase.java | 6 + .../base/modules/events/PreConfigPhase.java | 6 + .../modules/events/PreGsonPhase.java | 4 +- .../modules/impl/SimpleModuleContext.java | 8 +- .../modules/impl/SimpleModuleManager.java | 5 +- .../impl}/SimpleModulesConfigManager.java | 6 +- .../{ => base}/profiles/ClientProfile.java | 8 +- .../profiles/ClientProfileBuilder.java | 4 +- .../profiles/ClientProfileVersions.java | 2 +- .../{ => base}/profiles/PlayerProfile.java | 2 +- .../launcher/{ => base}/profiles/Texture.java | 2 +- .../profiles/optional/OptionalDepend.java | 2 +- .../profiles/optional/OptionalFile.java | 6 +- .../profiles/optional/OptionalView.java | 6 +- .../optional/actions/OptionalAction.java | 2 +- .../actions/OptionalActionClassPath.java | 2 +- .../actions/OptionalActionClientArgs.java | 2 +- .../optional/actions/OptionalActionFile.java | 2 +- .../actions/OptionalActionJvmArgs.java | 2 +- .../optional/triggers/ArchTrigger.java | 4 +- .../optional/triggers/JavaTrigger.java | 4 +- .../profiles/optional/triggers/OSTrigger.java | 4 +- .../optional/triggers/OptionalTrigger.java | 4 +- .../triggers/OptionalTriggerContext.java | 8 +- .../request/JsonResultSerializeAdapter.java | 2 +- .../{ => base}/request/PingRequest.java | 2 +- .../launcher/{ => base}/request/Request.java | 18 +- .../{ => base}/request/RequestException.java | 2 +- .../{ => base}/request/RequestService.java | 2 +- .../{ => base}/request/WebSocketEvent.java | 2 +- .../request/auth/AdditionalDataRequest.java | 6 +- .../{ => base}/request/auth/AuthRequest.java | 10 +- .../request/auth/CheckServerRequest.java | 8 +- .../base/request/auth/CurrentUserRequest.java | 11 ++ .../{ => base}/request/auth/ExitRequest.java | 6 +- .../auth/FetchClientProfileKeyRequest.java | 6 +- .../auth/GetAvailabilityAuthRequest.java | 16 +- .../request/auth/GetPublicKeyRequest.java | 6 +- .../request/auth/JoinServerRequest.java | 8 +- .../request/auth/RefreshTokenRequest.java | 6 +- .../request/auth/RestoreRequest.java | 6 +- .../request/auth/SetProfileRequest.java | 10 +- .../auth/details/AuthLoginOnlyDetails.java | 4 +- .../auth/details/AuthPasswordDetails.java | 4 +- .../request/auth/details/AuthTotpDetails.java | 4 +- .../auth/details/AuthWebViewDetails.java | 4 +- .../auth/password/Auth2FAPassword.java | 4 +- .../auth/password/AuthAESPassword.java | 4 +- .../auth/password/AuthCodePassword.java | 4 +- .../auth/password/AuthMultiPassword.java | 4 +- .../auth/password/AuthOAuthPassword.java | 4 +- .../auth/password/AuthPlainPassword.java | 4 +- .../auth/password/AuthRSAPassword.java | 4 +- .../auth/password/AuthSignaturePassword.java | 4 +- .../auth/password/AuthTOTPPassword.java | 4 +- .../cabinet/AssetUploadInfoRequest.java | 11 ++ .../request/cabinet/GetAssetUploadUrl.java | 6 +- .../request/management/FeaturesRequest.java | 11 ++ .../secure/GetSecureLevelInfoRequest.java | 6 +- .../request/secure/HardwareReportRequest.java | 6 +- .../request/secure/SecurityReportRequest.java | 6 +- .../secure/VerifySecureLevelKeyRequest.java | 6 +- .../request/update/LauncherRequest.java | 12 +- .../base/request/update/ProfilesRequest.java | 13 ++ .../request/update/UpdateListRequest.java | 13 ++ .../request/update/UpdateRequest.java | 8 +- .../uuid/BatchProfileByUsernameRequest.java | 8 +- .../request/uuid/ProfileByUUIDRequest.java | 8 +- .../uuid/ProfileByUsernameRequest.java | 8 +- .../request/websockets/ClientJSONPoint.java | 112 +++++++++++++ .../websockets/ClientWebSocketService.java | 30 ++-- .../websockets/OfflineRequestService.java | 12 +- .../websockets/StdWebSocketService.java | 14 +- .../websockets/VoidRequestService.java | 10 +- .../request/websockets/WebSocketRequest.java | 2 +- .../launcher/modules/events/ClosePhase.java | 6 - .../launcher/modules/events/InitPhase.java | 6 - .../modules/events/PostInitPhase.java | 6 - .../modules/events/PreConfigPhase.java | 6 - .../request/auth/CurrentUserRequest.java | 11 -- .../cabinet/AssetUploadInfoRequest.java | 11 -- .../request/management/FeaturesRequest.java | 11 -- .../request/update/ProfilesRequest.java | 13 -- .../request/update/UpdateListRequest.java | 13 -- .../request/websockets/ClientJSONPoint.java | 155 ------------------ .../websockets/WebSocketClientHandler.java | 89 ---------- .../gravit/launcher/ClientVersionTest.java | 2 +- .../java/pro/gravit/launcher/ModulesTest.java | 4 +- .../pro/gravit/launcher/PermissionTest.java | 1 + .../launcher/impl/Cyclic2DependModule.java | 6 +- .../launcher/impl/CyclicDependModule.java | 6 +- .../gravit/launcher/impl/Depend1Module.java | 6 +- .../gravit/launcher/impl/Depend2Module.java | 6 +- .../gravit/launcher/impl/Depend3Module.java | 6 +- .../gravit/launcher/impl/InternalModule.java | 6 +- .../pro/gravit/launcher/impl/MainModule.java | 6 +- .../gravit/launcher/impl/ProvidedModule.java | 6 +- .../pro/gravit/launcher/impl/TestModule.java | 6 +- .../launcher/impl/event/CancelEvent.java | 2 +- .../launcher/impl/event/NormalEvent.java | 2 +- .../client/BasicLauncherEventHandler.java | 12 +- .../client => }/ClientGsonManager.java | 6 +- .../client => }/ClientLauncherCoreModule.java | 8 +- .../client => }/ClientLauncherEntryPoint.java | 38 ++--- .../client/ClientLauncherMethods.java | 42 +++-- .../client => }/ClientModuleManager.java | 8 +- .../{runtime/client => }/ClientParams.java | 18 +- .../gravit/launcher/client/LauncherAgent.java | 2 +- .../client/RuntimeLauncherCoreModule.java | 8 +- .../client/api/CertificateService.java | 2 +- .../launcher/client/api/DialogService.java | 2 +- .../client => }/events/ClientExitPhase.java | 4 +- .../ClientProcessClassLoaderEvent.java | 6 +- .../ClientProcessInitPhase.java | 6 +- .../ClientProcessLaunchEvent.java | 6 +- .../ClientProcessPreInvokeMainClassEvent.java | 8 +- .../ClientProcessReadyEvent.java | 6 +- .../events/ClientUnlockConsoleEvent.java | 4 +- .../{runtime => }/utils/ApiBridgeService.java | 4 +- .../{runtime => }/utils/DirWatcher.java | 2 +- .../{runtime => }/utils/NativeJVMHalt.java | 2 +- .../launcher/start/ClientLauncherWrapper.java | 12 +- .../launcher/start/RuntimeModuleManager.java | 6 +- .../gravit/launcher/server/ServerWrapper.java | 34 ++-- .../server/ServerWrapperGsonManager.java | 2 +- .../server/setup/ServerWrapperSetup.java | 12 +- build.gradle | 2 +- modules | 2 +- settings.gradle | 1 - 306 files changed, 989 insertions(+), 1112 deletions(-) rename {LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers => LaunchServer/src/main/java/pro/gravit/launchserver/manangers}/ConfigManager.java (93%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/LauncherEngine.java (86%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/LauncherEngineWrapper.java (97%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/NewLauncherSettings.java (73%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/client/ClientLauncherProcess.java (91%) rename {LauncherClient/src/main/java/pro/gravit/launcher/client => Launcher/src/main/java/pro/gravit/launcher}/runtime/client/DirBridge.java (97%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/client/RuntimeGsonManager.java (81%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/client/ServerPinger.java (98%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/client/UserSettings.java (74%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/client/events/ClientEngineInitPhase.java (53%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/client/events/ClientGuiPhase.java (57%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/client/events/ClientPreGuiPhase.java (57%) rename Launcher/src/main/java/pro/gravit/launcher/{client/runtime/client/events/client => runtime/client/events}/ClientProcessBuilderCreateEvent.java (59%) rename Launcher/src/main/java/pro/gravit/launcher/{client/runtime/client/events/client => runtime/client/events}/ClientProcessBuilderLaunchedEvent.java (59%) rename Launcher/src/main/java/pro/gravit/launcher/{client/runtime/client/events/client => runtime/client/events}/ClientProcessBuilderParamsWrittedEvent.java (57%) rename Launcher/src/main/java/pro/gravit/launcher/{client/runtime/client/events/client => runtime/client/events}/ClientProcessBuilderPreLaunchEvent.java (59%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/console/GetPublicKeyCommand.java (86%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/console/ModulesCommand.java (86%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/console/SignDataCommand.java (88%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/console/UnlockCommand.java (82%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/console/test/PrintHardwareInfoCommand.java (95%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/debug/ClientRuntimeProvider.java (91%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/debug/DebugLauncherTrustManager.java (94%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/debug/DebugMain.java (84%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/gui/NoRuntimeProvider.java (89%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/gui/RuntimeProvider.java (72%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/managers/ConsoleManager.java (85%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/managers/SettingsManager.java (79%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/utils/HWIDProvider.java (96%) rename Launcher/src/main/java/pro/gravit/launcher/{client => }/runtime/utils/LauncherUpdater.java (92%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/ClientPermissions.java (99%) rename {LauncherModernCore/src/main/java/pro/gravit/launcher/modern => LauncherAPI/src/main/java/pro/gravit/launcher/base}/Downloader.java (99%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/Launcher.java (97%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/LauncherConfig.java (97%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{client => base}/api/AuthService.java (80%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{client => base}/api/ClientService.java (93%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{client => base}/api/ConfigService.java (88%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{client => base}/api/KeyService.java (84%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/config/JsonConfigurable.java (93%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/config/JsonConfigurableInterface.java (96%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/config/SimpleConfig.java (96%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/config/SimpleConfigurable.java (95%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/ExtendedTokenRequestEvent.java (78%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/NotificationEvent.java (89%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/RequestEvent.java (81%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/AdditionalDataRequestEvent.java (77%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/AssetUploadInfoRequestEvent.java (83%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/AuthRequestEvent.java (93%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/BatchProfileByUsernameRequestEvent.java (76%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/CheckServerRequestEvent.java (83%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/CurrentUserRequestEvent.java (68%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/ErrorRequestEvent.java (80%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/ExitRequestEvent.java (76%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/FeaturesRequestEvent.java (77%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/FetchClientProfileKeyRequestEvent.java (91%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/GetAssetUploadUrlRequestEvent.java (83%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/GetAvailabilityAuthRequestEvent.java (94%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/GetPublicKeyRequestEvent.java (87%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/GetSecureLevelInfoRequestEvent.java (83%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/HardwareReportRequestEvent.java (81%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/JoinServerRequestEvent.java (82%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/LauncherRequestEvent.java (91%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/ProfileByUUIDRequestEvent.java (80%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/ProfileByUsernameRequestEvent.java (79%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/ProfilesRequestEvent.java (78%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/RefreshTokenRequestEvent.java (75%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/RestoreRequestEvent.java (87%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/SecurityReportRequestEvent.java (88%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/SetProfileRequestEvent.java (76%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/UpdateListRequestEvent.java (83%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/UpdateRequestEvent.java (89%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/events/request/VerifySecureLevelKeyRequestEvent.java (86%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/LauncherInitContext.java (50%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/LauncherModule.java (99%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/LauncherModuleInfo.java (97%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/LauncherModulesContext.java (77%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/LauncherModulesManager.java (97%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/ModulesConfigManager.java (87%) create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/ClosePhase.java create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/InitPhase.java rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/events/OfflineModeEvent.java (54%) create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PostInitPhase.java create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PreConfigPhase.java rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/events/PreGsonPhase.java (69%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/impl/SimpleModuleContext.java (71%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/modules/impl/SimpleModuleManager.java (98%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{client/runtime/managers => base/modules/impl}/SimpleModulesConfigManager.java (87%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/ClientProfile.java (98%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/ClientProfileBuilder.java (98%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/ClientProfileVersions.java (97%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/PlayerProfile.java (97%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/Texture.java (98%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/OptionalDepend.java (72%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/OptionalFile.java (87%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/OptionalView.java (97%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/actions/OptionalAction.java (91%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/actions/OptionalActionClassPath.java (87%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/actions/OptionalActionClientArgs.java (81%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/actions/OptionalActionFile.java (95%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/actions/OptionalActionJvmArgs.java (80%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/triggers/ArchTrigger.java (70%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/triggers/JavaTrigger.java (89%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/triggers/OSTrigger.java (73%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/triggers/OptionalTrigger.java (88%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/profiles/optional/triggers/OptionalTriggerContext.java (62%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/JsonResultSerializeAdapter.java (93%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/PingRequest.java (76%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/Request.java (94%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/RequestException.java (92%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/RequestService.java (96%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/WebSocketEvent.java (83%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/AdditionalDataRequest.java (70%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/AuthRequest.java (88%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/CheckServerRequest.java (80%) create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/CurrentUserRequest.java rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/ExitRequest.java (77%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/FetchClientProfileKeyRequest.java (56%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/GetAvailabilityAuthRequest.java (61%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/GetPublicKeyRequest.java (54%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/JoinServerRequest.java (81%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/RefreshTokenRequest.java (68%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/RestoreRequest.java (78%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/SetProfileRequest.java (57%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/details/AuthLoginOnlyDetails.java (57%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/details/AuthPasswordDetails.java (57%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/details/AuthTotpDetails.java (77%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/details/AuthWebViewDetails.java (85%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/Auth2FAPassword.java (81%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthAESPassword.java (76%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthCodePassword.java (69%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthMultiPassword.java (79%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthOAuthPassword.java (87%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthPlainPassword.java (75%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthRSAPassword.java (72%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthSignaturePassword.java (78%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/auth/password/AuthTOTPPassword.java (60%) create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/request/cabinet/AssetUploadInfoRequest.java rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/cabinet/GetAssetUploadUrl.java (63%) create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/FeaturesRequest.java rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/secure/GetSecureLevelInfoRequest.java (50%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/secure/HardwareReportRequest.java (89%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/secure/SecurityReportRequest.java (93%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/secure/VerifySecureLevelKeyRequest.java (69%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/update/LauncherRequest.java (80%) create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/ProfilesRequest.java create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateListRequest.java rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/update/UpdateRequest.java (62%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/uuid/BatchProfileByUsernameRequest.java (79%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/uuid/ProfileByUUIDRequest.java (66%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/uuid/ProfileByUsernameRequest.java (63%) create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/websockets/ClientWebSocketService.java (85%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/websockets/OfflineRequestService.java (88%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/websockets/StdWebSocketService.java (92%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/websockets/VoidRequestService.java (76%) rename LauncherAPI/src/main/java/pro/gravit/launcher/{ => base}/request/websockets/WebSocketRequest.java (72%) delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/ClosePhase.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/InitPhase.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PostInitPhase.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PreConfigPhase.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CurrentUserRequest.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/request/cabinet/AssetUploadInfoRequest.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/request/management/FeaturesRequest.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/request/update/ProfilesRequest.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateListRequest.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java delete mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client => }/ClientGsonManager.java (75%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client => }/ClientLauncherCoreModule.java (59%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client => }/ClientLauncherEntryPoint.java (93%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client => }/ClientModuleManager.java (82%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client => }/ClientParams.java (88%) rename {Launcher/src/main/java/pro/gravit/launcher/client/runtime => LauncherClient/src/main/java/pro/gravit/launcher}/client/RuntimeLauncherCoreModule.java (59%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client => }/events/ClientExitPhase.java (57%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client/events/client => events}/ClientProcessClassLoaderEvent.java (76%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client/events/client => events}/ClientProcessInitPhase.java (51%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client/events/client => events}/ClientProcessLaunchEvent.java (53%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client/events/client => events}/ClientProcessPreInvokeMainClassEvent.java (66%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime/client/events/client => events}/ClientProcessReadyEvent.java (51%) rename {Launcher/src/main/java/pro/gravit/launcher/client/runtime => LauncherClient/src/main/java/pro/gravit/launcher}/client/events/ClientUnlockConsoleEvent.java (70%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime => }/utils/ApiBridgeService.java (88%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime => }/utils/DirWatcher.java (98%) rename LauncherClient/src/main/java/pro/gravit/launcher/client/{runtime => }/utils/NativeJVMHalt.java (94%) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 57742ddd..1439c426 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -73,7 +73,6 @@ dependencies { pack project(':LauncherAPI') - pack project(':LauncherModernCore') bundle group: 'me.tongfei', name: 'progressbar', version: '0.9.2' bundle group: 'com.github.Marcono1234', name: 'gson-record-type-adapter-factory', version: 'v0.2.0' bundle group: 'org.fusesource.jansi', name: 'jansi', version: rootProject['verJansi'] diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/HttpRequester.java b/LaunchServer/src/main/java/pro/gravit/launchserver/HttpRequester.java index 9bac27ff..fac90dfb 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/HttpRequester.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/HttpRequester.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver; import com.google.gson.JsonElement; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launchserver.helper.HttpHelper; import java.io.IOException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 3482f317..17264082 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -2,12 +2,11 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.client.runtime.managers.ConfigManager; -import pro.gravit.launcher.modules.events.ClosePhase; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.modules.events.ClosePhase; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.RejectAuthCoreProvider; import pro.gravit.launchserver.binary.EXEL4JLauncherBinary; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java index e7b93168..865cd674 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java @@ -3,13 +3,13 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.bouncycastle.jce.provider.BouncyCastleProvider; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.events.PreConfigPhase; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.GetAvailabilityAuthRequest; +import pro.gravit.launcher.base.modules.events.PreConfigPhase; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.GetAvailabilityAuthRequest; import pro.gravit.launchserver.auth.core.AuthCoreProvider; import pro.gravit.launchserver.auth.mix.MixProvider; import pro.gravit.launchserver.auth.password.PasswordVerifier; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java index 58f90497..8026ddb2 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java @@ -5,6 +5,10 @@ import pro.gravit.utils.launch.LaunchOptions; import pro.gravit.utils.launch.ModuleLaunch; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; import java.nio.file.FileVisitOption; import java.nio.file.Files; import java.nio.file.Path; @@ -15,6 +19,7 @@ public class Main { private static final List classpathOnly = List.of("proguard", "jline", "kotlin", "epoll"); + private static final String LOG4J_PROPERTY = "log4j2.configurationFile"; private static boolean isClasspathOnly(Path path) { var fileName = path.getFileName().toString(); for(var e : classpathOnly) { @@ -25,7 +30,28 @@ private static boolean isClasspathOnly(Path path) { return false; } + private static void unpackLog4j() { + String log4jConfigurationFile = System.getProperty(LOG4J_PROPERTY); + if(log4jConfigurationFile == null) { + Path log4jConfigPath = Path.of("log4j2.xml"); + if(!Files.exists(log4jConfigPath)) { + try(FileOutputStream output = new FileOutputStream(log4jConfigPath.toFile())) { + try(InputStream input = Main.class.getResourceAsStream("log4j2.xml")) { + if(input == null) { + return; + } + input.transferTo(output); + } + } catch (IOException e) { + throw new RuntimeException(e); + } + } + System.setProperty(LOG4J_PROPERTY, log4jConfigPath.toAbsolutePath().toString()); + } + } + public static void main(String[] args) throws Throwable { + unpackLog4j(); ModuleLaunch launch = new ModuleLaunch(); LaunchOptions options = new LaunchOptions(); options.disablePackageDelegateSupport = true; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java index 0fb5c766..e30f9842 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth; -import pro.gravit.launcher.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; import java.io.IOException; import java.io.Serial; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java index 274c6b85..c469990a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java @@ -4,9 +4,9 @@ import io.jsonwebtoken.JwtException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.password.AuthPlainPassword; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.password.AuthPlainPassword; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.auth.MySQLSourceConfig; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java index f1d8cf7d..50042661 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java @@ -3,12 +3,12 @@ import com.google.gson.reflect.TypeToken; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.details.AuthPasswordDetails; -import pro.gravit.launcher.request.auth.password.AuthPlainPassword; -import pro.gravit.launcher.request.secure.HardwareReportRequest; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.details.AuthPasswordDetails; +import pro.gravit.launcher.base.request.auth.password.AuthPlainPassword; +import pro.gravit.launcher.base.request.secure.HardwareReportRequest; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.Reconfigurable; import pro.gravit.launchserver.auth.AuthException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java index 01dc17ad..f8d8cc93 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java @@ -1,9 +1,9 @@ package pro.gravit.launchserver.auth.core; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.details.AuthLoginOnlyDetails; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.details.AuthLoginOnlyDetails; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.manangers.AuthManager; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java index fe0a26cc..a0d83fd7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.manangers.AuthManager; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java index c5ed101a..13781df9 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.auth.core; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.request.secure.HardwareReportRequest; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.request.secure.HardwareReportRequest; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.MySQLSourceConfig; import pro.gravit.launchserver.auth.SQLSourceConfig; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java index 0a95d12f..38f3864a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.core; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.manangers.AuthManager; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/User.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/User.java index acf69db6..10e265f5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/User.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/User.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.core; -import pro.gravit.launcher.ClientPermissions; +import pro.gravit.launcher.base.ClientPermissions; import java.util.UUID; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/UserHardware.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/UserHardware.java index 82934d0c..642836ab 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/UserHardware.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/UserHardware.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.core.interfaces; -import pro.gravit.launcher.request.secure.HardwareReportRequest; +import pro.gravit.launcher.base.request.secure.HardwareReportRequest; public interface UserHardware { HardwareReportRequest.HardwareInfo getHardwareInfo(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportAssetUpload.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportAssetUpload.java index f1978698..fe5a0cea 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportAssetUpload.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportAssetUpload.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.auth.core.interfaces.provider; -import pro.gravit.launcher.events.request.AssetUploadInfoRequestEvent; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.GetAssetUploadUrlRequestEvent; +import pro.gravit.launcher.base.events.request.AssetUploadInfoRequestEvent; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAssetUploadUrlRequestEvent; import pro.gravit.launchserver.auth.Feature; import pro.gravit.launchserver.auth.core.User; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportHardware.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportHardware.java index 943e4993..237a7aac 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportHardware.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportHardware.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.core.interfaces.provider; -import pro.gravit.launcher.request.secure.HardwareReportRequest; +import pro.gravit.launcher.base.request.secure.HardwareReportRequest; import pro.gravit.launchserver.auth.core.User; import pro.gravit.launchserver.auth.core.UserSession; import pro.gravit.launchserver.auth.core.interfaces.UserHardware; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportRegistration.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportRegistration.java index 6277ae2b..fbe098ad 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportRegistration.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportRegistration.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.core.interfaces.provider; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.launchserver.auth.Feature; import pro.gravit.launchserver.auth.core.User; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/user/UserSupportTextures.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/user/UserSupportTextures.java index 214d759c..679c65e3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/user/UserSupportTextures.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/user/UserSupportTextures.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.auth.core.interfaces.user; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.Texture; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.Texture; import java.util.HashMap; import java.util.Map; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/mix/UploadAssetMixProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/mix/UploadAssetMixProvider.java index ef67994f..2e511a77 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/mix/UploadAssetMixProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/mix/UploadAssetMixProvider.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.mix; -import pro.gravit.launcher.events.request.AssetUploadInfoRequestEvent; +import pro.gravit.launcher.base.events.request.AssetUploadInfoRequestEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.core.AuthCoreProvider; import pro.gravit.launchserver.auth.core.User; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java index e43ae2a8..6b217028 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import java.io.InputStream; import java.io.InputStreamReader; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java index 83ce07e2..25caa43f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java @@ -4,9 +4,9 @@ import io.jsonwebtoken.Jwts; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.events.request.GetSecureLevelInfoRequestEvent; -import pro.gravit.launcher.events.request.HardwareReportRequestEvent; -import pro.gravit.launcher.events.request.VerifySecureLevelKeyRequestEvent; +import pro.gravit.launcher.base.events.request.GetSecureLevelInfoRequestEvent; +import pro.gravit.launcher.base.events.request.HardwareReportRequestEvent; +import pro.gravit.launcher.base.events.request.VerifySecureLevelKeyRequestEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.interfaces.UserHardware; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java index 1188dcab..239857a7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.protect.interfaces.ProfilesProtectHandler; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/ProfilesProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/ProfilesProtectHandler.java index 52f151b1..f2b2d325 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/ProfilesProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/ProfilesProtectHandler.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.protect.interfaces; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.socket.Client; public interface ProfilesProtectHandler { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/SecureProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/SecureProtectHandler.java index 55444083..c5de4fd1 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/SecureProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/interfaces/SecureProtectHandler.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.auth.protect.interfaces; -import pro.gravit.launcher.events.request.GetSecureLevelInfoRequestEvent; -import pro.gravit.launcher.events.request.SecurityReportRequestEvent; -import pro.gravit.launcher.events.request.VerifySecureLevelKeyRequestEvent; +import pro.gravit.launcher.base.events.request.GetSecureLevelInfoRequestEvent; +import pro.gravit.launcher.base.events.request.SecurityReportRequestEvent; +import pro.gravit.launcher.base.events.request.VerifySecureLevelKeyRequestEvent; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.secure.SecurityReportResponse; import pro.gravit.utils.helper.SecurityHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java index 4f31c526..9a93022b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java @@ -3,7 +3,7 @@ import com.google.gson.reflect.TypeToken; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.profiles.Texture; +import pro.gravit.launcher.base.profiles.Texture; import pro.gravit.launchserver.HttpRequester; import pro.gravit.utils.helper.SecurityHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/NullTextureProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/NullTextureProvider.java index b5f785f1..2587a078 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/NullTextureProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/NullTextureProvider.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.texture; -import pro.gravit.launcher.profiles.Texture; +import pro.gravit.launcher.base.profiles.Texture; import pro.gravit.utils.helper.VerifyHelper; import java.io.IOException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/RequestTextureProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/RequestTextureProvider.java index 4d8885b2..c40ff1ec 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/RequestTextureProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/RequestTextureProvider.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.auth.texture; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.profiles.Texture; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.profiles.Texture; import pro.gravit.utils.helper.CommonHelper; import pro.gravit.utils.helper.IOHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/TextureProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/TextureProvider.java index 4519512a..d3cd82fd 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/TextureProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/TextureProvider.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.texture; -import pro.gravit.launcher.profiles.Texture; +import pro.gravit.launcher.base.profiles.Texture; import pro.gravit.utils.ProviderMap; import java.io.IOException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/VoidTextureProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/VoidTextureProvider.java index ad3f3387..612ac9cf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/VoidTextureProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/VoidTextureProvider.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.auth.texture; -import pro.gravit.launcher.profiles.Texture; +import pro.gravit.launcher.base.profiles.Texture; import java.util.UUID; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java index 069a5e3c..3bf50c71 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.launcher.core.serialize.stream.StreamObject; import pro.gravit.launchserver.binary.tasks.MainBuildTask; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JARLauncherBinary.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JARLauncherBinary.java index b7bf3e0f..4a1d28b5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JARLauncherBinary.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/JARLauncherBinary.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.binary; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.binary.tasks.*; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java index 0d1f6e85..0be26b3a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java @@ -8,8 +8,8 @@ import org.objectweb.asm.tree.AnnotationNode; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.FieldNode; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.asm.ClassMetadataReader; import pro.gravit.launchserver.asm.InjectClassAcceptor; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java index b4f7f5a3..fcf67b0f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java @@ -3,9 +3,9 @@ import me.tongfei.progressbar.ProgressBar; import me.tongfei.progressbar.ProgressBarBuilder; import me.tongfei.progressbar.ProgressBarStyle; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.modern.Downloader; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.Downloader; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.utils.command.CommandException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadAssetCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadAssetCommand.java index 249ea173..ba005879 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadAssetCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadAssetCommand.java @@ -3,8 +3,8 @@ import com.google.gson.JsonObject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.modern.Downloader; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.Downloader; import pro.gravit.launchserver.HttpRequester; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadClientCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadClientCommand.java index 5ac22a87..b2e28cd2 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadClientCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/DownloadClientCommand.java @@ -3,9 +3,9 @@ import com.google.gson.JsonElement; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.ClientProfileVersions; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfileVersions; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.launchserver.helper.MakeProfileHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/IndexAssetCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/IndexAssetCommand.java index aec64e36..8c7fe611 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/IndexAssetCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/IndexAssetCommand.java @@ -3,7 +3,7 @@ import com.google.gson.JsonObject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.utils.command.CommandException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/MakeProfileCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/MakeProfileCommand.java index 78f6973d..a424593c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/MakeProfileCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/MakeProfileCommand.java @@ -2,8 +2,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.launchserver.helper.MakeProfileHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java index c4609883..32e65634 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java @@ -2,8 +2,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.utils.helper.IOHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java index e535b365..7519711b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/modules/ModulesCommand.java @@ -3,8 +3,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.launchserver.launchermodules.LauncherModuleLoader; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java index 39fd07aa..4ff72e01 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.launchserver.components.Component; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/NotifyCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/NotifyCommand.java index abf0e80b..74bc8fa8 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/NotifyCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/NotifyCommand.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.command.service; -import pro.gravit.launcher.events.NotificationEvent; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.events.NotificationEvent; +import pro.gravit.launcher.base.request.WebSocketEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.command.Command; import pro.gravit.launchserver.socket.WebSocketService; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java index 95d6cf99..a18c19e7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.protect.AdvancedProtectHandler; import pro.gravit.launchserver.auth.protect.NoProtectHandler; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java index f6090469..35fdb687 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java @@ -3,7 +3,7 @@ import io.jsonwebtoken.Jwts; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.command.Command; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 8f01b866..66b0aeee 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -4,8 +4,8 @@ import io.netty.handler.logging.LogLevel; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.RejectAuthCoreProvider; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java index 2e6a756a..3872fec2 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java @@ -3,8 +3,8 @@ import com.google.gson.JsonElement; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.request.RequestException; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.request.RequestException; import java.io.IOException; import java.io.InputStream; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java index 8bcac9bb..7f81329a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java @@ -1,12 +1,12 @@ package pro.gravit.launchserver.helper; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.ClientProfileBuilder; -import pro.gravit.launcher.profiles.ClientProfileVersions; -import pro.gravit.launcher.profiles.optional.OptionalFile; -import pro.gravit.launcher.profiles.optional.actions.OptionalActionFile; -import pro.gravit.launcher.profiles.optional.actions.OptionalActionJvmArgs; -import pro.gravit.launcher.profiles.optional.triggers.OSTrigger; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfileBuilder; +import pro.gravit.launcher.base.profiles.ClientProfileVersions; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalActionFile; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalActionJvmArgs; +import pro.gravit.launcher.base.profiles.optional.triggers.OSTrigger; import pro.gravit.utils.helper.JVMHelper; import java.io.IOException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java index df68ff85..eb6ddcaf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java @@ -2,7 +2,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.asm.InjectClassAcceptor; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java index 5b7c3c21..8d00596d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java @@ -4,12 +4,12 @@ import io.jsonwebtoken.Jwts; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.PlayerProfile; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.password.*; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.PlayerProfile; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.password.*; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.auth.AuthProviderPair; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/ConfigManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/ConfigManager.java similarity index 93% rename from LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/ConfigManager.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/manangers/ConfigManager.java index a1843aaf..fc5df469 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/ConfigManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/ConfigManager.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.managers; +package pro.gravit.launchserver.manangers; -import pro.gravit.launcher.config.JsonConfigurable; +import pro.gravit.launcher.base.config.JsonConfigurable; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.VerifyHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java index c3f4e575..07deb093 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java @@ -2,16 +2,16 @@ import com.google.gson.GsonBuilder; import marcono1234.gson.recordadapter.RecordTypeAdapterFactory; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; import pro.gravit.launcher.core.managers.GsonManager; -import pro.gravit.launcher.modules.events.PreGsonPhase; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; -import pro.gravit.launcher.request.JsonResultSerializeAdapter; -import pro.gravit.launcher.request.WebSocketEvent; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.GetAvailabilityAuthRequest; +import pro.gravit.launcher.base.modules.events.PreGsonPhase; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.request.JsonResultSerializeAdapter; +import pro.gravit.launcher.base.request.WebSocketEvent; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.GetAvailabilityAuthRequest; import pro.gravit.launchserver.auth.core.AuthCoreProvider; import pro.gravit.launchserver.auth.mix.MixProvider; import pro.gravit.launchserver.auth.password.PasswordVerifier; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/MirrorManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/MirrorManager.java index 07932e2d..ddbd1eb9 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/MirrorManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/MirrorManager.java @@ -3,7 +3,7 @@ import com.google.gson.JsonElement; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.utils.helper.IOHelper; import java.io.IOException; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerFullInitEvent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerFullInitEvent.java index b619935b..cc5b7361 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerFullInitEvent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerFullInitEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launchserver.LaunchServer; public class LaunchServerFullInitEvent extends LauncherModule.Event { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerInitPhase.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerInitPhase.java index da8903f1..773f8897 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerInitPhase.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerInitPhase.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.events.InitPhase; +import pro.gravit.launcher.base.modules.events.InitPhase; import pro.gravit.launchserver.LaunchServer; public class LaunchServerInitPhase extends InitPhase { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerLauncherExeInit.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerLauncherExeInit.java index 48969876..5429f843 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerLauncherExeInit.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerLauncherExeInit.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.binary.LauncherBinary; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerNettyFullInitEvent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerNettyFullInitEvent.java index dae7d45b..58f9695f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerNettyFullInitEvent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerNettyFullInitEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launchserver.LaunchServer; public class LaunchServerNettyFullInitEvent extends LauncherModule.Event { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerPostInitPhase.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerPostInitPhase.java index e582bdf0..cb4ad282 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerPostInitPhase.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerPostInitPhase.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.events.PostInitPhase; +import pro.gravit.launcher.base.modules.events.PostInitPhase; import pro.gravit.launchserver.LaunchServer; public class LaunchServerPostInitPhase extends PostInitPhase { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerProfilesSyncEvent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerProfilesSyncEvent.java index c49ff4a5..a8c1e89d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerProfilesSyncEvent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerProfilesSyncEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launchserver.LaunchServer; public class LaunchServerProfilesSyncEvent extends LauncherModule.Event { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerUpdatesSyncEvent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerUpdatesSyncEvent.java index c8afddf8..811aae2f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerUpdatesSyncEvent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/LaunchServerUpdatesSyncEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launchserver.LaunchServer; public class LaunchServerUpdatesSyncEvent extends LauncherModule.Event { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/NewLaunchServerInstanceEvent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/NewLaunchServerInstanceEvent.java index 1dc3a550..9ed2aaaf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/NewLaunchServerInstanceEvent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/NewLaunchServerInstanceEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.events; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launchserver.LaunchServer; public class NewLaunchServerInstanceEvent extends LauncherModule.Event { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/security/SecurityReportModuleEvent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/security/SecurityReportModuleEvent.java index 8fb01c62..39c85369 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/security/SecurityReportModuleEvent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/events/security/SecurityReportModuleEvent.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.modules.events.security; -import pro.gravit.launcher.events.request.SecurityReportRequestEvent; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.events.request.SecurityReportRequestEvent; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.secure.SecurityReportResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerCoreModule.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerCoreModule.java index 6e54d9bb..798572c9 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerCoreModule.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerCoreModule.java @@ -1,9 +1,9 @@ package pro.gravit.launchserver.modules.impl; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; -import pro.gravit.launcher.modules.events.InitPhase; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.events.InitPhase; import pro.gravit.utils.Version; public class LaunchServerCoreModule extends LauncherModule { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerInitContext.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerInitContext.java index f33f8b5e..c3e35225 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerInitContext.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerInitContext.java @@ -1,6 +1,6 @@ package pro.gravit.launchserver.modules.impl; -import pro.gravit.launcher.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherInitContext; import pro.gravit.launchserver.LaunchServer; public class LaunchServerInitContext implements LauncherInitContext { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java index 1149eaa6..47dc112e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/modules/impl/LaunchServerModulesManager.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.modules.impl; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.impl.SimpleModuleManager; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.impl.SimpleModuleManager; import pro.gravit.launchserver.LaunchServer; import java.nio.file.Path; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java index 32b4fdf4..b91c50f4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.interfaces.UserHardware; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index 03de2060..948b01be 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -8,11 +8,11 @@ import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.events.request.ErrorRequestEvent; -import pro.gravit.launcher.events.request.ExitRequestEvent; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.events.request.ErrorRequestEvent; +import pro.gravit.launcher.base.events.request.ExitRequestEvent; +import pro.gravit.launcher.base.request.WebSocketEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.socket.handlers.WebSocketFrameHandler; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java index 46fa2fd4..ac4c0057 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java @@ -7,7 +7,7 @@ import io.netty.handler.codec.http.*; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launchserver.socket.NettyConnectContext; import pro.gravit.utils.helper.IOHelper; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java index 87e15aed..28738232 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.socket.response; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.events.request.ErrorRequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.events.request.ErrorRequestEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.socket.WebSocketService; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java index d4a769d8..7d3814d8 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.launchserver.socket.Client; public interface WebSocketServerResponse extends WebSocketRequest { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java index b3a38e6b..a4a368b6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.AdditionalDataRequestEvent; +import pro.gravit.launcher.base.events.request.AdditionalDataRequestEvent; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.User; import pro.gravit.launchserver.auth.core.interfaces.user.UserSupportAdditionalData; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java index 58f1ea35..fc463437 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java @@ -3,8 +3,8 @@ import io.netty.channel.ChannelHandlerContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.manangers.AuthManager; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java index 947e5dcb..29aed1be 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java @@ -3,7 +3,7 @@ import io.netty.channel.ChannelHandlerContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.events.request.CheckServerRequestEvent; +import pro.gravit.launcher.base.events.request.CheckServerRequestEvent; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.auth.core.interfaces.session.UserSessionSupportHardware; import pro.gravit.launchserver.auth.core.interfaces.session.UserSessionSupportProperties; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java index d1aaa064..560cf1cd 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.CurrentUserRequestEvent; +import pro.gravit.launcher.base.events.request.CurrentUserRequestEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java index af5d4d42..6cd1647c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java @@ -2,8 +2,8 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.events.request.ExitRequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.events.request.ExitRequestEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.core.UserSession; import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportExit; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java index 92f191f5..6a0d04a3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.FetchClientProfileKeyRequestEvent; +import pro.gravit.launcher.base.events.request.FetchClientProfileKeyRequestEvent; import pro.gravit.launchserver.auth.core.UserSession; import pro.gravit.launchserver.auth.core.interfaces.session.UserSessionSupportKeys; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/GetAvailabilityAuthResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/GetAvailabilityAuthResponse.java index 913218c1..b5d24f81 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/GetAvailabilityAuthResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/GetAvailabilityAuthResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/JoinServerResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/JoinServerResponse.java index 72a480a2..d1238639 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/JoinServerResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/JoinServerResponse.java @@ -3,7 +3,7 @@ import io.netty.channel.ChannelHandlerContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.events.request.JoinServerRequestEvent; +import pro.gravit.launcher.base.events.request.JoinServerRequestEvent; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.auth.protect.interfaces.JoinServerProtectHandler; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ProfilesResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ProfilesResponse.java index 45067b2e..39058b76 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ProfilesResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ProfilesResponse.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.protect.interfaces.ProfilesProtectHandler; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java index 892a4e3c..df02e059 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.RefreshTokenRequestEvent; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.RefreshTokenRequestEvent; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.manangers.AuthManager; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java index fa720e5c..4e326b7a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java @@ -1,9 +1,9 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.LauncherRequestEvent; -import pro.gravit.launcher.events.request.RestoreRequestEvent; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.LauncherRequestEvent; +import pro.gravit.launcher.base.events.request.RestoreRequestEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.AuthCoreProvider; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java index 423e4a68..ad1e37d5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.socket.response.auth; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.SetProfileRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.events.request.SetProfileRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.auth.protect.interfaces.ProfilesProtectHandler; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/cabinet/GetAssetUploadInfoResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/cabinet/GetAssetUploadInfoResponse.java index 60260f11..5136a389 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/cabinet/GetAssetUploadInfoResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/cabinet/GetAssetUploadInfoResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.cabinet; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.GetAssetUploadUrlRequestEvent; +import pro.gravit.launcher.base.events.request.GetAssetUploadUrlRequestEvent; import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportAssetUpload; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/FeaturesResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/FeaturesResponse.java index 74ccf493..02323dd1 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/FeaturesResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/FeaturesResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.management; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.FeaturesRequestEvent; +import pro.gravit.launcher.base.events.request.FeaturesRequestEvent; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java index 398dc3e4..3e18caff 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.management; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.GetPublicKeyRequestEvent; +import pro.gravit.launcher.base.events.request.GetPublicKeyRequestEvent; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java index 3193d940..bfdb81ac 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.socket.response.profile; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.BatchProfileByUsernameRequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.events.request.BatchProfileByUsernameRequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java index 90f59088..9bf4ec16 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.profile; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.ProfileByUUIDRequestEvent; +import pro.gravit.launcher.base.events.request.ProfileByUUIDRequestEvent; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.User; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java index d19c301a..50b9efe6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.socket.response.profile; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.ProfileByUsernameRequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.events.request.ProfileByUsernameRequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java index defe4630..b3e3c99f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.secure; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.GetSecureLevelInfoRequestEvent; +import pro.gravit.launcher.base.events.request.GetSecureLevelInfoRequestEvent; import pro.gravit.launchserver.auth.protect.interfaces.SecureProtectHandler; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java index b23e5ecb..785a42c3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java @@ -1,8 +1,8 @@ package pro.gravit.launchserver.socket.response.secure; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.HardwareReportRequestEvent; -import pro.gravit.launcher.request.secure.HardwareReportRequest; +import pro.gravit.launcher.base.events.request.HardwareReportRequestEvent; +import pro.gravit.launcher.base.request.secure.HardwareReportRequest; import pro.gravit.launchserver.auth.protect.interfaces.HardwareProtectHandler; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/SecurityReportResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/SecurityReportResponse.java index de64309a..a7ff6784 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/SecurityReportResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/SecurityReportResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.secure; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.SecurityReportRequestEvent; +import pro.gravit.launcher.base.events.request.SecurityReportRequestEvent; import pro.gravit.launchserver.auth.protect.interfaces.SecureProtectHandler; import pro.gravit.launchserver.modules.events.security.SecurityReportModuleEvent; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java index 8849c61a..de468ed6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java @@ -6,7 +6,7 @@ import io.netty.channel.ChannelHandlerContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.launcher.events.request.LauncherRequestEvent; +import pro.gravit.launcher.base.events.request.LauncherRequestEvent; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateListResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateListResponse.java index bda0328b..5d3d7d67 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateListResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateListResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.update; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.UpdateListRequestEvent; +import pro.gravit.launcher.base.events.request.UpdateListRequestEvent; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java index f1a3cd1e..9f92517d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java @@ -1,7 +1,7 @@ package pro.gravit.launchserver.socket.response.update; import io.netty.channel.ChannelHandlerContext; -import pro.gravit.launcher.events.request.UpdateRequestEvent; +import pro.gravit.launcher.base.events.request.UpdateRequestEvent; import pro.gravit.launcher.core.hasher.HashedDir; import pro.gravit.launchserver.auth.protect.interfaces.ProfilesProtectHandler; import pro.gravit.launchserver.config.LaunchServerConfig; diff --git a/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg b/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg index ca10f5fa..2f89b1a5 100644 --- a/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg +++ b/LaunchServer/src/main/resources/pro/gravit/launchserver/defaults/proguard.cfg @@ -14,9 +14,9 @@ -keepattributes Signature -adaptresourcefilecontents META-INF/MANIFEST.MF --keeppackagenames com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.api.**, pro.gravit.utils.**, pro.gravit.launcher.request.**, pro.gravit.launcher.events.**, pro.gravit.launcher.profiles.** +-keeppackagenames com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.runtime.api.**, pro.gravit.launcher.base.api.**, pro.gravit.launcher.client.api.**, pro.gravit.utils.**, pro.gravit.launcher.base.request.**, pro.gravit.launcher.base.events.**, pro.gravit.launcher.base.profiles.** --keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.client.api.**, pro.gravit.utils.**, pro.gravit.launcher.request.**, pro.gravit.launcher.events.**, pro.gravit.launcher.profiles.**, pro.gravit.launcher.LauncherEngineWrapper { +-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.client.api.**, pro.gravit.utils.**, pro.gravit.launcher.base.request.**, pro.gravit.launcher.base.events.**, pro.gravit.launcher.base.profiles.**, pro.gravit.launcher.runtime.LauncherEngineWrapper { *; } diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java b/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java index 89ce58eb..bf2d51a5 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java @@ -4,7 +4,7 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launchserver.config.LaunchServerConfig; import pro.gravit.launchserver.config.LaunchServerRuntimeConfig; import pro.gravit.launchserver.impl.TestLaunchServerConfigManager; diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/StartLaunchServerTest.java b/LaunchServer/src/test/java/pro/gravit/launchserver/StartLaunchServerTest.java index 88b8762a..9c663b15 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/StartLaunchServerTest.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/StartLaunchServerTest.java @@ -5,7 +5,7 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launchserver.config.LaunchServerConfig; import pro.gravit.launchserver.config.LaunchServerRuntimeConfig; import pro.gravit.launchserver.impl.TestLaunchServerConfigManager; diff --git a/Launcher/build.gradle b/Launcher/build.gradle index b2a0c82b..2aa41a79 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -1,8 +1,8 @@ apply plugin: 'org.openjfx.javafxplugin' apply plugin: 'com.github.johnrengelman.shadow' -String mainClassName = "pro.gravit.launcher.ClientLauncherWrapper" -String mainAgentName = "pro.gravit.launcher.LauncherAgent" +String mainClassName = "pro.gravit.launcher.start.ClientLauncherWrapper" +String mainAgentName = "pro.gravit.launcher.runtime.LauncherAgent" repositories { maven { @@ -50,11 +50,9 @@ dependencies { pack project(':LauncherAPI') - pack project(':LauncherModernCore') pack project(':LauncherClient') pack project(':LauncherStart') bundle group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore'] - pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] } tasks.register('genRuntimeJS', Zip) { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngine.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/LauncherEngine.java similarity index 86% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngine.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/LauncherEngine.java index 9c4be3e3..8de18308 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngine.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/LauncherEngine.java @@ -1,31 +1,30 @@ -package pro.gravit.launcher.client.runtime; +package pro.gravit.launcher.runtime; -import pro.gravit.launcher.*; -import pro.gravit.launcher.client.BasicLauncherEventHandler; -import pro.gravit.launcher.client.ClientLauncherMethods; -import pro.gravit.launcher.client.LauncherAgent; -import pro.gravit.launcher.client.runtime.client.*; -import pro.gravit.launcher.client.runtime.client.events.ClientEngineInitPhase; -import pro.gravit.launcher.client.runtime.client.events.ClientExitPhase; -import pro.gravit.launcher.client.runtime.client.events.ClientPreGuiPhase; -import pro.gravit.launcher.client.runtime.console.GetPublicKeyCommand; -import pro.gravit.launcher.client.runtime.console.ModulesCommand; -import pro.gravit.launcher.client.runtime.console.SignDataCommand; -import pro.gravit.launcher.client.runtime.gui.NoRuntimeProvider; -import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; -import pro.gravit.launcher.client.runtime.managers.ConsoleManager; -import pro.gravit.launcher.client.runtime.utils.NativeJVMHalt; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; +import pro.gravit.launcher.client.*; +import pro.gravit.launcher.runtime.client.*; +import pro.gravit.launcher.runtime.client.events.ClientEngineInitPhase; +import pro.gravit.launcher.client.events.ClientExitPhase; +import pro.gravit.launcher.runtime.client.events.ClientPreGuiPhase; +import pro.gravit.launcher.runtime.console.GetPublicKeyCommand; +import pro.gravit.launcher.runtime.console.ModulesCommand; +import pro.gravit.launcher.runtime.console.SignDataCommand; +import pro.gravit.launcher.runtime.gui.NoRuntimeProvider; +import pro.gravit.launcher.runtime.gui.RuntimeProvider; +import pro.gravit.launcher.runtime.managers.ConsoleManager; +import pro.gravit.launcher.client.utils.NativeJVMHalt; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.events.OfflineModeEvent; -import pro.gravit.launcher.modules.events.PreConfigPhase; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.auth.*; -import pro.gravit.launcher.request.websockets.OfflineRequestService; -import pro.gravit.launcher.request.websockets.StdWebSocketService; +import pro.gravit.launcher.base.modules.events.OfflineModeEvent; +import pro.gravit.launcher.base.modules.events.PreConfigPhase; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.auth.*; +import pro.gravit.launcher.base.request.websockets.OfflineRequestService; +import pro.gravit.launcher.base.request.websockets.StdWebSocketService; import pro.gravit.launcher.start.RuntimeModuleManager; import pro.gravit.utils.helper.*; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngineWrapper.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/LauncherEngineWrapper.java similarity index 97% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngineWrapper.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/LauncherEngineWrapper.java index 01d588aa..b0cd6306 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/LauncherEngineWrapper.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/LauncherEngineWrapper.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.runtime; +package pro.gravit.launcher.runtime; import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.utils.helper.IOHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/NewLauncherSettings.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/NewLauncherSettings.java similarity index 73% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/NewLauncherSettings.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/NewLauncherSettings.java index bcb5c355..a58108ac 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/NewLauncherSettings.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/NewLauncherSettings.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime; +package pro.gravit.launcher.runtime; -import pro.gravit.launcher.client.runtime.client.UserSettings; +import pro.gravit.launcher.runtime.client.UserSettings; import pro.gravit.launcher.core.LauncherNetworkAPI; import java.util.HashMap; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java similarity index 91% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java index 29239476..0a378b19 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherProcess.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java @@ -1,19 +1,21 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.runtime.client; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; -import pro.gravit.launcher.client.runtime.LauncherEngine; -import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderCreateEvent; -import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderLaunchedEvent; -import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderParamsWrittedEvent; -import pro.gravit.launcher.client.runtime.client.events.client.ClientProcessBuilderPreLaunchEvent; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; +import pro.gravit.launcher.client.ClientLauncherEntryPoint; +import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.client.events.ClientProcessBuilderCreateEvent; +import pro.gravit.launcher.runtime.client.events.ClientProcessBuilderLaunchedEvent; +import pro.gravit.launcher.runtime.client.events.ClientProcessBuilderParamsWrittedEvent; +import pro.gravit.launcher.runtime.client.events.ClientProcessBuilderPreLaunchEvent; import pro.gravit.launcher.core.hasher.HashedDir; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.PlayerProfile; -import pro.gravit.launcher.profiles.optional.OptionalView; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.actions.OptionalActionJvmArgs; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.PlayerProfile; +import pro.gravit.launcher.base.profiles.optional.OptionalView; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalActionJvmArgs; +import pro.gravit.launcher.base.request.Request; import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.utils.helper.*; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/DirBridge.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/DirBridge.java similarity index 97% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/DirBridge.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/DirBridge.java index 3167bfef..f5e6c4fa 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/DirBridge.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/DirBridge.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.runtime.client; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeGsonManager.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/RuntimeGsonManager.java similarity index 81% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeGsonManager.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/RuntimeGsonManager.java index 0ea95006..6f31c359 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeGsonManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/RuntimeGsonManager.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.runtime.client; import com.google.gson.GsonBuilder; import pro.gravit.launcher.start.RuntimeModuleManager; import pro.gravit.launcher.core.managers.GsonManager; -import pro.gravit.launcher.modules.events.PreGsonPhase; -import pro.gravit.launcher.request.websockets.ClientWebSocketService; +import pro.gravit.launcher.base.modules.events.PreGsonPhase; +import pro.gravit.launcher.base.request.websockets.ClientWebSocketService; import pro.gravit.utils.UniversalJsonAdapter; public class RuntimeGsonManager extends GsonManager { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ServerPinger.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ServerPinger.java similarity index 98% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ServerPinger.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/ServerPinger.java index f0a83ea1..53f113b2 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/ServerPinger.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ServerPinger.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.runtime.client; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.ClientProfileVersions; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfileVersions; import pro.gravit.launcher.core.serialize.HInput; import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.utils.helper.IOHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/UserSettings.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/UserSettings.java similarity index 74% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/UserSettings.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/UserSettings.java index 6a9b0c9d..37f4a105 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/UserSettings.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/UserSettings.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.runtime.client; import pro.gravit.utils.ProviderMap; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientEngineInitPhase.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientEngineInitPhase.java similarity index 53% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientEngineInitPhase.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientEngineInitPhase.java index 1a54cc43..51f78965 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientEngineInitPhase.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientEngineInitPhase.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events; +package pro.gravit.launcher.runtime.client.events; -import pro.gravit.launcher.client.runtime.LauncherEngine; -import pro.gravit.launcher.modules.events.InitPhase; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.base.modules.events.InitPhase; public class ClientEngineInitPhase extends InitPhase { public final LauncherEngine engine; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientGuiPhase.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientGuiPhase.java similarity index 57% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientGuiPhase.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientGuiPhase.java index daee9373..54fe9305 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientGuiPhase.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientGuiPhase.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events; +package pro.gravit.launcher.runtime.client.events; -import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.runtime.gui.RuntimeProvider; +import pro.gravit.launcher.base.modules.LauncherModule; public class ClientGuiPhase extends LauncherModule.Event { public final RuntimeProvider runtimeProvider; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientPreGuiPhase.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientPreGuiPhase.java similarity index 57% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientPreGuiPhase.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientPreGuiPhase.java index e3bce78d..39572c9b 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientPreGuiPhase.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientPreGuiPhase.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events; +package pro.gravit.launcher.runtime.client.events; -import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.runtime.gui.RuntimeProvider; +import pro.gravit.launcher.base.modules.LauncherModule; public class ClientPreGuiPhase extends LauncherModule.Event { public RuntimeProvider runtimeProvider; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderCreateEvent.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderCreateEvent.java similarity index 59% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderCreateEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderCreateEvent.java index 7df12606..d0d1ebc7 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderCreateEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderCreateEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.runtime.client.events; -import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.runtime.client.ClientLauncherProcess; +import pro.gravit.launcher.base.modules.LauncherModule; public class ClientProcessBuilderCreateEvent extends LauncherModule.Event { public final ClientLauncherProcess processBuilder; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderLaunchedEvent.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderLaunchedEvent.java similarity index 59% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderLaunchedEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderLaunchedEvent.java index 5383f328..3d9559fd 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderLaunchedEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderLaunchedEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.runtime.client.events; -import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.runtime.client.ClientLauncherProcess; +import pro.gravit.launcher.base.modules.LauncherModule; public class ClientProcessBuilderLaunchedEvent extends LauncherModule.Event { public final ClientLauncherProcess processBuilder; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderParamsWrittedEvent.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderParamsWrittedEvent.java similarity index 57% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderParamsWrittedEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderParamsWrittedEvent.java index 469d92ad..c3a808e8 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderParamsWrittedEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderParamsWrittedEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.runtime.client.events; -import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.runtime.client.ClientLauncherProcess; +import pro.gravit.launcher.base.modules.LauncherModule; public class ClientProcessBuilderParamsWrittedEvent extends LauncherModule.Event { public final ClientLauncherProcess process; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderPreLaunchEvent.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderPreLaunchEvent.java similarity index 59% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderPreLaunchEvent.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderPreLaunchEvent.java index 188bd42d..ce013aa2 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessBuilderPreLaunchEvent.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/events/ClientProcessBuilderPreLaunchEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.runtime.client.events; -import pro.gravit.launcher.client.runtime.client.ClientLauncherProcess; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.runtime.client.ClientLauncherProcess; +import pro.gravit.launcher.base.modules.LauncherModule; public class ClientProcessBuilderPreLaunchEvent extends LauncherModule.Event { public final ClientLauncherProcess processBuilder; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/GetPublicKeyCommand.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/GetPublicKeyCommand.java similarity index 86% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/GetPublicKeyCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/console/GetPublicKeyCommand.java index 7a63a5eb..2d2e1ec1 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/GetPublicKeyCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/GetPublicKeyCommand.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.console; +package pro.gravit.launcher.runtime.console; -import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.LauncherEngine; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/ModulesCommand.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/ModulesCommand.java similarity index 86% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/ModulesCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/console/ModulesCommand.java index e4d42437..060903e9 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/ModulesCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/ModulesCommand.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.client.runtime.console; +package pro.gravit.launcher.runtime.console; -import pro.gravit.launcher.client.runtime.LauncherEngine; -import pro.gravit.launcher.client.runtime.managers.ConsoleManager; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.managers.ConsoleManager; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/SignDataCommand.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/SignDataCommand.java similarity index 88% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/SignDataCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/console/SignDataCommand.java index f74051cb..7be082d0 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/SignDataCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/SignDataCommand.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.console; +package pro.gravit.launcher.runtime.console; -import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.LauncherEngine; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/UnlockCommand.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/UnlockCommand.java similarity index 82% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/UnlockCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/console/UnlockCommand.java index 4e1677c5..424949fb 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/UnlockCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/UnlockCommand.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.console; +package pro.gravit.launcher.runtime.console; -import pro.gravit.launcher.client.runtime.managers.ConsoleManager; -import pro.gravit.launcher.client.runtime.managers.SettingsManager; +import pro.gravit.launcher.runtime.managers.ConsoleManager; +import pro.gravit.launcher.runtime.managers.SettingsManager; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/test/PrintHardwareInfoCommand.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/test/PrintHardwareInfoCommand.java similarity index 95% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/test/PrintHardwareInfoCommand.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/console/test/PrintHardwareInfoCommand.java index 3c4a3112..675026f1 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/console/test/PrintHardwareInfoCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/test/PrintHardwareInfoCommand.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.console.test; +package pro.gravit.launcher.runtime.console.test; -import pro.gravit.launcher.client.runtime.utils.HWIDProvider; +import pro.gravit.launcher.runtime.utils.HWIDProvider; import pro.gravit.utils.command.Command; import pro.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/ClientRuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/debug/ClientRuntimeProvider.java similarity index 91% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/ClientRuntimeProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/debug/ClientRuntimeProvider.java index 254bbce9..cac5dc09 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/ClientRuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/debug/ClientRuntimeProvider.java @@ -1,17 +1,17 @@ -package pro.gravit.launcher.client.runtime.debug; +package pro.gravit.launcher.runtime.debug; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.client.api.AuthService; -import pro.gravit.launcher.client.api.ClientService; -import pro.gravit.launcher.client.runtime.LauncherEngine; -import pro.gravit.launcher.client.runtime.gui.RuntimeProvider; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.update.ProfilesRequest; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.api.AuthService; +import pro.gravit.launcher.base.api.ClientService; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.gui.RuntimeProvider; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.update.ProfilesRequest; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.launch.*; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugLauncherTrustManager.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/debug/DebugLauncherTrustManager.java similarity index 94% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugLauncherTrustManager.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/debug/DebugLauncherTrustManager.java index 3be634d1..cfebabde 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugLauncherTrustManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/debug/DebugLauncherTrustManager.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.runtime.debug; +package pro.gravit.launcher.runtime.debug; import pro.gravit.launcher.core.LauncherTrustManager; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugMain.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/debug/DebugMain.java similarity index 84% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugMain.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/debug/DebugMain.java index 39b33d2f..1d3ee6c3 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/debug/DebugMain.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/debug/DebugMain.java @@ -1,19 +1,19 @@ -package pro.gravit.launcher.client.runtime.debug; +package pro.gravit.launcher.runtime.debug; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; import pro.gravit.launcher.client.ClientLauncherMethods; -import pro.gravit.launcher.client.runtime.LauncherEngine; -import pro.gravit.launcher.client.runtime.client.RuntimeLauncherCoreModule; -import pro.gravit.launcher.client.runtime.managers.ConsoleManager; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.client.RuntimeLauncherCoreModule; +import pro.gravit.launcher.runtime.managers.ConsoleManager; import pro.gravit.launcher.start.RuntimeModuleManager; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.events.OfflineModeEvent; -import pro.gravit.launcher.modules.events.PreConfigPhase; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.websockets.OfflineRequestService; -import pro.gravit.launcher.request.websockets.StdWebSocketService; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.events.OfflineModeEvent; +import pro.gravit.launcher.base.modules.events.PreConfigPhase; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.websockets.OfflineRequestService; +import pro.gravit.launcher.base.request.websockets.StdWebSocketService; import pro.gravit.utils.helper.LogHelper; import java.lang.invoke.MethodHandles; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/NoRuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/gui/NoRuntimeProvider.java similarity index 89% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/NoRuntimeProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/gui/NoRuntimeProvider.java index 46ea445c..cb44fbab 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/NoRuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/gui/NoRuntimeProvider.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.runtime.gui; +package pro.gravit.launcher.runtime.gui; import javax.swing.*; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/RuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/gui/RuntimeProvider.java similarity index 72% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/RuntimeProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/gui/RuntimeProvider.java index 08f12cb2..2a99899d 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/gui/RuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/gui/RuntimeProvider.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.runtime.gui; +package pro.gravit.launcher.runtime.gui; public interface RuntimeProvider { void run(String[] args); diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/ConsoleManager.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/ConsoleManager.java similarity index 85% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/ConsoleManager.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/managers/ConsoleManager.java index 0a13e180..67fc9e0f 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/ConsoleManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/ConsoleManager.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.client.runtime.managers; +package pro.gravit.launcher.runtime.managers; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.client.runtime.LauncherEngine; -import pro.gravit.launcher.client.runtime.client.events.ClientUnlockConsoleEvent; -import pro.gravit.launcher.client.runtime.console.UnlockCommand; -import pro.gravit.launcher.client.runtime.console.test.PrintHardwareInfoCommand; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.runtime.LauncherEngine; +import pro.gravit.launcher.client.events.ClientUnlockConsoleEvent; +import pro.gravit.launcher.runtime.console.UnlockCommand; +import pro.gravit.launcher.runtime.console.test.PrintHardwareInfoCommand; import pro.gravit.utils.command.CommandHandler; import pro.gravit.utils.command.JLineCommandHandler; import pro.gravit.utils.command.StdCommandHandler; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/SettingsManager.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/SettingsManager.java similarity index 79% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/SettingsManager.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/managers/SettingsManager.java index bff7307b..86ea4813 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/managers/SettingsManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/SettingsManager.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.client.runtime.managers; +package pro.gravit.launcher.runtime.managers; -import pro.gravit.launcher.client.runtime.NewLauncherSettings; -import pro.gravit.launcher.client.runtime.client.DirBridge; -import pro.gravit.launcher.config.JsonConfigurable; +import pro.gravit.launcher.runtime.NewLauncherSettings; +import pro.gravit.launcher.runtime.client.DirBridge; +import pro.gravit.launcher.base.config.JsonConfigurable; import pro.gravit.utils.helper.LogHelper; public class SettingsManager extends JsonConfigurable { diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/utils/HWIDProvider.java similarity index 96% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/utils/HWIDProvider.java index 4e1c8d4c..9154a793 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/HWIDProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/utils/HWIDProvider.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.client.runtime.utils; +package pro.gravit.launcher.runtime.utils; import oshi.SystemInfo; import oshi.hardware.*; import oshi.software.os.OperatingSystem; -import pro.gravit.launcher.request.secure.HardwareReportRequest; +import pro.gravit.launcher.base.request.secure.HardwareReportRequest; import java.util.List; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/LauncherUpdater.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/utils/LauncherUpdater.java similarity index 92% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/LauncherUpdater.java rename to Launcher/src/main/java/pro/gravit/launcher/runtime/utils/LauncherUpdater.java index f4998402..27d9edee 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/utils/LauncherUpdater.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/utils/LauncherUpdater.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.client.runtime.utils; +package pro.gravit.launcher.runtime.utils; -import pro.gravit.launcher.client.runtime.LauncherEngine; +import pro.gravit.launcher.runtime.LauncherEngine; import pro.gravit.launcher.core.LauncherInject; -import pro.gravit.launcher.request.update.LauncherRequest; +import pro.gravit.launcher.base.request.update.LauncherRequest; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; @@ -22,7 +22,7 @@ import java.util.Arrays; import java.util.List; -import static pro.gravit.launcher.modern.Downloader.makeSSLSocketFactory; +import static pro.gravit.launcher.base.Downloader.makeSSLSocketFactory; public class LauncherUpdater { @LauncherInject("launcher.certificatePinning") diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index d50a567e..d66ee2a7 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -3,7 +3,6 @@ dependencies { api project(':LauncherCore') - compileOnly group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit'] } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/ClientPermissions.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/ClientPermissions.java similarity index 99% rename from LauncherAPI/src/main/java/pro/gravit/launcher/ClientPermissions.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/ClientPermissions.java index 6edb6178..bfa23a50 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/ClientPermissions.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/ClientPermissions.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.base; import pro.gravit.launcher.core.LauncherNetworkAPI; diff --git a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java similarity index 99% rename from LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java index 1d7e052d..fa8035de 100644 --- a/LauncherModernCore/src/main/java/pro/gravit/launcher/modern/Downloader.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.modern; +package pro.gravit.launcher.base; import pro.gravit.launcher.core.CertificatePinningTrustManager; import pro.gravit.launcher.core.LauncherInject; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Launcher.java similarity index 97% rename from LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/Launcher.java index 261053be..2c7e98b4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Launcher.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.base; import pro.gravit.launcher.core.managers.GsonManager; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launcher.core.serialize.HInput; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/LauncherConfig.java similarity index 97% rename from LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/LauncherConfig.java index 4b923236..b0f92c46 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/LauncherConfig.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher; +package pro.gravit.launcher.base; import pro.gravit.launcher.core.LauncherInject; import pro.gravit.launcher.core.LauncherInjectionConstructor; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModulesManager; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModulesManager; import pro.gravit.launcher.core.serialize.HInput; import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.launcher.core.serialize.stream.StreamObject; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/AuthService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/AuthService.java similarity index 80% rename from LauncherAPI/src/main/java/pro/gravit/launcher/client/api/AuthService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/api/AuthService.java index f6d99e5a..70750c57 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/AuthService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/AuthService.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.api; +package pro.gravit.launcher.base.api; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.profiles.ClientProfile; import java.util.List; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ClientService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ClientService.java similarity index 93% rename from LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ClientService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ClientService.java index f7964574..6228e8ea 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ClientService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ClientService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.api; +package pro.gravit.launcher.base.api; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ConfigService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ConfigService.java similarity index 88% rename from LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ConfigService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ConfigService.java index afa438f7..52809b6e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/ConfigService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ConfigService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.api; +package pro.gravit.launcher.base.api; public class ConfigService { public static boolean disableLogging; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/KeyService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/KeyService.java similarity index 84% rename from LauncherAPI/src/main/java/pro/gravit/launcher/client/api/KeyService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/api/KeyService.java index 4b3eac7e..69354de3 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/client/api/KeyService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/KeyService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.api; +package pro.gravit.launcher.base.api; import java.security.interfaces.ECPublicKey; import java.security.interfaces.RSAPublicKey; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/config/JsonConfigurable.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/JsonConfigurable.java similarity index 93% rename from LauncherAPI/src/main/java/pro/gravit/launcher/config/JsonConfigurable.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/config/JsonConfigurable.java index 482258d0..de468bf9 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/config/JsonConfigurable.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/JsonConfigurable.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.config; +package pro.gravit.launcher.base.config; import java.lang.reflect.Type; import java.nio.file.Path; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/config/JsonConfigurableInterface.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/JsonConfigurableInterface.java similarity index 96% rename from LauncherAPI/src/main/java/pro/gravit/launcher/config/JsonConfigurableInterface.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/config/JsonConfigurableInterface.java index 65c15c92..39686bbb 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/config/JsonConfigurableInterface.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/JsonConfigurableInterface.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.config; +package pro.gravit.launcher.base.config; import com.google.gson.Gson; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/config/SimpleConfig.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/SimpleConfig.java similarity index 96% rename from LauncherAPI/src/main/java/pro/gravit/launcher/config/SimpleConfig.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/config/SimpleConfig.java index 1ac1398c..78d3a380 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/config/SimpleConfig.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/SimpleConfig.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.config; +package pro.gravit.launcher.base.config; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/config/SimpleConfigurable.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/SimpleConfigurable.java similarity index 95% rename from LauncherAPI/src/main/java/pro/gravit/launcher/config/SimpleConfigurable.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/config/SimpleConfigurable.java index 7306728f..01def3d9 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/config/SimpleConfigurable.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/config/SimpleConfigurable.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.config; +package pro.gravit.launcher.base.config; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/ExtendedTokenRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/ExtendedTokenRequestEvent.java similarity index 78% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/ExtendedTokenRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/ExtendedTokenRequestEvent.java index 084d4a72..228392ae 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/ExtendedTokenRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/ExtendedTokenRequestEvent.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.events; +package pro.gravit.launcher.base.events; public interface ExtendedTokenRequestEvent { String getExtendedTokenName(); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/NotificationEvent.java similarity index 89% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/NotificationEvent.java index 3b492876..51e9e19a 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/NotificationEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/NotificationEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events; +package pro.gravit.launcher.base.events; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.request.WebSocketEvent; public class NotificationEvent implements WebSocketEvent { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/RequestEvent.java similarity index 81% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/RequestEvent.java index 627ec74b..89c11b24 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/RequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/RequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events; +package pro.gravit.launcher.base.events; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.request.WebSocketEvent; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AdditionalDataRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AdditionalDataRequestEvent.java similarity index 77% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AdditionalDataRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AdditionalDataRequestEvent.java index a0680b10..2308702b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AdditionalDataRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AdditionalDataRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.Map; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AssetUploadInfoRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AssetUploadInfoRequestEvent.java similarity index 83% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AssetUploadInfoRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AssetUploadInfoRequestEvent.java index 34446fcc..1b2046cb 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AssetUploadInfoRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AssetUploadInfoRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.Set; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AuthRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AuthRequestEvent.java similarity index 93% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AuthRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AuthRequestEvent.java index 0a614634..a03007d3 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/AuthRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/AuthRequestEvent.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.ClientPermissions; +import pro.gravit.launcher.base.ClientPermissions; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/BatchProfileByUsernameRequestEvent.java similarity index 76% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/BatchProfileByUsernameRequestEvent.java index 1bf0aad0..7acc3677 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/BatchProfileByUsernameRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/BatchProfileByUsernameRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; public class BatchProfileByUsernameRequestEvent extends RequestEvent { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CheckServerRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/CheckServerRequestEvent.java similarity index 83% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CheckServerRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/CheckServerRequestEvent.java index c66ee020..17576643 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CheckServerRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/CheckServerRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; import java.util.Map; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CurrentUserRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/CurrentUserRequestEvent.java similarity index 68% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CurrentUserRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/CurrentUserRequestEvent.java index e2aa68ba..f9c67018 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/CurrentUserRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/CurrentUserRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; public class CurrentUserRequestEvent extends RequestEvent { public final UserInfo userInfo; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ErrorRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ErrorRequestEvent.java similarity index 80% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ErrorRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ErrorRequestEvent.java index 9bb510d8..5fad1217 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ErrorRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ErrorRequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ExitRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ExitRequestEvent.java similarity index 76% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ExitRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ExitRequestEvent.java index 084615c4..f1acc2ee 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ExitRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ExitRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; public class ExitRequestEvent extends RequestEvent { public final ExitReason reason; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/FeaturesRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/FeaturesRequestEvent.java similarity index 77% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/FeaturesRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/FeaturesRequestEvent.java index d6151b19..cec02ffc 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/FeaturesRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/FeaturesRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.Map; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/FetchClientProfileKeyRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/FetchClientProfileKeyRequestEvent.java similarity index 91% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/FetchClientProfileKeyRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/FetchClientProfileKeyRequestEvent.java index 82958bac..c93fa7a9 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/FetchClientProfileKeyRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/FetchClientProfileKeyRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.security.PrivateKey; import java.security.PublicKey; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAssetUploadUrlRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetAssetUploadUrlRequestEvent.java similarity index 83% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAssetUploadUrlRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetAssetUploadUrlRequestEvent.java index 9d4a7e66..a911df7b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAssetUploadUrlRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetAssetUploadUrlRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; public class GetAssetUploadUrlRequestEvent extends RequestEvent { public static final String FEATURE_NAME = "assetupload"; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAvailabilityAuthRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetAvailabilityAuthRequestEvent.java similarity index 94% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAvailabilityAuthRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetAvailabilityAuthRequestEvent.java index 629c82a4..efe0fbca 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetAvailabilityAuthRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetAvailabilityAuthRequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import pro.gravit.utils.TypeSerializeInterface; import java.util.List; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetPublicKeyRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetPublicKeyRequestEvent.java similarity index 87% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetPublicKeyRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetPublicKeyRequestEvent.java index aef691ca..068e5388 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetPublicKeyRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetPublicKeyRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.security.interfaces.ECPublicKey; import java.security.interfaces.RSAPublicKey; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetSecureLevelInfoRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetSecureLevelInfoRequestEvent.java similarity index 83% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetSecureLevelInfoRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetSecureLevelInfoRequestEvent.java index 2b8fa051..cd583424 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/GetSecureLevelInfoRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetSecureLevelInfoRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; public class GetSecureLevelInfoRequestEvent extends RequestEvent { public final byte[] verifySecureKey; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/HardwareReportRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/HardwareReportRequestEvent.java similarity index 81% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/HardwareReportRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/HardwareReportRequestEvent.java index e9198109..e0126fdb 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/HardwareReportRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/HardwareReportRequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.ExtendedTokenRequestEvent; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.ExtendedTokenRequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; public class HardwareReportRequestEvent extends RequestEvent implements ExtendedTokenRequestEvent { public String extendedToken; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/JoinServerRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/JoinServerRequestEvent.java similarity index 82% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/JoinServerRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/JoinServerRequestEvent.java index 519c2c8d..3edef722 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/JoinServerRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/JoinServerRequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/LauncherRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/LauncherRequestEvent.java similarity index 91% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/LauncherRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/LauncherRequestEvent.java index 9802973b..1cd8cc56 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/LauncherRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/LauncherRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.ExtendedTokenRequestEvent; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.ExtendedTokenRequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfileByUUIDRequestEvent.java similarity index 80% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfileByUUIDRequestEvent.java index 33c9aa43..dbdd3cfb 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUUIDRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfileByUUIDRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfileByUsernameRequestEvent.java similarity index 79% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfileByUsernameRequestEvent.java index 6675cdc7..3e532500 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfileByUsernameRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfileByUsernameRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfilesRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfilesRequestEvent.java similarity index 78% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfilesRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfilesRequestEvent.java index 626f282e..bf182554 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/ProfilesRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/ProfilesRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; import java.util.List; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RefreshTokenRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/RefreshTokenRequestEvent.java similarity index 75% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RefreshTokenRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/RefreshTokenRequestEvent.java index 0f1a5806..73a910a1 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RefreshTokenRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/RefreshTokenRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; public class RefreshTokenRequestEvent extends RequestEvent { public AuthRequestEvent.OAuthRequestEvent oauth; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RestoreRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/RestoreRequestEvent.java similarity index 87% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RestoreRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/RestoreRequestEvent.java index 6c9dd5a0..748a7e46 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/RestoreRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/RestoreRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.List; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SecurityReportRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/SecurityReportRequestEvent.java similarity index 88% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SecurityReportRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/SecurityReportRequestEvent.java index 2c9af856..ba7c1a91 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SecurityReportRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/SecurityReportRequestEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; public class SecurityReportRequestEvent extends RequestEvent { public final ReportAction action; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SetProfileRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/SetProfileRequestEvent.java similarity index 76% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SetProfileRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/SetProfileRequestEvent.java index 7dd5cbe1..b3a92dbb 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/SetProfileRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/SetProfileRequestEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateListRequestEvent.java similarity index 83% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateListRequestEvent.java index 7cfbc2ba..ba5962dc 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateListRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateListRequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import java.util.HashSet; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateRequestEvent.java similarity index 89% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateRequestEvent.java index 8c98b284..18ec2229 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/UpdateRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/UpdateRequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; import pro.gravit.launcher.core.hasher.HashedDir; public class UpdateRequestEvent extends RequestEvent { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/VerifySecureLevelKeyRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/VerifySecureLevelKeyRequestEvent.java similarity index 86% rename from LauncherAPI/src/main/java/pro/gravit/launcher/events/request/VerifySecureLevelKeyRequestEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/VerifySecureLevelKeyRequestEvent.java index 2c818107..754f3020 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/events/request/VerifySecureLevelKeyRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/VerifySecureLevelKeyRequestEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.events.request; +package pro.gravit.launcher.base.events.request; -import pro.gravit.launcher.events.ExtendedTokenRequestEvent; -import pro.gravit.launcher.events.RequestEvent; +import pro.gravit.launcher.base.events.ExtendedTokenRequestEvent; +import pro.gravit.launcher.base.events.RequestEvent; public class VerifySecureLevelKeyRequestEvent extends RequestEvent implements ExtendedTokenRequestEvent { public boolean needHardwareInfo; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherInitContext.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherInitContext.java similarity index 50% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherInitContext.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherInitContext.java index 7738c826..6edbb6ce 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherInitContext.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherInitContext.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.modules; +package pro.gravit.launcher.base.modules; public interface LauncherInitContext { } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModule.java similarity index 99% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModule.java index 26eee8be..6e1d2f68 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModule.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.modules; +package pro.gravit.launcher.base.modules; import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.utils.Version; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModuleInfo.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModuleInfo.java similarity index 97% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModuleInfo.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModuleInfo.java index 0237a9ee..5b9e484b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModuleInfo.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModuleInfo.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.modules; +package pro.gravit.launcher.base.modules; import pro.gravit.utils.Version; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModulesContext.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesContext.java similarity index 77% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModulesContext.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesContext.java index 317e2d31..5710af91 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModulesContext.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesContext.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.modules; +package pro.gravit.launcher.base.modules; public interface LauncherModulesContext { LauncherModulesManager getModulesManager(); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModulesManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesManager.java similarity index 97% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModulesManager.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesManager.java index 0ac63a2c..4d3a30be 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModulesManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesManager.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.modules; +package pro.gravit.launcher.base.modules; import pro.gravit.utils.Version; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/ModulesConfigManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/ModulesConfigManager.java similarity index 87% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/ModulesConfigManager.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/ModulesConfigManager.java index 570059a7..ee1364ce 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/ModulesConfigManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/ModulesConfigManager.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.modules; +package pro.gravit.launcher.base.modules; -import pro.gravit.launcher.config.SimpleConfigurable; +import pro.gravit.launcher.base.config.SimpleConfigurable; import java.nio.file.Path; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/ClosePhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/ClosePhase.java new file mode 100644 index 00000000..43235a4f --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/ClosePhase.java @@ -0,0 +1,6 @@ +package pro.gravit.launcher.base.modules.events; + +import pro.gravit.launcher.base.modules.LauncherModule; + +public class ClosePhase extends LauncherModule.Event { +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/InitPhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/InitPhase.java new file mode 100644 index 00000000..e2d18caf --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/InitPhase.java @@ -0,0 +1,6 @@ +package pro.gravit.launcher.base.modules.events; + +import pro.gravit.launcher.base.modules.LauncherModule; + +public class InitPhase extends LauncherModule.Event { +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/OfflineModeEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/OfflineModeEvent.java similarity index 54% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/OfflineModeEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/OfflineModeEvent.java index 28a92579..9c083864 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/OfflineModeEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/OfflineModeEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.modules.events; +package pro.gravit.launcher.base.modules.events; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.request.RequestService; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.request.RequestService; public class OfflineModeEvent extends LauncherModule.Event { public RequestService service; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PostInitPhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PostInitPhase.java new file mode 100644 index 00000000..7fe2de69 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PostInitPhase.java @@ -0,0 +1,6 @@ +package pro.gravit.launcher.base.modules.events; + +import pro.gravit.launcher.base.modules.LauncherModule; + +public class PostInitPhase extends LauncherModule.Event { +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PreConfigPhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PreConfigPhase.java new file mode 100644 index 00000000..5d5e1e06 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PreConfigPhase.java @@ -0,0 +1,6 @@ +package pro.gravit.launcher.base.modules.events; + +import pro.gravit.launcher.base.modules.LauncherModule; + +public class PreConfigPhase extends LauncherModule.Event { +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PreGsonPhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PreGsonPhase.java similarity index 69% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PreGsonPhase.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PreGsonPhase.java index b47f2a6b..470a6fbf 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PreGsonPhase.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/events/PreGsonPhase.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.modules.events; +package pro.gravit.launcher.base.modules.events; import com.google.gson.GsonBuilder; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; public class PreGsonPhase extends LauncherModule.Event { public final GsonBuilder gsonBuilder; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleContext.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleContext.java similarity index 71% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleContext.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleContext.java index b6b2348d..2547f594 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleContext.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleContext.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.modules.impl; +package pro.gravit.launcher.base.modules.impl; -import pro.gravit.launcher.modules.LauncherModulesContext; -import pro.gravit.launcher.modules.LauncherModulesManager; -import pro.gravit.launcher.modules.ModulesConfigManager; +import pro.gravit.launcher.base.modules.LauncherModulesContext; +import pro.gravit.launcher.base.modules.LauncherModulesManager; +import pro.gravit.launcher.base.modules.ModulesConfigManager; public class SimpleModuleContext implements LauncherModulesContext { public final LauncherModulesManager modulesManager; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java similarity index 98% rename from LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java index 6156b709..97bf724f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/impl/SimpleModuleManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java @@ -1,8 +1,7 @@ -package pro.gravit.launcher.modules.impl; +package pro.gravit.launcher.base.modules.impl; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.client.runtime.managers.SimpleModulesConfigManager; -import pro.gravit.launcher.modules.*; +import pro.gravit.launcher.base.modules.*; import pro.gravit.utils.PublicURLClassLoader; import pro.gravit.utils.Version; import pro.gravit.utils.helper.IOHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/SimpleModulesConfigManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModulesConfigManager.java similarity index 87% rename from LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/SimpleModulesConfigManager.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModulesConfigManager.java index 3a57e209..9ac9b5df 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/client/runtime/managers/SimpleModulesConfigManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModulesConfigManager.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.managers; +package pro.gravit.launcher.base.modules.impl; -import pro.gravit.launcher.config.SimpleConfigurable; -import pro.gravit.launcher.modules.ModulesConfigManager; +import pro.gravit.launcher.base.config.SimpleConfigurable; +import pro.gravit.launcher.base.modules.ModulesConfigManager; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfile.java similarity index 98% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfile.java index 19850f00..810e96b0 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfile.java @@ -1,11 +1,11 @@ -package pro.gravit.launcher.profiles; +package pro.gravit.launcher.base.profiles; import com.google.gson.*; import pro.gravit.launcher.core.LauncherNetworkAPI; import pro.gravit.launcher.core.hasher.FileNameMatcher; -import pro.gravit.launcher.profiles.optional.OptionalDepend; -import pro.gravit.launcher.profiles.optional.OptionalFile; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.profiles.optional.OptionalDepend; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.VerifyHelper; import pro.gravit.utils.launch.LaunchOptions; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileBuilder.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfileBuilder.java similarity index 98% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileBuilder.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfileBuilder.java index 5e6a09d6..a518db5c 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileBuilder.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfileBuilder.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.profiles; +package pro.gravit.launcher.base.profiles; -import pro.gravit.launcher.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; import java.util.*; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfileVersions.java similarity index 97% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfileVersions.java index e1c70b82..5d21aced 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfileVersions.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles; +package pro.gravit.launcher.base.profiles; public class ClientProfileVersions { private ClientProfileVersions() { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/PlayerProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/PlayerProfile.java similarity index 97% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/PlayerProfile.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/PlayerProfile.java index b08cff5d..e0190993 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/PlayerProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/PlayerProfile.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles; +package pro.gravit.launcher.base.profiles; import pro.gravit.utils.helper.IOHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/Texture.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java similarity index 98% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/Texture.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java index 1e4a637e..7f917e85 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/Texture.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles; +package pro.gravit.launcher.base.profiles; import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.launcher.core.serialize.stream.StreamObject; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalDepend.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalDepend.java similarity index 72% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalDepend.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalDepend.java index 55c7c0a5..53feb0ee 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalDepend.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalDepend.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles.optional; +package pro.gravit.launcher.base.profiles.optional; import pro.gravit.launcher.core.LauncherNetworkAPI; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalFile.java similarity index 87% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalFile.java index 1884e443..4d49cf23 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalFile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalFile.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.profiles.optional; +package pro.gravit.launcher.base.profiles.optional; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; import java.util.List; import java.util.Objects; @@ -18,7 +18,7 @@ public class OptionalFile { @LauncherNetworkAPI public String info; @LauncherNetworkAPI - public List triggersList; + public List triggersList; @LauncherNetworkAPI public OptionalDepend[] dependenciesFile; @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java similarity index 97% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java index 25fdb266..d257215e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.profiles.optional; +package pro.gravit.launcher.base.profiles.optional; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; import java.util.HashMap; import java.util.HashSet; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalAction.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalAction.java similarity index 91% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalAction.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalAction.java index aabc8ccc..dd2a7437 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalAction.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalAction.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles.optional.actions; +package pro.gravit.launcher.base.profiles.optional.actions; import pro.gravit.utils.ProviderMap; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionClassPath.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionClassPath.java similarity index 87% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionClassPath.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionClassPath.java index a9093ff2..51a09abf 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionClassPath.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionClassPath.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles.optional.actions; +package pro.gravit.launcher.base.profiles.optional.actions; public class OptionalActionClassPath extends OptionalAction { public String[] args; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionClientArgs.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionClientArgs.java similarity index 81% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionClientArgs.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionClientArgs.java index 90bf980d..be164f6c 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionClientArgs.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionClientArgs.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles.optional.actions; +package pro.gravit.launcher.base.profiles.optional.actions; import java.util.List; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionFile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionFile.java similarity index 95% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionFile.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionFile.java index 9f831635..00b0c3e8 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionFile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionFile.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles.optional.actions; +package pro.gravit.launcher.base.profiles.optional.actions; import pro.gravit.launcher.core.hasher.HashedDir; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionJvmArgs.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionJvmArgs.java similarity index 80% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionJvmArgs.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionJvmArgs.java index 328a224c..900e78bc 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/actions/OptionalActionJvmArgs.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/actions/OptionalActionJvmArgs.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.profiles.optional.actions; +package pro.gravit.launcher.base.profiles.optional.actions; import java.util.List; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/ArchTrigger.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/ArchTrigger.java similarity index 70% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/ArchTrigger.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/ArchTrigger.java index b507186a..19ea42f6 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/ArchTrigger.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/ArchTrigger.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.profiles.optional.triggers; +package pro.gravit.launcher.base.profiles.optional.triggers; -import pro.gravit.launcher.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; import pro.gravit.utils.helper.JVMHelper; public class ArchTrigger extends OptionalTrigger { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/JavaTrigger.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/JavaTrigger.java similarity index 89% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/JavaTrigger.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/JavaTrigger.java index 46c08852..aa5e356f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/JavaTrigger.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/JavaTrigger.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.profiles.optional.triggers; +package pro.gravit.launcher.base.profiles.optional.triggers; -import pro.gravit.launcher.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; import pro.gravit.utils.helper.JavaHelper; public class JavaTrigger extends OptionalTrigger { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OSTrigger.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OSTrigger.java similarity index 73% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OSTrigger.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OSTrigger.java index edbd4590..00bcd3a1 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OSTrigger.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OSTrigger.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.profiles.optional.triggers; +package pro.gravit.launcher.base.profiles.optional.triggers; -import pro.gravit.launcher.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; import pro.gravit.utils.helper.JVMHelper; public class OSTrigger extends OptionalTrigger { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTrigger.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OptionalTrigger.java similarity index 88% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTrigger.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OptionalTrigger.java index 8ba54011..36419867 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTrigger.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OptionalTrigger.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.profiles.optional.triggers; +package pro.gravit.launcher.base.profiles.optional.triggers; -import pro.gravit.launcher.profiles.optional.OptionalFile; +import pro.gravit.launcher.base.profiles.optional.OptionalFile; import pro.gravit.utils.ProviderMap; public abstract class OptionalTrigger { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTriggerContext.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OptionalTriggerContext.java similarity index 62% rename from LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTriggerContext.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OptionalTriggerContext.java index 46598ff2..cb6b3839 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/OptionalTriggerContext.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/triggers/OptionalTriggerContext.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.profiles.optional.triggers; +package pro.gravit.launcher.base.profiles.optional.triggers; -import pro.gravit.launcher.ClientPermissions; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.PlayerProfile; +import pro.gravit.launcher.base.ClientPermissions; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.PlayerProfile; import pro.gravit.utils.helper.JavaHelper; public interface OptionalTriggerContext { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/JsonResultSerializeAdapter.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/JsonResultSerializeAdapter.java similarity index 93% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/JsonResultSerializeAdapter.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/JsonResultSerializeAdapter.java index 3a46e1d3..b70471b6 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/JsonResultSerializeAdapter.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/JsonResultSerializeAdapter.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.request; +package pro.gravit.launcher.base.request; import com.google.gson.*; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/PingRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/PingRequest.java similarity index 76% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/PingRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/PingRequest.java index ee526029..249e567f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/PingRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/PingRequest.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.request; +package pro.gravit.launcher.base.request; public final class PingRequest extends Request { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/Request.java similarity index 94% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/Request.java index 593e309b..d91f646f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/Request.java @@ -1,14 +1,14 @@ -package pro.gravit.launcher.request; +package pro.gravit.launcher.base.request; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.CurrentUserRequestEvent; -import pro.gravit.launcher.events.request.RefreshTokenRequestEvent; -import pro.gravit.launcher.events.request.RestoreRequestEvent; -import pro.gravit.launcher.request.auth.RefreshTokenRequest; -import pro.gravit.launcher.request.auth.RestoreRequest; -import pro.gravit.launcher.request.websockets.StdWebSocketService; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.CurrentUserRequestEvent; +import pro.gravit.launcher.base.events.request.RefreshTokenRequestEvent; +import pro.gravit.launcher.base.events.request.RestoreRequestEvent; +import pro.gravit.launcher.base.request.auth.RefreshTokenRequest; +import pro.gravit.launcher.base.request.auth.RestoreRequest; +import pro.gravit.launcher.base.request.websockets.StdWebSocketService; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.utils.helper.LogHelper; import java.util.*; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestException.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/RequestException.java similarity index 92% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestException.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/RequestException.java index 93285c79..429b0c73 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestException.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/RequestException.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.request; +package pro.gravit.launcher.base.request; import java.io.IOException; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/RequestService.java similarity index 96% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/RequestService.java index 41142326..bad2ebd1 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/RequestService.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.request; +package pro.gravit.launcher.base.request; import java.io.IOException; import java.util.concurrent.CompletableFuture; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/WebSocketEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/WebSocketEvent.java similarity index 83% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/WebSocketEvent.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/WebSocketEvent.java index 59d259d4..f72b8113 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/WebSocketEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/WebSocketEvent.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.request; +package pro.gravit.launcher.base.request; import pro.gravit.utils.TypeSerializeInterface; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AdditionalDataRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/AdditionalDataRequest.java similarity index 70% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AdditionalDataRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/AdditionalDataRequest.java index 32d10863..56e4037c 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AdditionalDataRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/AdditionalDataRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; -import pro.gravit.launcher.events.request.AdditionalDataRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.AdditionalDataRequestEvent; +import pro.gravit.launcher.base.request.Request; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/AuthRequest.java similarity index 88% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/AuthRequest.java index da3081c2..5cbc489f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/AuthRequest.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.auth.password.*; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.auth.password.*; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.utils.ProviderMap; public final class AuthRequest extends Request implements WebSocketRequest { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/CheckServerRequest.java similarity index 80% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/CheckServerRequest.java index 998fb903..aa23f58c 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CheckServerRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/CheckServerRequest.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.CheckServerRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.CheckServerRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.utils.helper.VerifyHelper; public final class CheckServerRequest extends Request implements WebSocketRequest { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/CurrentUserRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/CurrentUserRequest.java new file mode 100644 index 00000000..0ed74fa0 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/CurrentUserRequest.java @@ -0,0 +1,11 @@ +package pro.gravit.launcher.base.request.auth; + +import pro.gravit.launcher.base.events.request.CurrentUserRequestEvent; +import pro.gravit.launcher.base.request.Request; + +public class CurrentUserRequest extends Request { + @Override + public String getType() { + return "currentUser"; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/ExitRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/ExitRequest.java similarity index 77% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/ExitRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/ExitRequest.java index 240c27a3..d0c2c3bf 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/ExitRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/ExitRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; -import pro.gravit.launcher.events.request.ExitRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.ExitRequestEvent; +import pro.gravit.launcher.base.request.Request; public class ExitRequest extends Request { public final boolean exitAll; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/FetchClientProfileKeyRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/FetchClientProfileKeyRequest.java similarity index 56% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/FetchClientProfileKeyRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/FetchClientProfileKeyRequest.java index 32fcf698..96104ce8 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/FetchClientProfileKeyRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/FetchClientProfileKeyRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; -import pro.gravit.launcher.events.request.FetchClientProfileKeyRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.FetchClientProfileKeyRequestEvent; +import pro.gravit.launcher.base.request.Request; public class FetchClientProfileKeyRequest extends Request { public FetchClientProfileKeyRequest() { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/GetAvailabilityAuthRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/GetAvailabilityAuthRequest.java similarity index 61% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/GetAvailabilityAuthRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/GetAvailabilityAuthRequest.java index 15092d2a..75e856f6 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/GetAvailabilityAuthRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/GetAvailabilityAuthRequest.java @@ -1,12 +1,12 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.auth.details.AuthLoginOnlyDetails; -import pro.gravit.launcher.request.auth.details.AuthPasswordDetails; -import pro.gravit.launcher.request.auth.details.AuthTotpDetails; -import pro.gravit.launcher.request.auth.details.AuthWebViewDetails; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.auth.details.AuthLoginOnlyDetails; +import pro.gravit.launcher.base.request.auth.details.AuthPasswordDetails; +import pro.gravit.launcher.base.request.auth.details.AuthTotpDetails; +import pro.gravit.launcher.base.request.auth.details.AuthWebViewDetails; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.utils.ProviderMap; public class GetAvailabilityAuthRequest extends Request implements WebSocketRequest { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/GetPublicKeyRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/GetPublicKeyRequest.java similarity index 54% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/GetPublicKeyRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/GetPublicKeyRequest.java index 5119696c..3e6ae226 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/GetPublicKeyRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/GetPublicKeyRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; -import pro.gravit.launcher.events.request.GetPublicKeyRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.GetPublicKeyRequestEvent; +import pro.gravit.launcher.base.request.Request; public class GetPublicKeyRequest extends Request { public GetPublicKeyRequest() { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/JoinServerRequest.java similarity index 81% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/JoinServerRequest.java index 685c171d..41232121 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/JoinServerRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/JoinServerRequest.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.JoinServerRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.JoinServerRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.utils.helper.VerifyHelper; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RefreshTokenRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/RefreshTokenRequest.java similarity index 68% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RefreshTokenRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/RefreshTokenRequest.java index 0daa585e..5b48a8cb 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RefreshTokenRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/RefreshTokenRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; -import pro.gravit.launcher.events.request.RefreshTokenRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.RefreshTokenRequestEvent; +import pro.gravit.launcher.base.request.Request; public class RefreshTokenRequest extends Request { public String authId; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RestoreRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/RestoreRequest.java similarity index 78% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RestoreRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/RestoreRequest.java index d23942b9..ff7b6471 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/RestoreRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/RestoreRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; -import pro.gravit.launcher.events.request.RestoreRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.RestoreRequestEvent; +import pro.gravit.launcher.base.request.Request; import java.util.Map; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/SetProfileRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/SetProfileRequest.java similarity index 57% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/SetProfileRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/SetProfileRequest.java index 9948243c..8e99693f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/SetProfileRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/SetProfileRequest.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.request.auth; +package pro.gravit.launcher.base.request.auth; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.SetProfileRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.SetProfileRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; public class SetProfileRequest extends Request implements WebSocketRequest { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthLoginOnlyDetails.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthLoginOnlyDetails.java similarity index 57% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthLoginOnlyDetails.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthLoginOnlyDetails.java index 01b049b4..a5813a17 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthLoginOnlyDetails.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthLoginOnlyDetails.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.details; +package pro.gravit.launcher.base.request.auth.details; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; public class AuthLoginOnlyDetails implements GetAvailabilityAuthRequestEvent.AuthAvailabilityDetails { @Override diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthPasswordDetails.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthPasswordDetails.java similarity index 57% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthPasswordDetails.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthPasswordDetails.java index 1f1022fb..825fa36f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthPasswordDetails.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthPasswordDetails.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.details; +package pro.gravit.launcher.base.request.auth.details; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; public class AuthPasswordDetails implements GetAvailabilityAuthRequestEvent.AuthAvailabilityDetails { @Override diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthTotpDetails.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthTotpDetails.java similarity index 77% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthTotpDetails.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthTotpDetails.java index df0c5ce2..80c4048e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthTotpDetails.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthTotpDetails.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.details; +package pro.gravit.launcher.base.request.auth.details; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; public class AuthTotpDetails implements GetAvailabilityAuthRequestEvent.AuthAvailabilityDetails { public final String alg; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthWebViewDetails.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthWebViewDetails.java similarity index 85% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthWebViewDetails.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthWebViewDetails.java index 25d30cec..3090d251 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/details/AuthWebViewDetails.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/details/AuthWebViewDetails.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.details; +package pro.gravit.launcher.base.request.auth.details; -import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; public class AuthWebViewDetails implements GetAvailabilityAuthRequestEvent.AuthAvailabilityDetails { public final String url; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/Auth2FAPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/Auth2FAPassword.java similarity index 81% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/Auth2FAPassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/Auth2FAPassword.java index d6b7baa5..05672942 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/Auth2FAPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/Auth2FAPassword.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class Auth2FAPassword implements AuthRequest.AuthPasswordInterface { public AuthRequest.AuthPasswordInterface firstPassword; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthAESPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthAESPassword.java similarity index 76% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthAESPassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthAESPassword.java index 545cd5a3..7ecfb921 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthAESPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthAESPassword.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class AuthAESPassword implements AuthRequest.AuthPasswordInterface { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthCodePassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthCodePassword.java similarity index 69% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthCodePassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthCodePassword.java index d9595e34..5b3c6e03 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthCodePassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthCodePassword.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class AuthCodePassword implements AuthRequest.AuthPasswordInterface { public final String code; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthMultiPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthMultiPassword.java similarity index 79% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthMultiPassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthMultiPassword.java index ddc9871c..829b57dd 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthMultiPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthMultiPassword.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; import java.util.List; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthOAuthPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthOAuthPassword.java similarity index 87% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthOAuthPassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthOAuthPassword.java index 9c72e5b0..810f8aaf 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthOAuthPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthOAuthPassword.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class AuthOAuthPassword implements AuthRequest.AuthPasswordInterface { public final String accessToken; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthPlainPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthPlainPassword.java similarity index 75% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthPlainPassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthPlainPassword.java index 1f0714b1..41f4caf4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthPlainPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthPlainPassword.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class AuthPlainPassword implements AuthRequest.AuthPasswordInterface { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthRSAPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthRSAPassword.java similarity index 72% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthRSAPassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthRSAPassword.java index cf126905..aeae77bb 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthRSAPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthRSAPassword.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class AuthRSAPassword implements AuthRequest.AuthPasswordInterface { public final byte[] password; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthSignaturePassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthSignaturePassword.java similarity index 78% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthSignaturePassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthSignaturePassword.java index 7a2f4eae..cb3ccbe0 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthSignaturePassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthSignaturePassword.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class AuthSignaturePassword implements AuthRequest.AuthPasswordInterface { public byte[] signature; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthTOTPPassword.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthTOTPPassword.java similarity index 60% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthTOTPPassword.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthTOTPPassword.java index 96679d29..4ddccec6 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/password/AuthTOTPPassword.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/auth/password/AuthTOTPPassword.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.request.auth.password; +package pro.gravit.launcher.base.request.auth.password; -import pro.gravit.launcher.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.AuthRequest; public class AuthTOTPPassword implements AuthRequest.AuthPasswordInterface { public String totp; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/cabinet/AssetUploadInfoRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/cabinet/AssetUploadInfoRequest.java new file mode 100644 index 00000000..be28f937 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/cabinet/AssetUploadInfoRequest.java @@ -0,0 +1,11 @@ +package pro.gravit.launcher.base.request.cabinet; + +import pro.gravit.launcher.base.events.request.AssetUploadInfoRequestEvent; +import pro.gravit.launcher.base.request.Request; + +public class AssetUploadInfoRequest extends Request { + @Override + public String getType() { + return "assetUploadInfo"; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/cabinet/GetAssetUploadUrl.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/cabinet/GetAssetUploadUrl.java similarity index 63% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/cabinet/GetAssetUploadUrl.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/cabinet/GetAssetUploadUrl.java index 56d9d976..fb1ef584 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/cabinet/GetAssetUploadUrl.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/cabinet/GetAssetUploadUrl.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.cabinet; +package pro.gravit.launcher.base.request.cabinet; -import pro.gravit.launcher.events.request.GetAssetUploadUrlRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.GetAssetUploadUrlRequestEvent; +import pro.gravit.launcher.base.request.Request; public class GetAssetUploadUrl extends Request { public String name; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/FeaturesRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/FeaturesRequest.java new file mode 100644 index 00000000..3e3ced73 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/FeaturesRequest.java @@ -0,0 +1,11 @@ +package pro.gravit.launcher.base.request.management; + +import pro.gravit.launcher.base.events.request.FeaturesRequestEvent; +import pro.gravit.launcher.base.request.Request; + +public class FeaturesRequest extends Request { + @Override + public String getType() { + return "features"; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/GetSecureLevelInfoRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/GetSecureLevelInfoRequest.java similarity index 50% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/GetSecureLevelInfoRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/GetSecureLevelInfoRequest.java index 47eb594e..b788d807 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/GetSecureLevelInfoRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/GetSecureLevelInfoRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.secure; +package pro.gravit.launcher.base.request.secure; -import pro.gravit.launcher.events.request.GetSecureLevelInfoRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.GetSecureLevelInfoRequestEvent; +import pro.gravit.launcher.base.request.Request; public class GetSecureLevelInfoRequest extends Request { @Override diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/HardwareReportRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/HardwareReportRequest.java similarity index 89% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/HardwareReportRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/HardwareReportRequest.java index 1b7e2cb9..ebe1434f 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/HardwareReportRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/HardwareReportRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.secure; +package pro.gravit.launcher.base.request.secure; -import pro.gravit.launcher.events.request.HardwareReportRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.HardwareReportRequestEvent; +import pro.gravit.launcher.base.request.Request; import java.util.Base64; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/SecurityReportRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/SecurityReportRequest.java similarity index 93% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/SecurityReportRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/SecurityReportRequest.java index 6048353a..eb4e2fc4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/SecurityReportRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/SecurityReportRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.secure; +package pro.gravit.launcher.base.request.secure; -import pro.gravit.launcher.events.request.SecurityReportRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.SecurityReportRequestEvent; +import pro.gravit.launcher.base.request.Request; public final class SecurityReportRequest extends Request { public final String reportType; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/VerifySecureLevelKeyRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/VerifySecureLevelKeyRequest.java similarity index 69% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/VerifySecureLevelKeyRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/VerifySecureLevelKeyRequest.java index b1d0bdb9..31b3e70c 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/secure/VerifySecureLevelKeyRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/secure/VerifySecureLevelKeyRequest.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.request.secure; +package pro.gravit.launcher.base.request.secure; -import pro.gravit.launcher.events.request.VerifySecureLevelKeyRequestEvent; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.events.request.VerifySecureLevelKeyRequestEvent; +import pro.gravit.launcher.base.request.Request; public class VerifySecureLevelKeyRequest extends Request { public final byte[] publicKey; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/LauncherRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/LauncherRequest.java similarity index 80% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/update/LauncherRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/LauncherRequest.java index 4e8d0be7..f84bd812 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/LauncherRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/LauncherRequest.java @@ -1,11 +1,11 @@ -package pro.gravit.launcher.request.update; +package pro.gravit.launcher.base.request.update; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.LauncherRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.LauncherRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/ProfilesRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/ProfilesRequest.java new file mode 100644 index 00000000..758831b4 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/ProfilesRequest.java @@ -0,0 +1,13 @@ +package pro.gravit.launcher.base.request.update; + +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; + +public final class ProfilesRequest extends Request implements WebSocketRequest { + + @Override + public String getType() { + return "profiles"; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateListRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateListRequest.java new file mode 100644 index 00000000..1406e132 --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateListRequest.java @@ -0,0 +1,13 @@ +package pro.gravit.launcher.base.request.update; + +import pro.gravit.launcher.base.events.request.UpdateListRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; + +public final class UpdateListRequest extends Request implements WebSocketRequest { + + @Override + public String getType() { + return "updateList"; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateRequest.java similarity index 62% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateRequest.java index b851b55c..f4ad831e 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/update/UpdateRequest.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.request.update; +package pro.gravit.launcher.base.request.update; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.UpdateRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.UpdateRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; public final class UpdateRequest extends Request implements WebSocketRequest { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/BatchProfileByUsernameRequest.java similarity index 79% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/BatchProfileByUsernameRequest.java index 8f4f3c4f..65509418 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/BatchProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/BatchProfileByUsernameRequest.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.request.uuid; +package pro.gravit.launcher.base.request.uuid; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.BatchProfileByUsernameRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.BatchProfileByUsernameRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import pro.gravit.utils.helper.IOHelper; import java.io.IOException; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUUIDRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/ProfileByUUIDRequest.java similarity index 66% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUUIDRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/ProfileByUUIDRequest.java index ea95fa98..cebec5a4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUUIDRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/ProfileByUUIDRequest.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.request.uuid; +package pro.gravit.launcher.base.request.uuid; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.ProfileByUUIDRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.ProfileByUUIDRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; import java.util.Objects; import java.util.UUID; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/ProfileByUsernameRequest.java similarity index 63% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/ProfileByUsernameRequest.java index 784f710f..4638b574 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/uuid/ProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/ProfileByUsernameRequest.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.request.uuid; +package pro.gravit.launcher.base.request.uuid; import pro.gravit.launcher.core.LauncherNetworkAPI; -import pro.gravit.launcher.events.request.ProfileByUsernameRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; +import pro.gravit.launcher.base.events.request.ProfileByUsernameRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.websockets.WebSocketRequest; public final class ProfileByUsernameRequest extends Request implements WebSocketRequest { @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java new file mode 100644 index 00000000..7f65dadf --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java @@ -0,0 +1,112 @@ +package pro.gravit.launcher.base.request.websockets; + +import pro.gravit.launcher.base.Downloader; +import pro.gravit.utils.helper.LogHelper; + +import javax.net.ssl.SSLException; +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.WebSocket; +import java.security.KeyManagementException; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import java.time.Duration; +import java.util.concurrent.CompletionStage; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; + +public abstract class ClientJSONPoint implements WebSocket.Listener { + private static final AtomicInteger counter = new AtomicInteger(); + private final URI uri; + public boolean isClosed; + private final WebSocket.Builder webSocketBuilder; + protected HttpClient httpClient; + protected WebSocket webSocket; + protected boolean ssl = false; + protected int port; + private final Object syncObject = new Object(); + private volatile StringBuilder builder = new StringBuilder(); + + public ClientJSONPoint(final String uri) throws SSLException { + this(URI.create(uri)); + } + + public ClientJSONPoint(URI uri) { + this.uri = uri; + String protocol = uri.getScheme(); + if (!"ws".equals(protocol) && !"wss".equals(protocol)) { + throw new IllegalArgumentException("Unsupported protocol: " + protocol); + } + if ("wss".equals(protocol)) { + ssl = true; + } + if (uri.getPort() == -1) { + if ("ws".equals(protocol)) port = 80; + else port = 443; + } else port = uri.getPort(); + try { + httpClient = HttpClient.newBuilder() + .sslContext(Downloader.makeSSLContext()).build(); + webSocketBuilder = httpClient.newWebSocketBuilder().connectTimeout(Duration.ofSeconds(30)); + } catch (NoSuchAlgorithmException | CertificateException | KeyStoreException | IOException | + KeyManagementException e) { + throw new RuntimeException(e); + } + } + + public void open() throws Exception { + webSocket = webSocketBuilder.buildAsync(uri, this).get(); + } + + public void openAsync(Runnable onConnect, Consumer onFail) { + webSocketBuilder.buildAsync(uri, this).thenAccept((e) -> { + this.webSocket = e; + onConnect.run(); + }).exceptionally((ex) -> { + onFail.accept(ex); + return null; + }); + } + + @Override + public CompletionStage onText(WebSocket webSocket, CharSequence data, boolean last) { + synchronized (syncObject) { + builder.append(data); + if(last) { + String message = builder.toString(); + builder = new StringBuilder(); + onMessage(message); + } + } + return WebSocket.Listener.super.onText(webSocket, data, last); + } + + @Override + public CompletionStage onClose(WebSocket webSocket, int statusCode, String reason) { + onDisconnect(statusCode, reason); + return WebSocket.Listener.super.onClose(webSocket, statusCode, reason); + } + + @Override + public void onError(WebSocket webSocket, Throwable error) { + LogHelper.error(error); + WebSocket.Listener.super.onError(webSocket, error); + } + + public void send(String text) { + webSocket.sendText(text, true); + } + + abstract void onMessage(String message); + + abstract void onDisconnect(int statusCode, String reason); + + abstract void onOpen(); + + public void close() throws InterruptedException { + webSocket.abort(); + } + +} \ No newline at end of file diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java similarity index 85% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java index 5d18b124..e5564f37 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java @@ -1,18 +1,18 @@ -package pro.gravit.launcher.request.websockets; +package pro.gravit.launcher.base.request.websockets; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.events.NotificationEvent; -import pro.gravit.launcher.events.request.*; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.events.NotificationEvent; +import pro.gravit.launcher.base.events.request.*; import pro.gravit.launcher.core.hasher.HashedEntry; import pro.gravit.launcher.core.hasher.HashedEntryAdapter; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; -import pro.gravit.launcher.request.WebSocketEvent; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.GetAvailabilityAuthRequest; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.request.WebSocketEvent; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.GetAvailabilityAuthRequest; import pro.gravit.utils.ProviderMap; import pro.gravit.utils.UniversalJsonAdapter; import pro.gravit.utils.helper.LogHelper; @@ -67,9 +67,9 @@ void onMessage(String message) { public abstract void eventHandle(T event); @Override - void onDisconnect() { - LogHelper.info("WebSocket client disconnect"); - if (onCloseCallback != null) onCloseCallback.onClose(0, "unsupported param", !isClosed); + void onDisconnect(int statusCode, String reason) { + LogHelper.info("WebSocket disconnected: %d: %s", statusCode, reason); + if (onCloseCallback != null) onCloseCallback.onClose(statusCode, reason, !isClosed); } @Override @@ -122,13 +122,13 @@ public void waitIfNotConnected() { public void sendObject(Object obj) throws IOException { waitIfNotConnected(); - if (ch == null || !ch.isActive()) reconnectCallback.onReconnect(); + if (webSocket == null || webSocket.isInputClosed()) reconnectCallback.onReconnect(); send(gson.toJson(obj, WebSocketRequest.class)); } public void sendObject(Object obj, Type type) throws IOException { waitIfNotConnected(); - if (ch == null || !ch.isActive()) reconnectCallback.onReconnect(); + if (webSocket == null || webSocket.isInputClosed()) reconnectCallback.onReconnect(); send(gson.toJson(obj, type)); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/OfflineRequestService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/OfflineRequestService.java similarity index 88% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/OfflineRequestService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/OfflineRequestService.java index 66fb69e5..d995b73d 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/OfflineRequestService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/OfflineRequestService.java @@ -1,10 +1,10 @@ -package pro.gravit.launcher.request.websockets; +package pro.gravit.launcher.base.request.websockets; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.WebSocketEvent; import pro.gravit.utils.helper.LogHelper; import java.util.HashSet; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/StdWebSocketService.java similarity index 92% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/StdWebSocketService.java index c4946129..fe6dade9 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/StdWebSocketService.java @@ -1,11 +1,11 @@ -package pro.gravit.launcher.request.websockets; +package pro.gravit.launcher.base.request.websockets; -import pro.gravit.launcher.events.RequestEvent; -import pro.gravit.launcher.events.request.ErrorRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.events.request.ErrorRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.WebSocketEvent; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/VoidRequestService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/VoidRequestService.java similarity index 76% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/VoidRequestService.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/VoidRequestService.java index 4d098833..0e26a494 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/VoidRequestService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/VoidRequestService.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.request.websockets; +package pro.gravit.launcher.base.request.websockets; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.WebSocketEvent; import java.util.concurrent.CompletableFuture; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/WebSocketRequest.java similarity index 72% rename from LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketRequest.java rename to LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/WebSocketRequest.java index 05d3e899..69389897 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/WebSocketRequest.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.request.websockets; +package pro.gravit.launcher.base.request.websockets; import pro.gravit.utils.TypeSerializeInterface; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/ClosePhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/ClosePhase.java deleted file mode 100644 index b924d4c0..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/ClosePhase.java +++ /dev/null @@ -1,6 +0,0 @@ -package pro.gravit.launcher.modules.events; - -import pro.gravit.launcher.modules.LauncherModule; - -public class ClosePhase extends LauncherModule.Event { -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/InitPhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/InitPhase.java deleted file mode 100644 index b4f24adb..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/InitPhase.java +++ /dev/null @@ -1,6 +0,0 @@ -package pro.gravit.launcher.modules.events; - -import pro.gravit.launcher.modules.LauncherModule; - -public class InitPhase extends LauncherModule.Event { -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PostInitPhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PostInitPhase.java deleted file mode 100644 index 88d097a5..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PostInitPhase.java +++ /dev/null @@ -1,6 +0,0 @@ -package pro.gravit.launcher.modules.events; - -import pro.gravit.launcher.modules.LauncherModule; - -public class PostInitPhase extends LauncherModule.Event { -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PreConfigPhase.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PreConfigPhase.java deleted file mode 100644 index 01630a53..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/events/PreConfigPhase.java +++ /dev/null @@ -1,6 +0,0 @@ -package pro.gravit.launcher.modules.events; - -import pro.gravit.launcher.modules.LauncherModule; - -public class PreConfigPhase extends LauncherModule.Event { -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CurrentUserRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CurrentUserRequest.java deleted file mode 100644 index 4a4437f5..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/CurrentUserRequest.java +++ /dev/null @@ -1,11 +0,0 @@ -package pro.gravit.launcher.request.auth; - -import pro.gravit.launcher.events.request.CurrentUserRequestEvent; -import pro.gravit.launcher.request.Request; - -public class CurrentUserRequest extends Request { - @Override - public String getType() { - return "currentUser"; - } -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/cabinet/AssetUploadInfoRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/cabinet/AssetUploadInfoRequest.java deleted file mode 100644 index 3827e762..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/cabinet/AssetUploadInfoRequest.java +++ /dev/null @@ -1,11 +0,0 @@ -package pro.gravit.launcher.request.cabinet; - -import pro.gravit.launcher.events.request.AssetUploadInfoRequestEvent; -import pro.gravit.launcher.request.Request; - -public class AssetUploadInfoRequest extends Request { - @Override - public String getType() { - return "assetUploadInfo"; - } -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/management/FeaturesRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/management/FeaturesRequest.java deleted file mode 100644 index d203cdff..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/management/FeaturesRequest.java +++ /dev/null @@ -1,11 +0,0 @@ -package pro.gravit.launcher.request.management; - -import pro.gravit.launcher.events.request.FeaturesRequestEvent; -import pro.gravit.launcher.request.Request; - -public class FeaturesRequest extends Request { - @Override - public String getType() { - return "features"; - } -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/ProfilesRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/ProfilesRequest.java deleted file mode 100644 index 06f28ebc..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/ProfilesRequest.java +++ /dev/null @@ -1,13 +0,0 @@ -package pro.gravit.launcher.request.update; - -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; - -public final class ProfilesRequest extends Request implements WebSocketRequest { - - @Override - public String getType() { - return "profiles"; - } -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateListRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateListRequest.java deleted file mode 100644 index 463b58ed..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/update/UpdateListRequest.java +++ /dev/null @@ -1,13 +0,0 @@ -package pro.gravit.launcher.request.update; - -import pro.gravit.launcher.events.request.UpdateListRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.websockets.WebSocketRequest; - -public final class UpdateListRequest extends Request implements WebSocketRequest { - - @Override - public String getType() { - return "updateList"; - } -} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java deleted file mode 100644 index 0afe1267..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java +++ /dev/null @@ -1,155 +0,0 @@ -package pro.gravit.launcher.request.websockets; - -import io.netty.bootstrap.Bootstrap; -import io.netty.channel.*; -import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.socket.SocketChannel; -import io.netty.channel.socket.nio.NioSocketChannel; -import io.netty.handler.codec.http.EmptyHttpHeaders; -import io.netty.handler.codec.http.HttpClientCodec; -import io.netty.handler.codec.http.HttpObjectAggregator; -import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame; -import io.netty.handler.codec.http.websocketx.TextWebSocketFrame; -import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; -import io.netty.handler.codec.http.websocketx.WebSocketVersion; -import io.netty.handler.ssl.SslContext; -import io.netty.handler.ssl.SslContextBuilder; -import pro.gravit.launcher.core.CertificatePinningTrustManager; -import pro.gravit.launcher.core.LauncherInject; -import pro.gravit.utils.helper.LogHelper; - -import javax.net.ssl.SSLException; -import java.io.IOException; -import java.net.URI; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.CertificateException; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.function.Consumer; - -public abstract class ClientJSONPoint { - private static final AtomicInteger counter = new AtomicInteger(); - private static final ThreadFactory threadFactory = (runnable) -> { - Thread t = new Thread(runnable); - t.setName(String.format("Netty Thread #%d", counter.incrementAndGet())); - t.setDaemon(true); - return t; - }; - private static final EventLoopGroup group = new NioEventLoopGroup(threadFactory); - @LauncherInject("launcher.certificatePinning") - private static boolean isCertificatePinning; - protected final Bootstrap bootstrap = new Bootstrap(); - private final URI uri; - public boolean isClosed; - protected Channel ch; - protected WebSocketClientHandler webSocketClientHandler; - protected boolean ssl = false; - protected int port; - - public ClientJSONPoint(final String uri) throws SSLException { - this(URI.create(uri)); - } - - public ClientJSONPoint(URI uri) throws SSLException { - this.uri = uri; - String protocol = uri.getScheme(); - if (!"ws".equals(protocol) && !"wss".equals(protocol)) { - throw new IllegalArgumentException("Unsupported protocol: " + protocol); - } - if ("wss".equals(protocol)) { - ssl = true; - } - if (uri.getPort() == -1) { - if ("ws".equals(protocol)) port = 80; - else port = 443; - } else port = uri.getPort(); - final SslContext sslCtx; - if (ssl) { - SslContextBuilder sslContextBuilder = SslContextBuilder.forClient(); - if (isCertificatePinning) { - try { - sslContextBuilder.trustManager(CertificatePinningTrustManager.getTrustManager()); - } catch (KeyStoreException | NoSuchAlgorithmException | IOException | CertificateException e) { - LogHelper.error(e); - sslContextBuilder.trustManager(); - } - } - sslCtx = sslContextBuilder.build(); - } else sslCtx = null; - bootstrap.group(group) - .channel(NioSocketChannel.class) - .handler(new ChannelInitializer() { - @Override - public void initChannel(SocketChannel ch) { - ChannelPipeline pipeline = ch.pipeline(); - if (sslCtx != null) { - pipeline.addLast(sslCtx.newHandler(ch.alloc(), uri.getHost(), port)); - } - pipeline.addLast("http-codec", new HttpClientCodec()); - pipeline.addLast("aggregator", new HttpObjectAggregator(65536)); - pipeline.addLast("ws-handler", webSocketClientHandler); - } - }); - } - - public void open() throws Exception { - //System.out.println("WebSocket Client connecting"); - webSocketClientHandler = - new WebSocketClientHandler( - WebSocketClientHandshakerFactory.newHandshaker( - uri, WebSocketVersion.V13, null, false, EmptyHttpHeaders.INSTANCE, 12800000), this); - ch = bootstrap.connect(uri.getHost(), port).sync().channel(); - webSocketClientHandler.handshakeFuture().sync(); - } - - public void openAsync(Runnable onConnect, Consumer onFail) { - //System.out.println("WebSocket Client connecting"); - webSocketClientHandler = - new WebSocketClientHandler( - WebSocketClientHandshakerFactory.newHandshaker( - uri, WebSocketVersion.V13, null, false, EmptyHttpHeaders.INSTANCE, 12800000), this); - ChannelFuture future = bootstrap.connect(uri.getHost(), port); - future.addListener((l) -> { - if (l.isSuccess()) { - ch = future.channel(); - webSocketClientHandler.handshakeFuture().addListener((e) -> { - if (e.isSuccess()) { - onConnect.run(); - } else { - onFail.accept(webSocketClientHandler.handshakeFuture().cause()); - } - }); - } else { - onFail.accept(future.cause()); - } - }); - } - - public void send(String text) { - LogHelper.dev("Send: %s", text); - ch.writeAndFlush(new TextWebSocketFrame(text), ch.voidPromise()); - } - - abstract void onMessage(String message); - - abstract void onDisconnect(); - - abstract void onOpen(); - - public void close() throws InterruptedException { - //System.out.println("WebSocket Client sending close"); - isClosed = true; - if (ch != null && ch.isActive()) { - ch.writeAndFlush(new CloseWebSocketFrame(), ch.voidPromise()); - ch.closeFuture().sync(); - } - - group.shutdownGracefully(); - } - - public void eval(final String text) { - ch.writeAndFlush(new TextWebSocketFrame(text), ch.voidPromise()); - } - -} \ No newline at end of file diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java deleted file mode 100644 index 99739729..00000000 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java +++ /dev/null @@ -1,89 +0,0 @@ -package pro.gravit.launcher.request.websockets; - -import io.netty.channel.*; -import io.netty.handler.codec.http.FullHttpResponse; -import io.netty.handler.codec.http.websocketx.*; -import io.netty.util.CharsetUtil; -import pro.gravit.utils.helper.LogHelper; - -import java.util.concurrent.TimeUnit; - -public class WebSocketClientHandler extends SimpleChannelInboundHandler { - - private final WebSocketClientHandshaker handshaker; - private final ClientJSONPoint clientJSONPoint; - private ChannelPromise handshakeFuture; - - public WebSocketClientHandler(final WebSocketClientHandshaker handshaker, ClientJSONPoint clientJSONPoint) { - this.handshaker = handshaker; - this.clientJSONPoint = clientJSONPoint; - } - - public ChannelFuture handshakeFuture() { - return handshakeFuture; - } - - @Override - public void handlerAdded(final ChannelHandlerContext ctx) { - handshakeFuture = ctx.newPromise(); - } - - @Override - public void channelActive(final ChannelHandlerContext ctx) { - handshaker.handshake(ctx.channel()); - clientJSONPoint.onOpen(); - ctx.executor().scheduleWithFixedDelay(() -> ctx.channel().writeAndFlush(new PingWebSocketFrame()), 20L, 20L, TimeUnit.SECONDS); - } - - @Override - public void channelInactive(final ChannelHandlerContext ctx) { - //System.out.println("WebSocket Client disconnected!"); - clientJSONPoint.onDisconnect(); - } - - @Override - protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception { - final Channel ch = ctx.channel(); - if (!handshaker.isHandshakeComplete()) { - // web socket client connected - handshaker.finishHandshake(ch, (FullHttpResponse) msg); - handshakeFuture.setSuccess(); - return; - } - - if (msg instanceof FullHttpResponse response) { - throw new Exception("Unexpected FullHttpResponse (getStatus=" + response.status() + ", content=" - + response.content().toString(CharsetUtil.UTF_8) + ')'); - } - - final WebSocketFrame frame = (WebSocketFrame) msg; - if (frame instanceof TextWebSocketFrame textFrame) { - if (LogHelper.isDevEnabled()) { - LogHelper.dev("Message: %s", textFrame.text()); - } - clientJSONPoint.onMessage(textFrame.text()); - // uncomment to print request - // logger.info(textFrame.text()); - } else if ((frame instanceof PingWebSocketFrame)) { - frame.content().retain(); - ch.writeAndFlush(new PongWebSocketFrame(frame.content()), ch.voidPromise()); - //return; - } else if (frame instanceof PongWebSocketFrame) { - } else if (frame instanceof CloseWebSocketFrame) - ch.close(); - else if (frame instanceof BinaryWebSocketFrame) { - // uncomment to print request - // logger.info(frame.content().toString()); - } - } - - @Override - public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) { - if (!handshakeFuture.isDone()) { - handshakeFuture.setFailure(cause); - } else { - LogHelper.error(cause); - } - ctx.close(); - } -} \ No newline at end of file diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/ClientVersionTest.java b/LauncherAPI/src/test/java/pro/gravit/launcher/ClientVersionTest.java index 205b495a..81ff8a28 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/ClientVersionTest.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/ClientVersionTest.java @@ -2,7 +2,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfile; public class ClientVersionTest { @Test diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/ModulesTest.java b/LauncherAPI/src/test/java/pro/gravit/launcher/ModulesTest.java index c228df09..0f9ea313 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/ModulesTest.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/ModulesTest.java @@ -7,8 +7,8 @@ import pro.gravit.launcher.impl.*; import pro.gravit.launcher.impl.event.CancelEvent; import pro.gravit.launcher.impl.event.NormalEvent; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.impl.SimpleModuleManager; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.impl.SimpleModuleManager; import java.nio.file.Path; diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/PermissionTest.java b/LauncherAPI/src/test/java/pro/gravit/launcher/PermissionTest.java index 74baf10c..581b5015 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/PermissionTest.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/PermissionTest.java @@ -2,6 +2,7 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import pro.gravit.launcher.base.ClientPermissions; public class PermissionTest { @Test diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Cyclic2DependModule.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Cyclic2DependModule.java index fa321bce..3d144bec 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Cyclic2DependModule.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Cyclic2DependModule.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.impl; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class Cyclic2DependModule extends LauncherModule { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/CyclicDependModule.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/CyclicDependModule.java index c13d8b58..090ce42a 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/CyclicDependModule.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/CyclicDependModule.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.impl; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class CyclicDependModule extends LauncherModule { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend1Module.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend1Module.java index a3f046b7..99da57e2 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend1Module.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend1Module.java @@ -1,9 +1,9 @@ package pro.gravit.launcher.impl; import org.junit.jupiter.api.Assertions; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class Depend1Module extends LauncherModule { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend2Module.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend2Module.java index 2b50e4c1..466053d6 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend2Module.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend2Module.java @@ -1,9 +1,9 @@ package pro.gravit.launcher.impl; import org.junit.jupiter.api.Assertions; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class Depend2Module extends LauncherModule { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend3Module.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend3Module.java index 3e63503a..bf264cc8 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend3Module.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/Depend3Module.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.impl; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; public class Depend3Module extends LauncherModule { public Depend3Module() { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/InternalModule.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/InternalModule.java index 1cbe663e..acd36fca 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/InternalModule.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/InternalModule.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.impl; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; public class InternalModule extends LauncherModule { public InternalModule() { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/MainModule.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/MainModule.java index 22248da6..e4993574 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/MainModule.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/MainModule.java @@ -1,9 +1,9 @@ package pro.gravit.launcher.impl; import org.junit.jupiter.api.Assertions; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class MainModule extends LauncherModule { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/ProvidedModule.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/ProvidedModule.java index dd201374..68fb5c0c 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/ProvidedModule.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/ProvidedModule.java @@ -1,8 +1,8 @@ package pro.gravit.launcher.impl; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class ProvidedModule extends LauncherModule implements VirtualInterface { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/TestModule.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/TestModule.java index 9f247324..18500f2b 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/TestModule.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/TestModule.java @@ -2,9 +2,9 @@ import pro.gravit.launcher.impl.event.CancelEvent; import pro.gravit.launcher.impl.event.NormalEvent; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; public class TestModule extends LauncherModule { diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/CancelEvent.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/CancelEvent.java index 4220f5f1..adb68520 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/CancelEvent.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/CancelEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.impl.event; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; public class CancelEvent extends LauncherModule.Event { } diff --git a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/NormalEvent.java b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/NormalEvent.java index 210b88e2..84bc7d62 100644 --- a/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/NormalEvent.java +++ b/LauncherAPI/src/test/java/pro/gravit/launcher/impl/event/NormalEvent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.impl.event; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; public class NormalEvent extends LauncherModule.Event { public boolean passed; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java index 8b36651f..87d03fa9 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java @@ -1,12 +1,12 @@ package pro.gravit.launcher.client; import pro.gravit.launcher.client.api.DialogService; -import pro.gravit.launcher.events.ExtendedTokenRequestEvent; -import pro.gravit.launcher.events.NotificationEvent; -import pro.gravit.launcher.events.request.SecurityReportRequestEvent; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.WebSocketEvent; +import pro.gravit.launcher.base.events.ExtendedTokenRequestEvent; +import pro.gravit.launcher.base.events.NotificationEvent; +import pro.gravit.launcher.base.events.request.SecurityReportRequestEvent; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.WebSocketEvent; import pro.gravit.utils.helper.LogHelper; public class BasicLauncherEventHandler implements RequestService.EventHandler { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientGsonManager.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientGsonManager.java similarity index 75% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientGsonManager.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/ClientGsonManager.java index 9a503091..7a4ce733 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientGsonManager.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientGsonManager.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.client; import com.google.gson.GsonBuilder; import pro.gravit.launcher.core.managers.GsonManager; -import pro.gravit.launcher.modules.events.PreGsonPhase; -import pro.gravit.launcher.request.websockets.ClientWebSocketService; +import pro.gravit.launcher.base.modules.events.PreGsonPhase; +import pro.gravit.launcher.base.request.websockets.ClientWebSocketService; public class ClientGsonManager extends GsonManager { private final ClientModuleManager moduleManager; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherCoreModule.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherCoreModule.java similarity index 59% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherCoreModule.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherCoreModule.java index 5dd32863..9cfe8ddc 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherCoreModule.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherCoreModule.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.client; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class ClientLauncherCoreModule extends LauncherModule { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherEntryPoint.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java similarity index 93% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherEntryPoint.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java index 9d3d6134..cc0a1b28 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientLauncherEntryPoint.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java @@ -1,28 +1,26 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.client; -import pro.gravit.launcher.*; -import pro.gravit.launcher.client.BasicLauncherEventHandler; -import pro.gravit.launcher.client.ClientLauncherMethods; -import pro.gravit.launcher.client.LauncherAgent; -import pro.gravit.launcher.client.api.AuthService; -import pro.gravit.launcher.client.api.ClientService; -import pro.gravit.launcher.client.api.KeyService; -import pro.gravit.launcher.client.runtime.client.events.client.*; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; +import pro.gravit.launcher.base.api.AuthService; +import pro.gravit.launcher.base.api.ClientService; +import pro.gravit.launcher.base.api.KeyService; +import pro.gravit.launcher.client.events.*; import pro.gravit.launcher.core.hasher.FileNameMatcher; import pro.gravit.launcher.core.hasher.HashedDir; import pro.gravit.launcher.core.hasher.HashedEntry; -import pro.gravit.launcher.modules.events.PreConfigPhase; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.ClientProfileVersions; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.actions.OptionalActionClassPath; -import pro.gravit.launcher.profiles.optional.actions.OptionalActionClientArgs; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.websockets.StdWebSocketService; +import pro.gravit.launcher.base.modules.events.PreConfigPhase; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfileVersions; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalActionClassPath; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalActionClientArgs; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.websockets.StdWebSocketService; import pro.gravit.launcher.core.serialize.HInput; -import pro.gravit.launcher.client.runtime.utils.DirWatcher; +import pro.gravit.launcher.client.utils.DirWatcher; import pro.gravit.utils.helper.*; import pro.gravit.utils.launch.*; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherMethods.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherMethods.java index 2774a122..09d8aef5 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherMethods.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherMethods.java @@ -1,29 +1,25 @@ package pro.gravit.launcher.client; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.client.events.ClientExitPhase; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.client.runtime.client.ClientGsonManager; -import pro.gravit.launcher.client.runtime.client.ClientLauncherEntryPoint; -import pro.gravit.launcher.client.runtime.client.ClientModuleManager; -import pro.gravit.launcher.client.runtime.client.ClientParams; -import pro.gravit.launcher.client.runtime.client.events.ClientExitPhase; -import pro.gravit.launcher.events.request.*; -import pro.gravit.launcher.modules.LauncherModulesManager; -import pro.gravit.launcher.modules.events.OfflineModeEvent; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; -import pro.gravit.launcher.request.RequestException; -import pro.gravit.launcher.request.RequestService; -import pro.gravit.launcher.request.auth.*; -import pro.gravit.launcher.request.auth.details.AuthLoginOnlyDetails; -import pro.gravit.launcher.request.management.FeaturesRequest; -import pro.gravit.launcher.request.secure.GetSecureLevelInfoRequest; -import pro.gravit.launcher.request.secure.SecurityReportRequest; -import pro.gravit.launcher.request.update.LauncherRequest; -import pro.gravit.launcher.request.uuid.ProfileByUUIDRequest; -import pro.gravit.launcher.request.uuid.ProfileByUsernameRequest; -import pro.gravit.launcher.request.websockets.OfflineRequestService; -import pro.gravit.launcher.client.runtime.utils.NativeJVMHalt; +import pro.gravit.launcher.base.events.request.*; +import pro.gravit.launcher.base.modules.LauncherModulesManager; +import pro.gravit.launcher.base.modules.events.OfflineModeEvent; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.request.RequestException; +import pro.gravit.launcher.base.request.RequestService; +import pro.gravit.launcher.base.request.auth.*; +import pro.gravit.launcher.base.request.auth.details.AuthLoginOnlyDetails; +import pro.gravit.launcher.base.request.management.FeaturesRequest; +import pro.gravit.launcher.base.request.secure.GetSecureLevelInfoRequest; +import pro.gravit.launcher.base.request.secure.SecurityReportRequest; +import pro.gravit.launcher.base.request.update.LauncherRequest; +import pro.gravit.launcher.base.request.uuid.ProfileByUUIDRequest; +import pro.gravit.launcher.base.request.uuid.ProfileByUsernameRequest; +import pro.gravit.launcher.base.request.websockets.OfflineRequestService; +import pro.gravit.launcher.client.utils.NativeJVMHalt; import pro.gravit.utils.helper.JVMHelper; import java.security.cert.X509Certificate; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java similarity index 82% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java index e89b8af5..03a6f14e 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientModuleManager.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java @@ -1,9 +1,9 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.client; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.impl.SimpleModuleManager; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.impl.SimpleModuleManager; import java.nio.file.Path; import java.util.Collections; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientParams.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java similarity index 88% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientParams.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java index e8047887..ee8381d9 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/ClientParams.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java @@ -1,14 +1,14 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.client; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; import pro.gravit.launcher.core.hasher.HashedDir; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.ClientProfileVersions; -import pro.gravit.launcher.profiles.PlayerProfile; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.actions.OptionalActionClientArgs; -import pro.gravit.launcher.request.Request; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfileVersions; +import pro.gravit.launcher.base.profiles.PlayerProfile; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalActionClientArgs; +import pro.gravit.launcher.base.request.Request; import pro.gravit.utils.Version; import java.util.*; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/LauncherAgent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/LauncherAgent.java index 27924bba..0683af97 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/LauncherAgent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/LauncherAgent.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.client; -import pro.gravit.launcher.client.runtime.utils.NativeJVMHalt; +import pro.gravit.launcher.client.utils.NativeJVMHalt; import pro.gravit.utils.helper.LogHelper; import java.io.File; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeLauncherCoreModule.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/RuntimeLauncherCoreModule.java similarity index 59% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeLauncherCoreModule.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/RuntimeLauncherCoreModule.java index 6b948c01..a4366843 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/RuntimeLauncherCoreModule.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/RuntimeLauncherCoreModule.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.client.runtime.client; +package pro.gravit.launcher.client; -import pro.gravit.launcher.modules.LauncherInitContext; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.LauncherModuleInfo; +import pro.gravit.launcher.base.modules.LauncherInitContext; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModuleInfo; import pro.gravit.utils.Version; public class RuntimeLauncherCoreModule extends LauncherModule { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java index 222c8de6..3c6a6e56 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java @@ -2,7 +2,7 @@ import pro.gravit.launcher.client.ClientLauncherMethods; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.client.runtime.utils.ApiBridgeService; +import pro.gravit.launcher.client.utils.ApiBridgeService; import java.security.cert.X509Certificate; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/DialogService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/DialogService.java index 0132ef3d..aa26756f 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/DialogService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/DialogService.java @@ -1,6 +1,6 @@ package pro.gravit.launcher.client.api; -import pro.gravit.launcher.events.NotificationEvent; +import pro.gravit.launcher.base.events.NotificationEvent; import java.util.function.Consumer; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientExitPhase.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientExitPhase.java similarity index 57% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientExitPhase.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientExitPhase.java index 199bf0e4..ddad537c 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientExitPhase.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientExitPhase.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.client.events; +package pro.gravit.launcher.client.events; -import pro.gravit.launcher.modules.events.ClosePhase; +import pro.gravit.launcher.base.modules.events.ClosePhase; public class ClientExitPhase extends ClosePhase { public final int code; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessClassLoaderEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessClassLoaderEvent.java similarity index 76% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessClassLoaderEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessClassLoaderEvent.java index 7d193807..7ece2912 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessClassLoaderEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessClassLoaderEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.client.events; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.utils.launch.ClassLoaderControl; import pro.gravit.utils.launch.Launch; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessInitPhase.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessInitPhase.java similarity index 51% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessInitPhase.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessInitPhase.java index a7f27384..82a1c556 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessInitPhase.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessInitPhase.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.client.events; -import pro.gravit.launcher.client.runtime.client.ClientParams; -import pro.gravit.launcher.modules.events.InitPhase; +import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.base.modules.events.InitPhase; public class ClientProcessInitPhase extends InitPhase { public final ClientParams params; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessLaunchEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessLaunchEvent.java similarity index 53% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessLaunchEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessLaunchEvent.java index 5954e801..9646c6d5 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessLaunchEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessLaunchEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.client.events; -import pro.gravit.launcher.client.runtime.client.ClientParams; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.base.modules.LauncherModule; public class ClientProcessLaunchEvent extends LauncherModule.Event { public final ClientParams params; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessPreInvokeMainClassEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessPreInvokeMainClassEvent.java similarity index 66% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessPreInvokeMainClassEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessPreInvokeMainClassEvent.java index c84e7904..ef32888d 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessPreInvokeMainClassEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessPreInvokeMainClassEvent.java @@ -1,8 +1,8 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.client.events; -import pro.gravit.launcher.client.runtime.client.ClientParams; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.profiles.ClientProfile; +import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.profiles.ClientProfile; import java.util.Collection; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessReadyEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessReadyEvent.java similarity index 51% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessReadyEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessReadyEvent.java index 87399ece..9df4dfad 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/client/events/client/ClientProcessReadyEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientProcessReadyEvent.java @@ -1,7 +1,7 @@ -package pro.gravit.launcher.client.runtime.client.events.client; +package pro.gravit.launcher.client.events; -import pro.gravit.launcher.client.runtime.client.ClientParams; -import pro.gravit.launcher.modules.events.PostInitPhase; +import pro.gravit.launcher.client.ClientParams; +import pro.gravit.launcher.base.modules.events.PostInitPhase; public class ClientProcessReadyEvent extends PostInitPhase { public final ClientParams params; diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientUnlockConsoleEvent.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientUnlockConsoleEvent.java similarity index 70% rename from Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientUnlockConsoleEvent.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientUnlockConsoleEvent.java index 814b5729..e73361fe 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/runtime/client/events/ClientUnlockConsoleEvent.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/events/ClientUnlockConsoleEvent.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.client.events; +package pro.gravit.launcher.client.events; -import pro.gravit.launcher.modules.LauncherModule; +import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.utils.command.CommandHandler; public class ClientUnlockConsoleEvent extends LauncherModule.Event { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/ApiBridgeService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/utils/ApiBridgeService.java similarity index 88% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/ApiBridgeService.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/utils/ApiBridgeService.java index ce675a57..f4defa2d 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/ApiBridgeService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/utils/ApiBridgeService.java @@ -1,6 +1,6 @@ -package pro.gravit.launcher.client.runtime.utils; +package pro.gravit.launcher.client.utils; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.core.LauncherTrustManager; import java.security.cert.X509Certificate; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/DirWatcher.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/utils/DirWatcher.java similarity index 98% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/DirWatcher.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/utils/DirWatcher.java index a3ab7053..5184035a 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/DirWatcher.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/utils/DirWatcher.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.runtime.utils; +package pro.gravit.launcher.client.utils; import pro.gravit.launcher.client.ClientLauncherMethods; import pro.gravit.launcher.core.hasher.FileNameMatcher; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/NativeJVMHalt.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/utils/NativeJVMHalt.java similarity index 94% rename from LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/NativeJVMHalt.java rename to LauncherClient/src/main/java/pro/gravit/launcher/client/utils/NativeJVMHalt.java index c442c264..03fae4f3 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/runtime/utils/NativeJVMHalt.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/utils/NativeJVMHalt.java @@ -1,4 +1,4 @@ -package pro.gravit.launcher.client.runtime.utils; +package pro.gravit.launcher.client.utils; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientLauncherWrapper.java b/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientLauncherWrapper.java index a068b3db..82791f3f 100644 --- a/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientLauncherWrapper.java +++ b/LauncherStart/src/main/java/pro/gravit/launcher/start/ClientLauncherWrapper.java @@ -1,9 +1,7 @@ package pro.gravit.launcher.start; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; -import pro.gravit.launcher.client.runtime.client.DirBridge; -import pro.gravit.launcher.client.runtime.utils.DirWatcher; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; import pro.gravit.launcher.core.LauncherInject; import pro.gravit.utils.Version; import pro.gravit.utils.helper.*; @@ -105,16 +103,12 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep context.executePath = IOHelper.resolveJavaBin(context.javaVersion.jvmDir); String pathLauncher = IOHelper.getCodeSource(ClientLauncherWrapper.class).toString(); - context.mainClass = "pro.gravit.launcher.LauncherEngineWrapper"; + context.mainClass = "pro.gravit.launcher.runtime.LauncherEngineWrapper"; context.memoryLimit = launcherMemoryLimit; context.classpath.add(pathLauncher); context.jvmProperties.put(LogHelper.DEBUG_PROPERTY, Boolean.toString(LogHelper.isDebugEnabled())); context.jvmProperties.put(LogHelper.STACKTRACE_PROPERTY, Boolean.toString(LogHelper.isStacktraceEnabled())); context.jvmProperties.put(LogHelper.DEV_PROPERTY, Boolean.toString(LogHelper.isDevEnabled())); - context.addSystemProperty(DirBridge.CUSTOMDIR_PROPERTY); - context.addSystemProperty(DirBridge.USE_CUSTOMDIR_PROPERTY); - context.addSystemProperty(DirBridge.USE_OPTDIR_PROPERTY); - context.addSystemProperty(DirWatcher.IGN_OVERFLOW); context.jvmModules.add("javafx.base"); context.jvmModules.add("javafx.graphics"); context.jvmModules.add("javafx.fxml"); diff --git a/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java index 8f5a350c..ab9640cf 100644 --- a/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java +++ b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java @@ -1,9 +1,9 @@ package pro.gravit.launcher.start; -import pro.gravit.launcher.Launcher; +import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.core.LauncherTrustManager; -import pro.gravit.launcher.modules.LauncherModule; -import pro.gravit.launcher.modules.impl.SimpleModuleManager; +import pro.gravit.launcher.base.modules.LauncherModule; +import pro.gravit.launcher.base.modules.impl.SimpleModuleManager; import java.nio.file.Path; import java.util.Collections; diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index 77faaa45..a1c7e6d5 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -1,22 +1,22 @@ package pro.gravit.launcher.server; -import pro.gravit.launcher.Launcher; -import pro.gravit.launcher.LauncherConfig; -import pro.gravit.launcher.client.api.AuthService; -import pro.gravit.launcher.client.api.ClientService; -import pro.gravit.launcher.client.api.ConfigService; -import pro.gravit.launcher.client.api.KeyService; -import pro.gravit.launcher.config.JsonConfigurable; -import pro.gravit.launcher.events.request.AuthRequestEvent; -import pro.gravit.launcher.events.request.ProfilesRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.optional.actions.OptionalAction; -import pro.gravit.launcher.profiles.optional.triggers.OptionalTrigger; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.auth.AuthRequest; -import pro.gravit.launcher.request.auth.GetAvailabilityAuthRequest; -import pro.gravit.launcher.request.update.ProfilesRequest; -import pro.gravit.launcher.request.websockets.StdWebSocketService; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.LauncherConfig; +import pro.gravit.launcher.base.api.AuthService; +import pro.gravit.launcher.base.api.ClientService; +import pro.gravit.launcher.base.api.ConfigService; +import pro.gravit.launcher.base.api.KeyService; +import pro.gravit.launcher.base.config.JsonConfigurable; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; +import pro.gravit.launcher.base.events.request.ProfilesRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.optional.actions.OptionalAction; +import pro.gravit.launcher.base.profiles.optional.triggers.OptionalTrigger; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.auth.AuthRequest; +import pro.gravit.launcher.base.request.auth.GetAvailabilityAuthRequest; +import pro.gravit.launcher.base.request.update.ProfilesRequest; +import pro.gravit.launcher.base.request.websockets.StdWebSocketService; import pro.gravit.launcher.server.authlib.InstallAuthlib; import pro.gravit.launcher.server.setup.ServerWrapperSetup; import pro.gravit.utils.helper.IOHelper; diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java index 3c20fe6b..48b5f35d 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java @@ -2,7 +2,7 @@ import com.google.gson.GsonBuilder; import pro.gravit.launcher.core.managers.GsonManager; -import pro.gravit.launcher.request.websockets.ClientWebSocketService; +import pro.gravit.launcher.base.request.websockets.ClientWebSocketService; public class ServerWrapperGsonManager extends GsonManager { diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java index 9f2e24da..336f4889 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java @@ -1,11 +1,11 @@ package pro.gravit.launcher.server.setup; -import pro.gravit.launcher.events.request.GetPublicKeyRequestEvent; -import pro.gravit.launcher.profiles.ClientProfile; -import pro.gravit.launcher.profiles.ClientProfileVersions; -import pro.gravit.launcher.request.Request; -import pro.gravit.launcher.request.auth.GetPublicKeyRequest; -import pro.gravit.launcher.request.websockets.StdWebSocketService; +import pro.gravit.launcher.base.events.request.GetPublicKeyRequestEvent; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launcher.base.profiles.ClientProfileVersions; +import pro.gravit.launcher.base.request.Request; +import pro.gravit.launcher.base.request.auth.GetPublicKeyRequest; +import pro.gravit.launcher.base.request.websockets.StdWebSocketService; import pro.gravit.launcher.server.ServerWrapper; import pro.gravit.utils.PublicURLClassLoader; import pro.gravit.utils.helper.IOHelper; diff --git a/build.gradle b/build.gradle index 30340061..a586a61d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ id 'org.openjfx.javafxplugin' version '0.0.10' apply false } group = 'pro.gravit.launcher' -version = '5.5.3' +version = '5.6.0-SNAPSHOT' apply from: 'props.gradle' diff --git a/modules b/modules index 9b1740cc..ee11966e 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 9b1740ccc426de8a8ac332545c64afbe9c17f89f +Subproject commit ee11966e12eaa7de3b4dfe07c8425da5deee1f16 diff --git a/settings.gradle b/settings.gradle index 9566cd8d..dfdf4434 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,7 +1,6 @@ rootProject.name = 'GravitLauncher' include 'Launcher' -include 'LauncherModernCore' include 'LauncherCore' include 'LauncherAPI' include 'LauncherClient' From f321b8bd2764e90e5167530605b2643c0d2e4fd4 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 29 Dec 2023 16:37:14 +0700 Subject: [PATCH 08/73] [FIX] ExitResponse, update SimpleModuleManager --- .../socket/response/auth/ExitResponse.java | 5 +- .../launcher/base/modules/LauncherModule.java | 4 ++ .../base/modules/LauncherModulesContext.java | 4 ++ .../modules/impl/SimpleModuleContext.java | 11 +++ .../modules/impl/SimpleModuleManager.java | 23 +++++- .../request/websockets/ClientJSONPoint.java | 2 + .../launcher/client/ClientModuleManager.java | 6 ++ LauncherModernCore/build.gradle | 72 ------------------- .../launcher/start/RuntimeModuleManager.java | 5 ++ .../server/setup/ServerWrapperSetup.java | 5 +- 10 files changed, 61 insertions(+), 76 deletions(-) delete mode 100644 LauncherModernCore/build.gradle diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java index 6cd1647c..37394753 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java @@ -43,6 +43,10 @@ public void execute(ChannelHandlerContext ctx, Client client) { return; } if (username == null) { + if(!client.isAuth || client.auth == null) { + sendError("You are not authorized"); + return; + } { WebSocketFrameHandler handler = ctx.pipeline().get(WebSocketFrameHandler.class); if (handler == null) { @@ -65,7 +69,6 @@ public void execute(ChannelHandlerContext ctx, Client client) { } sendResult(new ExitRequestEvent(ExitRequestEvent.ExitReason.CLIENT)); } - sendResult(new ExitRequestEvent(ExitRequestEvent.ExitReason.CLIENT)); } else { service.forEachActiveChannels(((channel, webSocketFrameHandler) -> { Client client1 = webSocketFrameHandler.getClient(); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModule.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModule.java index 6e1d2f68..86d032b8 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModule.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModule.java @@ -83,6 +83,10 @@ protected final T requireModule(Class cl return module; } + protected LauncherModulesContext getContext() { + return context; + } + private void requireModule(LauncherModule module, Version minVersion, String requiredModuleName) { if (module == null) throw new RuntimeException(String.format("Module %s required %s v%s or higher", moduleInfo.name, requiredModuleName, minVersion.getVersionString())); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesContext.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesContext.java index 5710af91..b648faa8 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesContext.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/LauncherModulesContext.java @@ -1,7 +1,11 @@ package pro.gravit.launcher.base.modules; +import java.net.URL; + public interface LauncherModulesContext { LauncherModulesManager getModulesManager(); ModulesConfigManager getModulesConfigManager(); + + void addURL(URL url); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleContext.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleContext.java index 2547f594..2d1bc257 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleContext.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleContext.java @@ -4,6 +4,8 @@ import pro.gravit.launcher.base.modules.LauncherModulesManager; import pro.gravit.launcher.base.modules.ModulesConfigManager; +import java.net.URL; + public class SimpleModuleContext implements LauncherModulesContext { public final LauncherModulesManager modulesManager; public final ModulesConfigManager configManager; @@ -13,6 +15,15 @@ public SimpleModuleContext(LauncherModulesManager modulesManager, ModulesConfigM this.configManager = configManager; } + @Override + public void addURL(URL url) { + if(modulesManager instanceof SimpleModuleManager s) { + s.addUrlToClassLoader(url); + } else { + throw new UnsupportedOperationException(); + } + } + @Override public LauncherModulesManager getModulesManager() { return modulesManager; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java index 97bf724f..db3668a4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java @@ -11,6 +11,7 @@ import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.net.URL; +import java.net.URLClassLoader; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; @@ -32,9 +33,13 @@ public class SimpleModuleManager implements LauncherModulesManager { protected final ModulesConfigManager modulesConfigManager; protected final Path modulesDir; protected final LauncherTrustManager trustManager; - protected final PublicURLClassLoader classLoader = new PublicURLClassLoader(new URL[]{}, SimpleModuleManager.class.getClassLoader()); + protected final ModulesClassLoader classLoader = createClassLoader(); protected LauncherInitContext initContext; + protected ModulesClassLoader createClassLoader() { + return new ModulesClassLoader(new URL[]{}, SimpleModuleManager.class.getClassLoader()); + } + public SimpleModuleManager(Path modulesDir, Path configDir) { modulesConfigManager = new SimpleModulesConfigManager(configDir); context = new SimpleModuleContext(this, modulesConfigManager); @@ -268,6 +273,10 @@ public ModulesConfigManager getConfigManager() { return modulesConfigManager; } + void addUrlToClassLoader(URL url) { + classLoader.addURL(url); + } + protected final class ModulesVisitor extends SimpleFileVisitor { private ModulesVisitor() { } @@ -279,4 +288,16 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO return super.visitFile(file, attrs); } } + + protected static class ModulesClassLoader extends URLClassLoader { + + public ModulesClassLoader(URL[] urls, ClassLoader parent) { + super("MODULES", urls, parent); + } + + @Override + public void addURL(URL url) { + super.addURL(url); + } + } } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java index 7f65dadf..73f1d9dc 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java @@ -14,6 +14,7 @@ import java.security.cert.CertificateException; import java.time.Duration; import java.util.concurrent.CompletionStage; +import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; @@ -27,6 +28,7 @@ public abstract class ClientJSONPoint implements WebSocket.Listener { protected boolean ssl = false; protected int port; private final Object syncObject = new Object(); + private final Object sendSyncObject = new Object(); private volatile StringBuilder builder = new StringBuilder(); public ClientJSONPoint(final String uri) throws SSLException { diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java index 03a6f14e..b516523f 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java @@ -5,6 +5,7 @@ import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launcher.base.modules.impl.SimpleModuleManager; +import java.net.URL; import java.nio.file.Path; import java.util.Collections; import java.util.List; @@ -33,6 +34,11 @@ public List getModules() { return Collections.unmodifiableList(modules); } + @Override + protected ModulesClassLoader createClassLoader() { + return null; + } + @Override public boolean verifyClassCheckResult(LauncherTrustManager.CheckClassResult result) { return result.type == LauncherTrustManager.CheckClassResultType.SUCCESS; diff --git a/LauncherModernCore/build.gradle b/LauncherModernCore/build.gradle deleted file mode 100644 index 879f4a48..00000000 --- a/LauncherModernCore/build.gradle +++ /dev/null @@ -1,72 +0,0 @@ -sourceCompatibility = '17' -targetCompatibility = '17' - -dependencies { - api project(':LauncherCore') -} - -test { - useJUnitPlatform() - testLogging { - events "passed", "skipped", "failed" - } -} -jar { - archiveClassifier.set('clean') - manifest.attributes("Multi-Release": "true") -} - -tasks.register('sourcesJar', Jar) { - from sourceSets.main.allJava - archiveClassifier.set('sources') -} - -tasks.register('javadocJar', Jar) { - from javadoc - archiveClassifier.set('javadoc') -} - -publishing { - publications { - launchermoderncore(MavenPublication) { - artifactId = 'launcher-modern-core' - artifact(jar) { - classifier "" - } - artifact sourcesJar - artifact javadocJar - pom { - name = 'GravitLauncher Core Utils with Java 17+' - description = 'GravitLauncher Core Utils' - url = 'https://gravitlauncher.com' - licenses { - license { - name = 'GNU General Public License, Version 3.0' - url = 'https://www.gnu.org/licenses/gpl-3.0.html' - } - } - developers { - developer { - id = 'gravita' - name = 'Gravita' - email = 'gravita@gravit.pro' - } - developer { - id = 'zaxar163' - name = 'Zaxar163' - email = 'zahar.vcherachny@yandex.ru' - } - } - scm { - connection = 'scm:git:https://github.com/GravitLauncher/Launcher.git' - developerConnection = 'scm:git:ssh://git@github.com:GravitLauncher/Launcher.git' - url = 'https://gravitlauncher.com/' - } - } - } - } -} - -signing { - sign publishing.publications.launchermoderncore -} diff --git a/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java index ab9640cf..efbc127f 100644 --- a/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java +++ b/LauncherStart/src/main/java/pro/gravit/launcher/start/RuntimeModuleManager.java @@ -38,6 +38,11 @@ public boolean verifyClassCheckResult(LauncherTrustManager.CheckClassResult resu return result.type == LauncherTrustManager.CheckClassResultType.SUCCESS; } + @Override + protected ModulesClassLoader createClassLoader() { + return null; + } + public void callWrapper(ClientLauncherWrapper.ClientLauncherWrapperContext context) { for (LauncherModule module : modules) { if (module instanceof ClientWrapperModule) { diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java index 336f4889..79f655a7 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java @@ -15,6 +15,7 @@ import java.io.IOException; import java.io.Writer; import java.net.URL; +import java.net.URLClassLoader; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -22,7 +23,7 @@ public class ServerWrapperSetup { public ServerWrapperCommands commands; - public PublicURLClassLoader urlClassLoader; + public URLClassLoader urlClassLoader; public ServerWrapperSetup() throws IOException { commands = new ServerWrapperCommands(); @@ -37,7 +38,7 @@ public void run() throws Exception { String agentClassName; try (JarFile file = new JarFile(jarPath.toFile())) { URL jarURL = jarPath.toUri().toURL(); - urlClassLoader = new PublicURLClassLoader(new URL[]{jarURL}); + urlClassLoader = new URLClassLoader(new URL[]{jarURL}); LogHelper.info("Check server jar MainClass"); mainClassName = file.getManifest().getMainAttributes().getValue("Main-Class"); agentClassName = file.getManifest().getMainAttributes().getValue("Premain-Class"); From 449798d52bd46b64fd82238fef217bc76c0a6c5e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 29 Dec 2023 17:07:03 +0700 Subject: [PATCH 09/73] [FIX] ServerWrapper --- .../base/request/websockets/ClientJSONPoint.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java index 73f1d9dc..0cc63d33 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java @@ -1,6 +1,7 @@ package pro.gravit.launcher.base.request.websockets; import pro.gravit.launcher.base.Downloader; +import pro.gravit.launcher.core.LauncherInject; import pro.gravit.utils.helper.LogHelper; import javax.net.ssl.SSLException; @@ -19,6 +20,8 @@ import java.util.function.Consumer; public abstract class ClientJSONPoint implements WebSocket.Listener { + @LauncherInject("launcher.certificatePinning") + private static boolean isCertificatePinning; private static final AtomicInteger counter = new AtomicInteger(); private final URI uri; public boolean isClosed; @@ -49,8 +52,11 @@ public ClientJSONPoint(URI uri) { else port = 443; } else port = uri.getPort(); try { - httpClient = HttpClient.newBuilder() - .sslContext(Downloader.makeSSLContext()).build(); + var httpClientBuilder = HttpClient.newBuilder(); + if(isCertificatePinning) { + httpClientBuilder = httpClientBuilder.sslContext(Downloader.makeSSLContext()); + } + httpClient = httpClientBuilder.build(); webSocketBuilder = httpClient.newWebSocketBuilder().connectTimeout(Duration.ofSeconds(30)); } catch (NoSuchAlgorithmException | CertificateException | KeyStoreException | IOException | KeyManagementException e) { From 90f6d002d14a688bc3037685f803cb5921e2095e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:17:59 +0700 Subject: [PATCH 10/73] [FIX] Wayland support --- .../gravit/launcher/runtime/client/ClientLauncherProcess.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java index 0a378b19..001502ca 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java @@ -177,7 +177,7 @@ public void start(boolean pipeOutput) throws IOException, InterruptedException { var env = processBuilder.environment(); // https://github.com/Admicos/minecraft-wayland/issues/55 env.put("__GL_THREADED_OPTIMIZATIONS", "0"); - if(params.lwjglGlfwWayland) { + if(params.lwjglGlfwWayland && !params.profile.hasFlag(ClientProfile.CompatibilityFlags.WAYLAND_USE_CUSTOM_GLFW)) { env.remove("DISPLAY"); // No X11 } } From 8e82f5cd847d17b6ecd4941b93daa61b437e5751 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:15:29 +0700 Subject: [PATCH 11/73] [FEATURE][EXPERIMENTAL] Parse java args method --- .../pro/gravit/utils/helper/CommonHelper.java | 163 +++++++++++++++++- .../gravit/utils/launch/LaunchOptions.java | 5 +- 2 files changed, 160 insertions(+), 8 deletions(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java index 1d5d7ac9..a286c248 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/CommonHelper.java @@ -2,13 +2,11 @@ import com.google.gson.*; import pro.gravit.utils.command.CommandException; +import pro.gravit.utils.launch.LaunchOptions; import javax.script.ScriptEngine; import java.lang.reflect.Type; -import java.util.Base64; -import java.util.Collection; -import java.util.LinkedList; -import java.util.Locale; +import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -56,6 +54,21 @@ public static String replace(String source, String... params) { return source; } + public static String replace(Map replaceMap, String arg) { + for(var e : replaceMap.entrySet()) { + arg = arg.replace(e.getKey(), e.getValue()); + } + return arg; + } + + public static List replace(Map replaceMap, List args) { + List updatedList = new ArrayList<>(args.size()); + for(var e : args) { + updatedList.add(replace(replaceMap, e)); + } + return updatedList; + } + public static String[] parseCommand(CharSequence line) throws CommandException { boolean quoted = false; boolean wasQuoted = false; @@ -111,6 +124,148 @@ public static GsonBuilder newBuilder() { ByteArrayToBase64TypeAdapter.INSTANCE); } + + public static ArgsParseResult parseJavaArgs(List args) { + List classpath = new ArrayList<>(); + List jvmArgs = new ArrayList<>(); + List runArgs = new ArrayList<>(); + String jarFile = null; + String mainClass = null; + String mainModule = null; + LaunchOptions.ModuleConf conf = new LaunchOptions.ModuleConf(); + var prevArgType = PrevArgType.NONE; + boolean runArgsBoolean = false; + boolean first = false; + for(var arg : args) { + if(runArgsBoolean) { + runArgs.add(arg); + continue; + } + if(!first) { + if(!arg.startsWith("-")) { + continue; + } + first = true; + } + switch (prevArgType) { + case NONE -> { + + } + case MODULE_PATH -> { + char c = ':'; + int i = arg.indexOf(c); + if(i<0) { + c = ';'; + } + String[] l = arg.split(Character.toString(c)); + conf.modulePath.addAll(Arrays.asList(l)); + prevArgType = PrevArgType.NONE; + continue; + } + case CLASSPATH -> { + char c = ':'; + int i = arg.indexOf(c); + if(i<0) { + c = ';'; + } + String[] l = arg.split(Character.toString(c)); + classpath.addAll(Arrays.asList(l)); + prevArgType = PrevArgType.POST_CLASSPATH; + continue; + } + case ADD_MODULES -> { + String[] l = arg.split(","); + conf.modules.addAll(Arrays.asList(l)); + prevArgType = PrevArgType.NONE; + continue; + } + case ADD_OPENS -> { + String[] l = arg.split("="); + conf.opens.put(l[0], l[1]); + prevArgType = PrevArgType.NONE; + continue; + } + case ADD_EXPORTS -> { + String[] l = arg.split("="); + conf.exports.put(l[0], l[1]); + prevArgType = PrevArgType.NONE; + continue; + } + case ADD_READS -> { + String[] l = arg.split("="); + if(l.length != 2) { + continue; + } + conf.reads.put(l[0], l[1]); + prevArgType = PrevArgType.NONE; + continue; + } + case MODULE -> { + String[] l = arg.split("/"); + mainModule = l[0]; + mainClass = l[1]; + runArgsBoolean = true; + prevArgType = PrevArgType.NONE; + continue; + } + case POST_CLASSPATH -> { + mainClass = arg; + runArgsBoolean = true; + prevArgType = PrevArgType.NONE; + continue; + } + case JAR -> { + jarFile = arg; + runArgsBoolean = true; + prevArgType = PrevArgType.NONE; + continue; + } + } + if(arg.equals("--module-path") || arg.equals("-p")) { + prevArgType = PrevArgType.MODULE_PATH; + continue; + } + if(arg.equals("--classpath") || arg.equals("-cp")) { + prevArgType = PrevArgType.CLASSPATH; + continue; + } + if(arg.equals("--add-modules")) { + prevArgType = PrevArgType.ADD_MODULES; + continue; + } + if(arg.equals("--add-opens")) { + prevArgType = PrevArgType.ADD_OPENS; + continue; + } + if(arg.equals("--add-exports")) { + prevArgType = PrevArgType.ADD_EXPORTS; + continue; + } + if(arg.equals("--add-reads")) { + prevArgType = PrevArgType.ADD_READS; + continue; + } + if(arg.equals("--module") || arg.equals("-m")) { + prevArgType = PrevArgType.MODULE; + continue; + } + if(arg.equals("-jar")) { + prevArgType = PrevArgType.JAR; + continue; + } + jvmArgs.add(arg); + } + return new ArgsParseResult(conf, classpath, jvmArgs, mainClass, mainModule, jarFile, args); + } + + public record ArgsParseResult(LaunchOptions.ModuleConf conf, List classpath, List jvmArgs, String mainClass, String mainModule, String jarFile, List args) { + + } + + private enum PrevArgType { + NONE, MODULE_PATH, ADD_MODULES, ADD_OPENS, ADD_EXPORTS, ADD_READS, CLASSPATH, POST_CLASSPATH, JAR, MAINCLASS, MODULE; + } + private static class ByteArrayToBase64TypeAdapter implements JsonSerializer, JsonDeserializer { private static final ByteArrayToBase64TypeAdapter INSTANCE = new ByteArrayToBase64TypeAdapter(); private final Base64.Decoder decoder = Base64.getUrlDecoder(); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/launch/LaunchOptions.java b/LauncherCore/src/main/java/pro/gravit/utils/launch/LaunchOptions.java index fa95d0d8..ddabd56c 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/launch/LaunchOptions.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/launch/LaunchOptions.java @@ -1,9 +1,6 @@ package pro.gravit.utils.launch; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; public class LaunchOptions { public boolean enableHacks; From b3eb0ebb9805eb31771600f3c374c2b391bd6cad Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:18:15 +0700 Subject: [PATCH 12/73] [FIX] Support arch i586 in release file --- .../src/main/java/pro/gravit/utils/helper/JVMHelper.java | 2 +- .../src/main/java/pro/gravit/utils/helper/JavaHelper.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java index a7cdb354..ba1bbf85 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java @@ -46,7 +46,7 @@ private JVMHelper() { public static ARCH getArch(String arch) { if (arch.equals("amd64") || arch.equals("x86-64") || arch.equals("x86_64")) return ARCH.X86_64; - if (arch.equals("i386") || arch.equals("i686") || arch.equals("x86")) return ARCH.X86; + if (arch.equals("i386") || arch.equals("i586") || arch.equals("i686") || arch.equals("x86")) return ARCH.X86; if (arch.startsWith("armv8") || arch.startsWith("aarch64")) return ARCH.ARM64; if (arch.startsWith("arm") || arch.startsWith("aarch32")) return ARCH.ARM32; throw new InternalError(String.format("Unsupported arch '%s'", arch)); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java index 2bfb54cf..e73cec59 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java @@ -257,7 +257,6 @@ public static JavaVersion getByPath(Path jvmDir) { arch = JVMHelper.getArch(archProperty); } } catch (Throwable ignored) { - arch = null; } String modulesProperty = getProperty(properties, "MODULES"); if(modulesProperty != null) { From f1bc0ea28ab51db113bec265ddd640f5f467f210 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:59:15 +0700 Subject: [PATCH 13/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index ee11966e..0f9d89dd 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit ee11966e12eaa7de3b4dfe07c8425da5deee1f16 +Subproject commit 0f9d89dd2a0110e62f9ba6fa9f8cb5442c069b4b From 82bf2fdf56df308915186fb91223353d9f5a287e Mon Sep 17 00:00:00 2001 From: dima_dencep Date: Fri, 12 Jan 2024 16:02:02 +0700 Subject: [PATCH 14/73] [FIX] proguard (#694) --- .../components/ProGuardComponent.java | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java index 520a80f4..f30ab0b4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java @@ -9,21 +9,23 @@ import pro.gravit.utils.command.SubCommand; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; +import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; import pro.gravit.utils.helper.UnpackHelper; -import proguard.Configuration; -import proguard.ConfigurationParser; -import proguard.ProGuard; import java.io.*; +import java.nio.file.FileVisitOption; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.security.SecureRandom; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; @@ -191,7 +193,6 @@ public String getName() { public Path process(Path inputFile) throws IOException { Path outputJar = server.launcherBinary.nextLowerPath(this); if (component.enabled) { - Configuration proguard_cfg = new Configuration(); if (!checkJMods(IOHelper.JVM_DIR.resolve("jmods"))) { throw new RuntimeException("Java path: %s is not JDK! Please install JDK".formatted(IOHelper.JVM_DIR)); } @@ -204,12 +205,34 @@ public Path process(Path inputFile) throws IOException { } else { throw new RuntimeException("JavaFX jmods not found. May be install OpenJFX?"); } - ConfigurationParser parser = new ConfigurationParser(proguardConf.buildConfig(inputFile, outputJar, jfxPath == null ? new Path[0] : new Path[]{jfxPath}), - proguardConf.proguard.toFile(), System.getProperties()); try { - parser.parse(proguard_cfg); - ProGuard proGuard = new ProGuard(proguard_cfg); - proGuard.execute(); + List args = new ArrayList<>(); + args.add(IOHelper.resolveJavaBin(IOHelper.JVM_DIR).toAbsolutePath().toString()); + args.add("-cp"); + try(Stream files = Files.walk(Path.of("libraries"), FileVisitOption.FOLLOW_LINKS)) { + args.add(files + .filter(e -> e.getFileName().toString().endsWith(".jar")) + .map(path -> path.toAbsolutePath().toString()) + .collect(Collectors.joining(File.pathSeparator)) + ); + } + args.add("proguard.ProGuard"); + proguardConf.buildConfig(args, inputFile, outputJar, jfxPath == null ? new Path[0] : new Path[]{jfxPath}); + + Process process = new ProcessBuilder() + .command(args) + .inheritIO() + .directory(proguardConf.proguard.toFile()) + .start(); + + try { + process.waitFor(); + } catch (InterruptedException ignored) { + + } + if (process.exitValue() != 0) { + throw new RuntimeException("ProGuard process return %d".formatted(process.exitValue())); + } } catch (Exception e) { logger.error(e); } @@ -256,8 +279,7 @@ private static String generateString(SecureRandom rand, String lowString, String return sb.toString(); } - public String[] buildConfig(Path inputJar, Path outputJar, Path[] jfxPath) { - List confStrs = new ArrayList<>(); + public void buildConfig(List confStrs, Path inputJar, Path outputJar, Path[] jfxPath) { prepare(false); if (component.mappings) confStrs.add("-printmapping '" + mappings.toFile().getName() + "'"); @@ -279,7 +301,6 @@ public String[] buildConfig(Path inputJar, Path outputJar, Path[] jfxPath) { .forEach(confStrs::add); confStrs.add("-classobfuscationdictionary '" + words.toFile().getName() + "'"); confStrs.add("@".concat(config.toFile().getName())); - return confStrs.toArray(new String[0]); } private void genConfig(boolean force) throws IOException { From 4251725467713c011a4e1706232fb1e43917260a Mon Sep 17 00:00:00 2001 From: Gravit'a <12893402+gravit0@users.noreply.github.com> Date: Sat, 13 Jan 2024 18:42:42 +0700 Subject: [PATCH 15/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 0f9d89dd..00dc29cc 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 0f9d89dd2a0110e62f9ba6fa9f8cb5442c069b4b +Subproject commit 00dc29cc69b07fd79c9f17e5678fb9b4d00e7bc7 From f2b92c2bbd64681a72c7d409d79f55b82ad49fde Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 14 Jan 2024 17:21:58 +0700 Subject: [PATCH 16/73] [FIX] Update mirror link --- .../pro/gravit/launchserver/config/LaunchServerConfig.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 66b0aeee..7c23e551 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -27,7 +27,9 @@ import static java.util.concurrent.TimeUnit.SECONDS; public final class LaunchServerConfig { - private final static List oldMirrorList = List.of("https://mirror.gravit.pro/5.2.x/", "https://mirror.gravit.pro/5.3.x/", "https://mirror.gravitlauncher.com/5.2.x/", "https://mirror.gravitlauncher.com/5.3.x/", "https://mirror.gravitlauncher.com/5.4.x/"); + private final static List oldMirrorList = List.of("https://mirror.gravit.pro/5.2.x/", "https://mirror.gravit.pro/5.3.x/", + "https://mirror.gravitlauncher.com/5.2.x/", "https://mirror.gravitlauncher.com/5.3.x/", "https://mirror.gravitlauncher.com/5.4.x/", + "https://mirror.gravitlauncher.com/5.5.x/"); private transient final Logger logger = LogManager.getLogger(); public String projectName; public String[] mirrors; @@ -49,7 +51,7 @@ public final class LaunchServerConfig { public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { LaunchServerConfig newConfig = new LaunchServerConfig(); - newConfig.mirrors = new String[]{"https://mirror.gravitlauncher.com/5.5.x/", "https://gravit-launcher-mirror.storage.googleapis.com/"}; + newConfig.mirrors = new String[]{"https://mirror.gravitlauncher.com/5.6.x/", "https://gravit-launcher-mirror.storage.googleapis.com/"}; newConfig.launch4j = new LaunchServerConfig.ExeConf(); newConfig.launch4j.enabled = false; newConfig.launch4j.copyright = "© GravitLauncher Team"; From efe967587c48f71edb7bc677bf623e14523c4f79 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 14 Jan 2024 17:25:55 +0700 Subject: [PATCH 17/73] [FIX] Finally remove launch4j --- .../pro/gravit/launchserver/LaunchServer.java | 9 +---- .../binary/EXEL4JLauncherBinary.java | 17 --------- .../binary/tasks/exe/Launch4JTask.java | 38 ------------------- .../config/LaunchServerConfig.java | 34 ----------------- 4 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/binary/EXEL4JLauncherBinary.java delete mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 17264082..f1ffda57 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -9,7 +9,6 @@ import pro.gravit.launcher.base.profiles.ClientProfile; import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.RejectAuthCoreProvider; -import pro.gravit.launchserver.binary.EXEL4JLauncherBinary; import pro.gravit.launchserver.binary.EXELauncherBinary; import pro.gravit.launchserver.binary.JARLauncherBinary; import pro.gravit.launchserver.binary.LauncherBinary; @@ -299,12 +298,6 @@ private LauncherBinary binary() { if(event.binary != null) { return event.binary; } - try { - Class.forName("net.sf.launch4j.Builder"); - if (config.launch4j.enabled) return new EXEL4JLauncherBinary(this); - } catch (ClassNotFoundException ignored) { - logger.warn("Launch4J isn't in classpath."); - } return new EXELauncherBinary(this); } @@ -392,7 +385,7 @@ public void syncLauncherBinaries() throws IOException { // Syncing launcher EXE binary logger.info("Syncing launcher EXE binary file"); - if (!launcherEXEBinary.sync() && config.launch4j.enabled) + if (!launcherEXEBinary.sync()) logger.warn("Missing launcher EXE binary file"); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/EXEL4JLauncherBinary.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/EXEL4JLauncherBinary.java deleted file mode 100644 index 26a2b457..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/EXEL4JLauncherBinary.java +++ /dev/null @@ -1,17 +0,0 @@ -package pro.gravit.launchserver.binary; - -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.binary.tasks.exe.Launch4JTask; - -public final class EXEL4JLauncherBinary extends LauncherBinary { - - - public EXEL4JLauncherBinary(LaunchServer server) { - super(server, LauncherBinary.resolve(server, ".exe"), "Launcher-%s.exe"); - } - - @Override - public void init() { - tasks.add(new Launch4JTask(server)); - } -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java deleted file mode 100644 index f9390719..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/exe/Launch4JTask.java +++ /dev/null @@ -1,38 +0,0 @@ -package pro.gravit.launchserver.binary.tasks.exe; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.binary.tasks.LauncherBuildTask; -import pro.gravit.utils.Version; - -import java.io.IOException; -import java.nio.file.Path; - -public class Launch4JTask implements LauncherBuildTask, BuildExeMainTask { - public static final String DOWNLOAD_URL = "https://bell-sw.com/pages/downloads/?version=java-8-lts&os=Windows&package=jre-full"; // BellSoft - private static final String VERSION = Version.getVersion().getVersionString(); - private static final int BUILD = Version.getVersion().build; - private final Path faviconFile; - private final LaunchServer server; - private transient final Logger logger = LogManager.getLogger(); - - public Launch4JTask(LaunchServer launchServer) { - this.server = launchServer; - faviconFile = launchServer.dir.resolve("favicon.ico"); - } - - public static String formatVars(String mask) { - return mask.formatted(VERSION, BUILD); - } - - @Override - public String getName() { - return "launch4j"; - } - - @Override - public Path process(Path inputFile) throws IOException { - throw new UnsupportedOperationException("Launch4j not supported"); - } -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 7c23e551..f3fcfd8d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -12,12 +12,10 @@ import pro.gravit.launchserver.auth.protect.ProtectHandler; import pro.gravit.launchserver.auth.protect.StdProtectHandler; import pro.gravit.launchserver.auth.texture.RequestTextureProvider; -import pro.gravit.launchserver.binary.tasks.exe.Launch4JTask; import pro.gravit.launchserver.components.AuthLimiterComponent; import pro.gravit.launchserver.components.Component; import pro.gravit.launchserver.components.ProGuardComponent; import pro.gravit.launchserver.components.RegLimiterComponent; -import pro.gravit.utils.Version; import pro.gravit.utils.helper.JVMHelper; import java.io.File; @@ -41,7 +39,6 @@ public final class LaunchServerConfig { // Handlers & Providers public ProtectHandler protectHandler; public Map components; - public ExeConf launch4j; public NettyConfig netty; public LauncherConf launcher; public JarSignerConf sign; @@ -52,18 +49,6 @@ public final class LaunchServerConfig { public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { LaunchServerConfig newConfig = new LaunchServerConfig(); newConfig.mirrors = new String[]{"https://mirror.gravitlauncher.com/5.6.x/", "https://gravit-launcher-mirror.storage.googleapis.com/"}; - newConfig.launch4j = new LaunchServerConfig.ExeConf(); - newConfig.launch4j.enabled = false; - newConfig.launch4j.copyright = "© GravitLauncher Team"; - newConfig.launch4j.fileDesc = "GravitLauncher ".concat(Version.getVersion().getVersionString()); - newConfig.launch4j.fileVer = Version.getVersion().getVersionString().concat(".").concat(String.valueOf(Version.getVersion().patch)); - newConfig.launch4j.internalName = "Launcher"; - newConfig.launch4j.trademarks = "This product is licensed under GPLv3"; - newConfig.launch4j.txtFileVersion = "%s, build %d"; - newConfig.launch4j.txtProductVersion = "%s, build %d"; - newConfig.launch4j.productName = "GravitLauncher"; - newConfig.launch4j.productVer = newConfig.launch4j.fileVer; - newConfig.launch4j.maxVersion = "99.0.0"; newConfig.env = LauncherConfig.LauncherEnvironment.STD; newConfig.startScript = JVMHelper.OS_TYPE.equals(JVMHelper.OS.MUSTDIE) ? "." + File.separator + "start.bat" : "." + File.separator + "start.sh"; newConfig.auth = new HashMap<>(); @@ -232,25 +217,6 @@ public void close(LaunchServer.ReloadType type) { } } - public static class ExeConf { - public boolean enabled; - public boolean setMaxVersion; - public String maxVersion; - public String minVersion = "17.0.0"; - public String supportURL = null; - public String downloadUrl = Launch4JTask.DOWNLOAD_URL; - public String productName; - public String productVer; - public String fileDesc; - public String fileVer; - public String internalName; - public String copyright; - public String trademarks; - - public String txtFileVersion; - public String txtProductVersion; - } - public static class JarSignerConf { public boolean enabled = false; public String keyStore = "pathToKey"; From f1922c52e2a8601cd6269cf42856163852347134 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Thu, 18 Jan 2024 00:13:36 +0700 Subject: [PATCH 18/73] [FEATURE] Add ProGuard jvmArgs --- .../gravit/launchserver/components/ProGuardComponent.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java index f30ab0b4..ee92b7e0 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java @@ -34,6 +34,7 @@ public class ProGuardComponent extends Component implements AutoCloseable, Recon private static final Logger logger = LogManager.getLogger(); public String modeAfter = "MainBuild"; public String dir = "proguard"; + public List jvmArgs = new ArrayList<>(); public boolean enabled = true; public boolean mappings = true; public transient ProguardConf proguardConf; @@ -41,6 +42,10 @@ public class ProGuardComponent extends Component implements AutoCloseable, Recon private transient ProGuardBuildTask buildTask; private transient ProGuardMultiReleaseFixer fixerTask; + public ProGuardComponent() { + this.jvmArgs.add("-Xmx512M"); + } + public static boolean checkFXJMods(Path path) { if (!IOHelper.exists(path.resolve("javafx.base.jmod"))) return false; @@ -208,6 +213,7 @@ public Path process(Path inputFile) throws IOException { try { List args = new ArrayList<>(); args.add(IOHelper.resolveJavaBin(IOHelper.JVM_DIR).toAbsolutePath().toString()); + args.addAll(component.jvmArgs); args.add("-cp"); try(Stream files = Files.walk(Path.of("libraries"), FileVisitOption.FOLLOW_LINKS)) { args.add(files From 2fdd7d0199aa07e037f87c55793bcdbb403cb1e2 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:11:33 +0700 Subject: [PATCH 19/73] [FIX] Slf4j fix --- .../pro/gravit/launchserver/config/LaunchServerConfig.java | 4 ++-- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 4 ++-- .../src/main/java/pro/gravit/utils/helper/LogHelper.java | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index f3fcfd8d..be906d4a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -158,8 +158,8 @@ public void verify() { if (!updateMirror) { for (int i = 0; i < mirrors.length; ++i) { if (mirrors[i] != null && oldMirrorList.contains(mirrors[i])) { - logger.warn("Replace mirror '{}' to 'https://mirror.gravitlauncher.com/5.5.x/'. If you really need to use original url, use '-Dlaunchserver.config.disableUpdateMirror=true'", mirrors[i]); - mirrors[i] = "https://mirror.gravitlauncher.com/5.5.x/"; + logger.warn("Replace mirror '{}' to 'https://mirror.gravitlauncher.com/5.6.x/'. If you really need to use original url, use '-Dlaunchserver.config.disableUpdateMirror=true'", mirrors[i]); + mirrors[i] = "https://mirror.gravitlauncher.com/5.6.x/"; } } } diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index db44d40f..62fb4e33 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -5,8 +5,8 @@ public final class Version implements Comparable { public static final int MAJOR = 5; - public static final int MINOR = 5; - public static final int PATCH = 3; + public static final int MINOR = 6; + public static final int PATCH = 0; public static final int BUILD = 1; public static final Version.Type RELEASE = Type.EXPERIMENTAL; public final int major; diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java index 36d6b00b..9ba2af43 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java @@ -31,7 +31,6 @@ public final class LogHelper { boolean useSlf4j = false; try { Class.forName("org.slf4j.Logger", false, LogHelper.class.getClassLoader()); - Class.forName("org.slf4j.impl.StaticLoggerBinder", false, LogHelper.class.getClassLoader()); useSlf4j = !Boolean.getBoolean(NO_SLF4J_PROPERTY); } catch (ClassNotFoundException ignored) { } From b7b7afbdbbd42c25492d51f0ed852a9f25c5631c Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:11:48 +0700 Subject: [PATCH 20/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 00dc29cc..d783e9ad 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 00dc29cc69b07fd79c9f17e5678fb9b4d00e7bc7 +Subproject commit d783e9adb9bbbe072e4dd78c6e15a85b27fab446 From c9ccf362527adac329ad0d7d4a0cfb028688f29a Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:34:53 +0700 Subject: [PATCH 21/73] [ANY] Remove reg limiter --- .../launchserver/components/Component.java | 1 - .../components/RegLimiterComponent.java | 34 ------------------- .../config/LaunchServerConfig.java | 6 ---- .../manangers/hook/AuthHookManager.java | 15 -------- 4 files changed, 56 deletions(-) delete mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/Component.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/Component.java index 5eb20ad1..857fce51 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/Component.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/Component.java @@ -11,7 +11,6 @@ public abstract class Component { public static void registerComponents() { if (!registredComp) { providers.register("authLimiter", AuthLimiterComponent.class); - providers.register("regLimiter", RegLimiterComponent.class); providers.register("commandRemover", CommandRemoverComponent.class); providers.register("proguard", ProGuardComponent.class); providers.register("whitelist", WhitelistComponent.class); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java deleted file mode 100644 index 7452c560..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/RegLimiterComponent.java +++ /dev/null @@ -1,34 +0,0 @@ -package pro.gravit.launchserver.components; - -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.manangers.hook.AuthHookManager; -import pro.gravit.utils.HookException; - -import java.util.ArrayList; -import java.util.List; - -public class RegLimiterComponent extends IPLimiter implements AutoCloseable { - - public transient LaunchServer launchServer; - public String message; - - public List excludeIps = new ArrayList<>(); - - @Override - public void init(LaunchServer launchServer) { - this.launchServer = launchServer; - launchServer.authHookManager.registraion.registerHook(this::registerHook); - } - - public boolean registerHook(AuthHookManager.RegContext context) { - if (!check(context.ip)) { - throw new HookException(message); - } - return false; - } - - @Override - public void close() { - launchServer.authHookManager.registraion.unregisterHook(this::registerHook); - } -} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index be906d4a..42d63bbc 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -15,7 +15,6 @@ import pro.gravit.launchserver.components.AuthLimiterComponent; import pro.gravit.launchserver.components.Component; import pro.gravit.launchserver.components.ProGuardComponent; -import pro.gravit.launchserver.components.RegLimiterComponent; import pro.gravit.utils.helper.JVMHelper; import java.io.File; @@ -87,11 +86,6 @@ public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { authLimiterComponent.rateLimitMillis = SECONDS.toMillis(8); authLimiterComponent.message = "Превышен лимит авторизаций"; newConfig.components.put("authLimiter", authLimiterComponent); - RegLimiterComponent regLimiterComponent = new RegLimiterComponent(); - regLimiterComponent.rateLimit = 3; - regLimiterComponent.rateLimitMillis = HOURS.toMillis(10); - regLimiterComponent.message = "Превышен лимит регистраций"; - newConfig.components.put("regLimiter", regLimiterComponent); ProGuardComponent proGuardComponent = new ProGuardComponent(); newConfig.components.put("proguard", proGuardComponent); return newConfig; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java index 8148e975..fcaaf91a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java @@ -16,19 +16,4 @@ public class AuthHookManager { public final BiHookSet postCheckServerHook = new BiHookSet<>(); public final BiHookSet joinServerHook = new BiHookSet<>(); public final BiHookSet setProfileHook = new BiHookSet<>(); - public final HookSet registraion = new HookSet<>(); - - public static class RegContext { - public final String login; - public final String password; - public final String ip; - public final boolean trustContext; - - public RegContext(String login, String password, String ip, boolean trustContext) { - this.login = login; - this.password = password; - this.ip = ip; - this.trustContext = trustContext; - } - } } From 0c754ae5e6e0ed58dd3da861c60cb40ffc15c27e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:35:54 +0700 Subject: [PATCH 22/73] [FIX] Remove legacy manifest attributes --- LaunchServer/build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 1439c426..4663ce50 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -37,9 +37,6 @@ manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, "Multi-Release": "true", - "Can-Redefine-Classes": "true", - "Can-Retransform-Classes": "true", - "Can-Set-Native-Method-Prefix": "true" ) } From a0788e46238ede4e4a449d50e9605386a23b70cb Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:44:19 +0700 Subject: [PATCH 23/73] [FIX] Remove legacy launch4j in build.gradle --- LaunchServer/build.gradle | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index 4663ce50..6743d5ec 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -112,27 +112,9 @@ pack project(':LauncherAPI') from configurations.hikari } -tasks.register('launch4j', Copy) { - duplicatesStrategy = 'EXCLUDE' - into "$buildDir/libs/libraries/launch4j" - from(configurations.launch4j.collect { - it.isDirectory() ? it : ((it.getName().startsWith("launch4j") && it.getName().contains("workdir")) ? zipTree(it) : it) - }) - includeEmptyDirs false - eachFile { FileCopyDetails fcp -> - if (fcp.relativePath.pathString.startsWith("launch4j-") && - fcp.relativePath.pathString.contains("workdir")) { - def segments = fcp.relativePath.segments - def pathSegments = segments[1..-1] as String[] - fcp.relativePath = new RelativePath(!fcp.file.isDirectory(), pathSegments) - } else if (fcp.relativePath.pathString.contains("META-INF")) fcp.exclude() - fcp.mode = 0755 - } -} - tasks.register('dumpLibs', Copy) { duplicatesStrategy = 'EXCLUDE' - dependsOn tasks.hikari, tasks.launch4j + dependsOn tasks.hikari into "$buildDir/libs/libraries" from configurations.bundleOnly } From 7060697bad2a4d9ada2fe8e09462d31c4c5b4146 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 3 Feb 2024 17:08:07 +0700 Subject: [PATCH 24/73] [FEATURE] Support virtual threads and client locks --- .../pro/gravit/launchserver/LaunchServer.java | 20 ---- .../launchserver/LaunchServerBuilder.java | 44 +++---- .../launchserver/LaunchServerStarter.java | 112 ++++++++++-------- .../gravit/launchserver/command/Command.java | 3 + .../command/basic/RestartCommand.java | 25 ---- .../command/handler/CommandHandler.java | 18 +-- .../{hash => sync}/SyncBinariesCommand.java | 2 +- .../command/sync/SyncCommand.java | 30 +++++ .../sync}/SyncLauncherModulesCommand.java | 16 +-- .../{hash => sync}/SyncProfilesCommand.java | 2 +- .../command/{hash => sync}/SyncUPCommand.java | 2 +- .../{hash => sync}/SyncUpdatesCommand.java | 2 +- .../{service => tools}/SignDirCommand.java | 2 +- .../{service => tools}/SignJarCommand.java | 2 +- .../config/LaunchServerConfig.java | 8 +- .../launchermodules/LauncherModuleLoader.java | 1 - .../gravit/launchserver/socket/Client.java | 3 + .../launchserver/socket/WebSocketService.java | 45 ++++++- .../response/WebSocketServerResponse.java | 8 ++ .../main/resources/experimental-build.json | 4 +- .../pro/gravit/launcher/base/Downloader.java | 17 +++ 21 files changed, 222 insertions(+), 144 deletions(-) delete mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/RestartCommand.java rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{hash => sync}/SyncBinariesCommand.java (94%) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java rename LaunchServer/src/main/java/pro/gravit/launchserver/{launchermodules => command/sync}/SyncLauncherModulesCommand.java (63%) rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{hash => sync}/SyncProfilesCommand.java (94%) rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{hash => sync}/SyncUPCommand.java (94%) rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{hash => sync}/SyncUpdatesCommand.java (95%) rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{service => tools}/SignDirCommand.java (97%) rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{service => tools}/SignJarCommand.java (97%) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index f1ffda57..9c09cb40 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -422,21 +422,6 @@ public void syncUpdatesDir(Collection dirs) throws IOException { updatesManager.syncUpdatesDir(dirs); } - public void restart() { - ProcessBuilder builder = new ProcessBuilder(); - if (config.startScript != null) builder.command(Collections.singletonList(config.startScript)); - else throw new IllegalArgumentException("Please create start script and link it as startScript in config."); - builder.directory(this.dir.toFile()); - builder.inheritIO(); - builder.redirectErrorStream(true); - builder.redirectOutput(Redirect.PIPE); - try { - builder.start(); - } catch (IOException e) { - logger.error("Restart failed", e); - } - } - public void registerObject(String name, Object object) { if (object instanceof Reconfigurable) { reconfigurableManager.registerReconfigurable(name, (Reconfigurable) object); @@ -449,11 +434,6 @@ public void unregisterObject(String name, Object object) { } } - public void fullyRestart() { - restart(); - JVMHelper.RUNTIME.exit(0); - } - public enum ReloadType { NO_AUTH, diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java index 20d32a2c..ee7de119 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java @@ -63,27 +63,7 @@ public LaunchServerBuilder setLaunchServerConfigManager(LaunchServer.LaunchServe public LaunchServer build() throws Exception { directories.collect(); if (launchServerConfigManager == null) { - launchServerConfigManager = new LaunchServer.LaunchServerConfigManager() { - @Override - public LaunchServerConfig readConfig() { - throw new UnsupportedOperationException(); - } - - @Override - public LaunchServerRuntimeConfig readRuntimeConfig() { - throw new UnsupportedOperationException(); - } - - @Override - public void writeConfig(LaunchServerConfig config) { - throw new UnsupportedOperationException(); - } - - @Override - public void writeRuntimeConfig(LaunchServerRuntimeConfig config) { - throw new UnsupportedOperationException(); - } - }; + launchServerConfigManager = new NullLaunchServerConfigManager(); } if (keyAgreementManager == null) { keyAgreementManager = new KeyAgreementManager(directories.keyDirectory); @@ -99,4 +79,26 @@ public LaunchServerBuilder setCertificateManager(CertificateManager certificateM public void setKeyAgreementManager(KeyAgreementManager keyAgreementManager) { this.keyAgreementManager = keyAgreementManager; } + + private static class NullLaunchServerConfigManager implements LaunchServer.LaunchServerConfigManager { + @Override + public LaunchServerConfig readConfig() { + throw new UnsupportedOperationException(); + } + + @Override + public LaunchServerRuntimeConfig readRuntimeConfig() { + throw new UnsupportedOperationException(); + } + + @Override + public void writeConfig(LaunchServerConfig config) { + throw new UnsupportedOperationException(); + } + + @Override + public void writeRuntimeConfig(LaunchServerRuntimeConfig config) { + throw new UnsupportedOperationException(); + } + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java index 865cd674..addab8f3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java @@ -122,57 +122,7 @@ public static void main(String[] args) throws Exception { } } - LaunchServer.LaunchServerConfigManager launchServerConfigManager = new LaunchServer.LaunchServerConfigManager() { - @Override - public LaunchServerConfig readConfig() throws IOException { - LaunchServerConfig config1; - try (BufferedReader reader = IOHelper.newReader(configFile)) { - config1 = Launcher.gsonManager.gson.fromJson(reader, LaunchServerConfig.class); - } - return config1; - } - - @Override - public LaunchServerRuntimeConfig readRuntimeConfig() throws IOException { - LaunchServerRuntimeConfig config1; - try (BufferedReader reader = IOHelper.newReader(runtimeConfigFile)) { - config1 = Launcher.gsonManager.gson.fromJson(reader, LaunchServerRuntimeConfig.class); - } - return config1; - } - - @Override - public void writeConfig(LaunchServerConfig config) throws IOException { - ByteArrayOutputStream output = new ByteArrayOutputStream(); - try (Writer writer = IOHelper.newWriter(output)) { - if (Launcher.gsonManager.configGson != null) { - Launcher.gsonManager.configGson.toJson(config, writer); - } else { - logger.error("Error writing LaunchServer config file. Gson is null"); - } - } - byte[] bytes = output.toByteArray(); - if(bytes.length > 0) { - IOHelper.write(configFile, bytes); - } - } - - @Override - public void writeRuntimeConfig(LaunchServerRuntimeConfig config) throws IOException { - ByteArrayOutputStream output = new ByteArrayOutputStream(); - try (Writer writer = IOHelper.newWriter(output)) { - if (Launcher.gsonManager.configGson != null) { - Launcher.gsonManager.configGson.toJson(config, writer); - } else { - logger.error("Error writing LaunchServer runtime config file. Gson is null"); - } - } - byte[] bytes = output.toByteArray(); - if(bytes.length > 0) { - IOHelper.write(runtimeConfigFile, bytes); - } - } - }; + LaunchServer.LaunchServerConfigManager launchServerConfigManager = new BasicLaunchServerConfigManager(configFile, runtimeConfigFile); LaunchServer.LaunchServerDirectories directories = new LaunchServer.LaunchServerDirectories(); directories.dir = dir; LaunchServer server = new LaunchServerBuilder() @@ -284,4 +234,64 @@ public static void generateConfigIfNotExists(Path configFile, CommandHandler com Launcher.gsonManager.configGson.toJson(newConfig, writer); } } + + private static class BasicLaunchServerConfigManager implements LaunchServer.LaunchServerConfigManager { + private final Path configFile; + private final Path runtimeConfigFile; + + public BasicLaunchServerConfigManager(Path configFile, Path runtimeConfigFile) { + this.configFile = configFile; + this.runtimeConfigFile = runtimeConfigFile; + } + + @Override + public LaunchServerConfig readConfig() throws IOException { + LaunchServerConfig config1; + try (BufferedReader reader = IOHelper.newReader(configFile)) { + config1 = Launcher.gsonManager.gson.fromJson(reader, LaunchServerConfig.class); + } + return config1; + } + + @Override + public LaunchServerRuntimeConfig readRuntimeConfig() throws IOException { + LaunchServerRuntimeConfig config1; + try (BufferedReader reader = IOHelper.newReader(runtimeConfigFile)) { + config1 = Launcher.gsonManager.gson.fromJson(reader, LaunchServerRuntimeConfig.class); + } + return config1; + } + + @Override + public void writeConfig(LaunchServerConfig config) throws IOException { + ByteArrayOutputStream output = new ByteArrayOutputStream(); + try (Writer writer = IOHelper.newWriter(output)) { + if (Launcher.gsonManager.configGson != null) { + Launcher.gsonManager.configGson.toJson(config, writer); + } else { + logger.error("Error writing LaunchServer config file. Gson is null"); + } + } + byte[] bytes = output.toByteArray(); + if(bytes.length > 0) { + IOHelper.write(configFile, bytes); + } + } + + @Override + public void writeRuntimeConfig(LaunchServerRuntimeConfig config) throws IOException { + ByteArrayOutputStream output = new ByteArrayOutputStream(); + try (Writer writer = IOHelper.newWriter(output)) { + if (Launcher.gsonManager.configGson != null) { + Launcher.gsonManager.configGson.toJson(config, writer); + } else { + logger.error("Error writing LaunchServer runtime config file. Gson is null"); + } + } + byte[] bytes = output.toByteArray(); + if(bytes.length > 0) { + IOHelper.write(runtimeConfigFile, bytes); + } + } + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java index fcf67b0f..87d27f25 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/Command.java @@ -47,6 +47,9 @@ protected boolean showApplyDialog(String text) throws IOException { protected Downloader downloadWithProgressBar(String taskName, List list, String baseUrl, Path targetDir) throws Exception { long total = 0; for (Downloader.SizedFile file : list) { + if(file.size < 0) { + continue; + } total += file.size; } long totalFiles = list.size(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/RestartCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/RestartCommand.java deleted file mode 100644 index 5c84d09b..00000000 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/RestartCommand.java +++ /dev/null @@ -1,25 +0,0 @@ -package pro.gravit.launchserver.command.basic; - -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.command.Command; - -public final class RestartCommand extends Command { - public RestartCommand(LaunchServer server) { - super(server); - } - - @Override - public String getArgsDescription() { - return null; - } - - @Override - public String getUsageDescription() { - return "Restart LaunchServer"; - } - - @Override - public void invoke(String... args) { - server.fullyRestart(); - } -} \ No newline at end of file diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java index 1f3e41ac..c369e0a5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java @@ -6,6 +6,9 @@ import pro.gravit.launchserver.command.modules.LoadModuleCommand; import pro.gravit.launchserver.command.modules.ModulesCommand; import pro.gravit.launchserver.command.service.*; +import pro.gravit.launchserver.command.sync.*; +import pro.gravit.launchserver.command.tools.SignDirCommand; +import pro.gravit.launchserver.command.tools.SignJarCommand; import pro.gravit.utils.command.BaseCommandCategory; import pro.gravit.utils.command.basic.ClearCommand; import pro.gravit.utils.command.basic.GCCommand; @@ -19,7 +22,6 @@ public static void registerCommands(pro.gravit.utils.command.CommandHandler hand basic.registerCommand("version", new VersionCommand(server)); basic.registerCommand("build", new BuildCommand(server)); basic.registerCommand("stop", new StopCommand(server)); - basic.registerCommand("restart", new RestartCommand(server)); basic.registerCommand("debug", new DebugCommand(server)); basic.registerCommand("clear", new ClearCommand(handler)); basic.registerCommand("gc", new GCCommand()); @@ -34,10 +36,7 @@ public static void registerCommands(pro.gravit.utils.command.CommandHandler hand updates.registerCommand("unindexAsset", new UnindexAssetCommand(server)); updates.registerCommand("downloadAsset", new DownloadAssetCommand(server)); updates.registerCommand("downloadClient", new DownloadClientCommand(server)); - updates.registerCommand("syncBinaries", new SyncBinariesCommand(server)); - updates.registerCommand("syncUpdates", new SyncUpdatesCommand(server)); - updates.registerCommand("syncProfiles", new SyncProfilesCommand(server)); - updates.registerCommand("syncUP", new SyncUPCommand(server)); + updates.registerCommand("sync", new SyncCommand(server)); updates.registerCommand("saveProfiles", new SaveProfilesCommand(server)); updates.registerCommand("makeProfile", new MakeProfileCommand(server)); Category updatesCategory = new Category(updates, "updates", "Update and Sync Management"); @@ -50,11 +49,16 @@ public static void registerCommands(pro.gravit.utils.command.CommandHandler hand service.registerCommand("notify", new NotifyCommand(server)); service.registerCommand("component", new ComponentCommand(server)); service.registerCommand("clients", new ClientsCommand(server)); - service.registerCommand("signJar", new SignJarCommand(server)); - service.registerCommand("signDir", new SignDirCommand(server)); service.registerCommand("securitycheck", new SecurityCheckCommand(server)); service.registerCommand("token", new TokenCommand(server)); Category serviceCategory = new Category(service, "service", "Managing LaunchServer Components"); handler.registerCategory(serviceCategory); + + //Register tools commands + BaseCommandCategory tools = new BaseCommandCategory(); + tools.registerCommand("signJar", new SignJarCommand(server)); + tools.registerCommand("signDir", new SignDirCommand(server)); + Category toolsCategory = new Category(tools, "tools", "Other tools"); + handler.registerCategory(toolsCategory); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncBinariesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncBinariesCommand.java similarity index 94% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncBinariesCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncBinariesCommand.java index 487ee7f7..9997b520 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncBinariesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncBinariesCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.hash; +package pro.gravit.launchserver.command.sync; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java new file mode 100644 index 00000000..f645eaaa --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java @@ -0,0 +1,30 @@ +package pro.gravit.launchserver.command.sync; + +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; + +public class SyncCommand extends Command { + public SyncCommand(LaunchServer server) { + super(server); + this.childCommands.put("profiles", new SyncProfilesCommand(server)); + this.childCommands.put("binaries", new SyncBinariesCommand(server)); + this.childCommands.put("updates", new SyncUpdatesCommand(server)); + this.childCommands.put("up", new SyncUPCommand(server)); + this.childCommands.put("launchermodules", new SyncLauncherModulesCommand(server)); + } + + @Override + public String getArgsDescription() { + return "[updates/profiles/up/binaries/launchermodules] [args...]"; + } + + @Override + public String getUsageDescription() { + return "sync specified objects"; + } + + @Override + public void invoke(String... args) throws Exception { + invokeSubcommands(args); + } +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/SyncLauncherModulesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncLauncherModulesCommand.java similarity index 63% rename from LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/SyncLauncherModulesCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncLauncherModulesCommand.java index 290979d8..6831bf9a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/SyncLauncherModulesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncLauncherModulesCommand.java @@ -1,31 +1,31 @@ -package pro.gravit.launchserver.launchermodules; +package pro.gravit.launchserver.command.sync; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import pro.gravit.utils.command.Command; +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; public class SyncLauncherModulesCommand extends Command { - private final LauncherModuleLoader mod; private transient final Logger logger = LogManager.getLogger(); - public SyncLauncherModulesCommand(LauncherModuleLoader mod) { - this.mod = mod; + public SyncLauncherModulesCommand(LaunchServer server) { + super(server); } @Override public String getArgsDescription() { - return "Resync launcher modules"; + return null; } @Override public String getUsageDescription() { - return "[]"; + return "Resync launcher modules"; } @Override public void invoke(String... args) throws Exception { - mod.syncModules(); + server.launcherModuleLoader.syncModules(); logger.info("Launcher Modules synced"); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncProfilesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncProfilesCommand.java similarity index 94% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncProfilesCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncProfilesCommand.java index d0e2f718..615036c3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncProfilesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncProfilesCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.hash; +package pro.gravit.launchserver.command.sync; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncUPCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUPCommand.java similarity index 94% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncUPCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUPCommand.java index cf1bb2b2..b82a9460 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncUPCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUPCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.hash; +package pro.gravit.launchserver.command.sync; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncUpdatesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUpdatesCommand.java similarity index 95% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncUpdatesCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUpdatesCommand.java index af30a328..1b294c97 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SyncUpdatesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUpdatesCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.hash; +package pro.gravit.launchserver.command.sync; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignDirCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/tools/SignDirCommand.java similarity index 97% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignDirCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/tools/SignDirCommand.java index 17a77710..09f5b1f4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignDirCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/tools/SignDirCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.service; +package pro.gravit.launchserver.command.tools; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignJarCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/tools/SignJarCommand.java similarity index 97% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignJarCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/tools/SignJarCommand.java index ecdfdf7f..ed2d0536 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignJarCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/tools/SignJarCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.service; +package pro.gravit.launchserver.command.tools; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 42d63bbc..82598844 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -41,7 +41,6 @@ public final class LaunchServerConfig { public NettyConfig netty; public LauncherConf launcher; public JarSignerConf sign; - public String startScript; private transient LaunchServer server = null; private transient AuthProviderPair authDefault; @@ -49,7 +48,6 @@ public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { LaunchServerConfig newConfig = new LaunchServerConfig(); newConfig.mirrors = new String[]{"https://mirror.gravitlauncher.com/5.6.x/", "https://gravit-launcher-mirror.storage.googleapis.com/"}; newConfig.env = LauncherConfig.LauncherEnvironment.STD; - newConfig.startScript = JVMHelper.OS_TYPE.equals(JVMHelper.OS.MUSTDIE) ? "." + File.separator + "start.bat" : "." + File.separator + "start.sh"; newConfig.auth = new HashMap<>(); AuthProviderPair a = new AuthProviderPair(new RejectAuthCoreProvider(), new RequestTextureProvider("http://example.com/skins/%username%.png", "http://example.com/cloaks/%username%.png") @@ -263,6 +261,12 @@ public static class NettyPerformanceConfig { public int workerThread; public int schedulerThread; public int maxWebSocketRequestBytes = 1024 * 1024; + public boolean disableThreadSafeClientObject; + public NettyExecutorType executorType = NettyExecutorType.VIRTUAL_THREADS; + + public enum NettyExecutorType { + NONE, DEFAULT, WORK_STEAL, VIRTUAL_THREADS + } } public static class NettyBindAddress { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java index eb6ddcaf..f50945a5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/launchermodules/LauncherModuleLoader.java @@ -44,7 +44,6 @@ public void init() { logger.error(e); } } - server.commandHandler.registerCommand("syncLauncherModules", new SyncLauncherModulesCommand(this)); MainBuildTask mainTask = server.launcherBinary.getTaskByClass(MainBuildTask.class).get(); mainTask.preBuildHook.registerHook((buildContext) -> { for (ModuleEntity e : launcherModules) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java index b91c50f4..41b99f05 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java @@ -10,8 +10,11 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; public class Client { + ReadWriteLock lock = new ReentrantReadWriteLock(); public String auth_id; public long timestamp; public AuthResponse.ConnectTypes type; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index 948b01be..9a54691d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -39,6 +39,8 @@ import java.lang.reflect.Type; import java.util.UUID; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.function.BiConsumer; public class WebSocketService { @@ -51,11 +53,18 @@ public class WebSocketService { private final LaunchServer server; private final Gson gson; private transient final Logger logger = LogManager.getLogger(); + private ExecutorService executors; public WebSocketService(ChannelGroup channels, LaunchServer server) { this.channels = channels; this.server = server; this.gson = Launcher.gsonManager.gson; + executors = switch (server.config.netty.performance.executorType) { + case NONE -> null; + case DEFAULT -> Executors.newCachedThreadPool(); + case WORK_STEAL -> Executors.newWorkStealingPool(); + case VIRTUAL_THREADS -> Executors.newVirtualThreadPerTaskExecutor(); + }; } public static void registerResponses() { @@ -126,7 +135,41 @@ public void process(ChannelHandlerContext ctx, TextWebSocketFrame frame, Client sendObject(ctx.channel(), event, WebSocketEvent.class); return; } - process(context, response, client, ip); + var safeStatus = server.config.netty.performance.disableThreadSafeClientObject ? + WebSocketServerResponse.ThreadSafeStatus.NONE : response.getThreadSafeStatus(); + if(executors == null) { + process(safeStatus, client, ip, context, response); + } else { + executors.submit(() -> { + process(safeStatus, client, ip, context, response); + }); + } + } + + private void process(WebSocketServerResponse.ThreadSafeStatus safeStatus, Client client, String ip, WebSocketRequestContext context, WebSocketServerResponse response) { + switch (safeStatus) { + case NONE -> { + process(context, response, client, ip); + } + case READ -> { + var lock = client.lock.readLock(); + lock.lock(); + try { + process(context, response, client, ip); + } finally { + lock.unlock(); + } + } + case READ_WRITE -> { + var lock = client.lock.writeLock(); + lock.lock(); + try { + process(context, response, client, ip); + } finally { + lock.unlock(); + } + } + } } void process(WebSocketRequestContext context, WebSocketServerResponse response, Client client, String ip) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java index 7d3814d8..fc65f6af 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/WebSocketServerResponse.java @@ -8,4 +8,12 @@ public interface WebSocketServerResponse extends WebSocketRequest { String getType(); void execute(ChannelHandlerContext ctx, Client client) throws Exception; + + default ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ; + } + + enum ThreadSafeStatus { + NONE, READ, READ_WRITE + } } diff --git a/LaunchServer/src/main/resources/experimental-build.json b/LaunchServer/src/main/resources/experimental-build.json index 19dc64d9..ab148d00 100644 --- a/LaunchServer/src/main/resources/experimental-build.json +++ b/LaunchServer/src/main/resources/experimental-build.json @@ -1,4 +1,4 @@ { - "features": ["nojava8support"], - "info": ["Java below 17 not supported"] + "features": [], + "info": [] } \ No newline at end of file diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java index fa8035de..94782b7a 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java @@ -21,6 +21,7 @@ import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.cert.CertificateException; +import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Queue; @@ -159,6 +160,16 @@ public CompletableFuture downloadFile(URI uri, Path path) { }); } + public CompletableFuture downloadFile(String url, Path path, DownloadCallback callback, ExecutorService executor) throws Exception { + return downloadFiles(new ArrayList<>(List.of(new SizedFile(url, path.getFileName().toString()))), null, + path.getParent(), callback, executor, 1); + } + + public CompletableFuture downloadFile(String url, Path path, long size, DownloadCallback callback, ExecutorService executor) throws Exception { + return downloadFiles(new ArrayList<>(List.of(new SizedFile(url, path.getFileName().toString(), size))), null, + path.getParent(), callback, executor, 1); + } + public CompletableFuture downloadFiles(List files, String baseURL, Path targetDir, DownloadCallback callback, ExecutorService executor, int threads) throws Exception { // URI scheme URI baseUri = baseURL == null ? null : new URI(baseURL); @@ -355,5 +366,11 @@ public SizedFile(String urlPath, String filePath, long size) { this.filePath = filePath; this.size = size; } + + public SizedFile(String urlPath, String filePath) { + this.urlPath = urlPath; + this.filePath = filePath; + this.size = -1; + } } } From 35bdf1607fe581946099fe932cc55c67040eb64f Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 3 Feb 2024 17:11:36 +0700 Subject: [PATCH 25/73] [FEATURE] Add thread-safe info to responses --- .../launchserver/socket/response/auth/AuthResponse.java | 5 +++++ .../launchserver/socket/response/auth/ExitResponse.java | 5 +++++ .../launchserver/socket/response/auth/RestoreResponse.java | 5 +++++ .../socket/response/auth/SetProfileResponse.java | 5 +++++ .../socket/response/secure/GetSecureLevelInfoResponse.java | 5 +++++ .../socket/response/secure/HardwareReportResponse.java | 5 +++++ .../socket/response/secure/VerifySecureLevelKeyResponse.java | 5 +++++ .../socket/response/update/LauncherResponse.java | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java index fc463437..2ae4098d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java @@ -81,4 +81,9 @@ public AuthContext(Client client, String login, String profileName, String ip, C this.pair = pair; } } + + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java index 37394753..8853883e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/ExitResponse.java @@ -79,4 +79,9 @@ public void execute(ChannelHandlerContext ctx, Client client) { sendResult(new ExitRequestEvent(ExitRequestEvent.ExitReason.NO_EXIT)); } } + + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java index 4e326b7a..3b70a898 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java @@ -105,4 +105,9 @@ public void execute(ChannelHandlerContext ctx, Client client) throws Exception { public interface ExtendedTokenProvider { boolean accept(Client client, AuthProviderPair pair, String extendedToken); } + + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java index ad1e37d5..b6cb4de1 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java @@ -40,4 +40,9 @@ public void execute(ChannelHandlerContext ctx, Client client) { } sendError("Profile not found"); } + + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java index b3e3c99f..5afd95cf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/GetSecureLevelInfoResponse.java @@ -31,4 +31,9 @@ public void execute(ChannelHandlerContext ctx, Client client) { response.enabled = true; sendResult(secureProtectHandler.onGetSecureLevelInfo(response)); } + + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java index 785a42c3..5b0e25f3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/HardwareReportResponse.java @@ -31,4 +31,9 @@ public void execute(ChannelHandlerContext ctx, Client client) { sendResult(new HardwareReportRequestEvent()); } } + + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/VerifySecureLevelKeyResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/VerifySecureLevelKeyResponse.java index 7530995e..46e41a8d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/VerifySecureLevelKeyResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/secure/VerifySecureLevelKeyResponse.java @@ -44,4 +44,9 @@ public void execute(ChannelHandlerContext ctx, Client client) { } } + + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java index de468ed6..ec4e0b53 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java @@ -110,4 +110,9 @@ public boolean accept(Client client, AuthProviderPair pair, String extendedToken } } + @Override + public ThreadSafeStatus getThreadSafeStatus() { + return ThreadSafeStatus.READ_WRITE; + } + } From aa7b007616f20e843e353513a68ca353feebbde7 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 3 Feb 2024 17:35:27 +0700 Subject: [PATCH 26/73] [FIX] Launcher log --- Launcher/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 2aa41a79..11bf8b2b 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -52,7 +52,9 @@ pack project(':LauncherAPI') pack project(':LauncherClient') pack project(':LauncherStart') - bundle group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore'] + bundle(group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore']) { + exclude group: 'org.slf4j' + } } tasks.register('genRuntimeJS', Zip) { From 9676e55bcbffa487f0e59195574bbc08100a6e1e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:47:18 +0700 Subject: [PATCH 27/73] [FEATURE] Support sudo --- .../pro/gravit/launchserver/LaunchServer.java | 2 +- .../launchserver/auth/AuthProviderPair.java | 2 +- .../auth/core/AbstractSQLCoreProvider.java | 6 +- .../auth/core/AuthCoreProvider.java | 80 ++++++++++++++++++- .../auth/core/MemoryAuthCoreProvider.java | 9 ++- .../auth/core/MergeAuthCoreProvider.java | 3 +- .../auth/core/MySQLCoreProvider.java | 5 +- .../auth/core/RejectAuthCoreProvider.java | 5 -- .../interfaces/provider/AuthSupportSudo.java | 10 +++ .../gravit/launchserver/socket/Client.java | 9 +++ 10 files changed, 113 insertions(+), 18 deletions(-) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportSudo.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 9c09cb40..44c716a7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -266,7 +266,7 @@ public void invoke(String... args) throws Exception { } pair.core.close(); pair.core = new RejectAuthCoreProvider(); - pair.core.init(instance); + pair.core.init(instance, pair); } }; commands.put("resetauth", resetauth); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java index 72c198f2..5234718b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java @@ -74,7 +74,7 @@ public T isSupport(Class clazz) { public void init(LaunchServer srv, String name) { this.name = name; if (links != null) link(srv); - core.init(srv); + core.init(srv, this); features = new HashSet<>(); getFeatures(core.getClass(), features); if(mixes != null) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java index c469990a..1ebc1939 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java @@ -9,6 +9,7 @@ import pro.gravit.launcher.base.request.auth.password.AuthPlainPassword; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; +import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.MySQLSourceConfig; import pro.gravit.launchserver.auth.SQLSourceConfig; import pro.gravit.launchserver.auth.password.PasswordVerifier; @@ -66,7 +67,6 @@ public abstract class AbstractSQLCoreProvider extends AuthCoreProvider { public transient String updateAuthSQL; public transient String updateServerIDSQL; - public transient LaunchServer server; public abstract SQLSourceConfig getSQLConfig(); @@ -183,8 +183,8 @@ public boolean joinServer(Client client, String username, UUID uuid, String acce } @Override - public void init(LaunchServer server) { - this.server = server; + public void init(LaunchServer server, AuthProviderPair pair) { + super.init(server, pair); if (getSQLConfig() == null) logger.error("SQLHolder cannot be null"); if (uuidColumn == null) logger.error("uuidColumn cannot be null"); if (usernameColumn == null) logger.error("usernameColumn cannot be null"); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java index 50042661..bdf060ee 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java @@ -4,7 +4,10 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.events.RequestEvent; +import pro.gravit.launcher.base.events.request.AuthRequestEvent; import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; +import pro.gravit.launcher.base.profiles.PlayerProfile; import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.launcher.base.request.auth.details.AuthPasswordDetails; import pro.gravit.launcher.base.request.auth.password.AuthPlainPassword; @@ -12,16 +15,19 @@ import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.Reconfigurable; import pro.gravit.launchserver.auth.AuthException; +import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.core.interfaces.UserHardware; import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportGetAllUsers; import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportHardware; import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportRegistration; +import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportSudo; import pro.gravit.launchserver.manangers.AuthManager; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.auth.AuthResponse; import pro.gravit.utils.ProviderMap; import pro.gravit.utils.command.Command; import pro.gravit.utils.command.SubCommand; +import pro.gravit.utils.helper.VerifyHelper; import java.io.IOException; import java.lang.reflect.Type; @@ -29,6 +35,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; +import java.util.concurrent.atomic.AtomicBoolean; /* All-In-One provider @@ -37,6 +44,8 @@ public abstract class AuthCoreProvider implements AutoCloseable, Reconfigurable public static final ProviderMap providers = new ProviderMap<>("AuthCoreProvider"); private static final Logger logger = LogManager.getLogger(); private static boolean registredProviders = false; + protected transient LaunchServer server; + protected transient AuthProviderPair pair; public static void registerProviders() { if (!registredProviders) { @@ -71,7 +80,10 @@ public AuthManager.AuthReport authorize(User user, AuthResponse.AuthContext cont return authorize(user.getUsername(), context, password, minecraftAccess); } - public abstract void init(LaunchServer server); + public void init(LaunchServer server, AuthProviderPair pair) { + this.server = server; + this.pair = pair; + } public List getDetails(Client client) { return List.of(new AuthPasswordDetails()); @@ -260,6 +272,72 @@ public void invoke(String... args) throws Exception { }); } } + { + var instance = isSupport(AuthSupportSudo.class); + if(instance != null) { + map.put("sudo", new SubCommand("[connectUUID] [username/uuid] [isShadow] (CLIENT/API)", "Authorize connectUUID as another user without password") { + @Override + public void invoke(String... args) throws Exception { + verifyArgs(args, 3); + UUID connectUUID = UUID.fromString(args[0]); + String login = args[1]; + boolean isShadow = Boolean.parseBoolean(args[2]); + AuthResponse.ConnectTypes type; + if(args.length > 3) { + type = AuthResponse.ConnectTypes.valueOf(args[3]); + } else { + type = AuthResponse.ConnectTypes.CLIENT; + } + User user; + if(login.length() == 36) { + UUID uuid = UUID.fromString(login); + user = getUserByUUID(uuid); + } else { + user = getUserByUsername(login); + } + if(user == null) { + logger.error("User {} not found", login); + return; + } + AtomicBoolean founded = new AtomicBoolean(); + server.nettyServerSocketHandler.nettyServer.service.forEachActiveChannels((ch, fh) -> { + var client = fh.getClient(); + if(client == null || !connectUUID.equals(fh.getConnectUUID())) { + return; + } + logger.info("Found connectUUID {} with IP {}", fh.getConnectUUID(), fh.context == null ? "null" : fh.context.ip); + var lock = server.config.netty.performance.disableThreadSafeClientObject ? null : client.writeLock(); + if(lock != null) { + lock.lock(); + } + try { + var report = instance.sudo(user, isShadow); + User user1 = report.session().getUser(); + server.authManager.internalAuth(client, type, pair, user1.getUsername(), user1.getUUID(), user1.getPermissions(), true); + client.sessionObject = report.session(); + client.coreObject = report.session().getUser(); + PlayerProfile playerProfile = server.authManager.getPlayerProfile(client); + AuthRequestEvent request = new AuthRequestEvent(user1.getPermissions(), playerProfile, + report.minecraftAccessToken(), null, null, + new AuthRequestEvent.OAuthRequestEvent(report.oauthAccessToken(), report.oauthRefreshToken(), report.oauthExpire())); + request.requestUUID = RequestEvent.eventUUID; + server.nettyServerSocketHandler.nettyServer.service.sendObject(ch, request); + } catch (Throwable e) { + logger.error("Sudo error", e); + } finally { + if(lock != null) { + lock.unlock(); + } + founded.set(true); + } + }); + if(!founded.get()) { + logger.error("ConnectUUID {} not found", connectUUID); + } + } + }); + } + } return map; } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java index f8d8cc93..280ae084 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java @@ -6,6 +6,7 @@ import pro.gravit.launcher.base.request.auth.details.AuthLoginOnlyDetails; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; +import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportSudo; import pro.gravit.launchserver.manangers.AuthManager; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.auth.AuthResponse; @@ -18,7 +19,7 @@ import java.util.Objects; import java.util.UUID; -public class MemoryAuthCoreProvider extends AuthCoreProvider { +public class MemoryAuthCoreProvider extends AuthCoreProvider implements AuthSupportSudo { private transient final List memory = new ArrayList<>(16); @Override @@ -114,13 +115,13 @@ public boolean joinServer(Client client, String username, UUID uuid, String acce } @Override - public void init(LaunchServer server) { + public void close() { } @Override - public void close() { - + public AuthManager.AuthReport sudo(User user, boolean shadow) throws IOException { + return authorize(user.getUsername(), null, null, true); } public static class MemoryUser implements User { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java index a0d83fd7..e69eb086 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java @@ -5,6 +5,7 @@ import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; +import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.manangers.AuthManager; import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.auth.AuthResponse; @@ -72,7 +73,7 @@ public boolean joinServer(Client client, String username, UUID uuid, String acce } @Override - public void init(LaunchServer server) { + public void init(LaunchServer server, AuthProviderPair pair1) { for(var e : list) { var pair = server.config.auth.get(e); if(pair != null) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java index 13781df9..84c0ce3c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MySQLCoreProvider.java @@ -3,6 +3,7 @@ import pro.gravit.launcher.base.ClientPermissions; import pro.gravit.launcher.base.request.secure.HardwareReportRequest; import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.MySQLSourceConfig; import pro.gravit.launchserver.auth.SQLSourceConfig; import pro.gravit.launchserver.auth.core.interfaces.UserHardware; @@ -41,8 +42,8 @@ public SQLSourceConfig getSQLConfig() { } @Override - public void init(LaunchServer server) { - super.init(server); + public void init(LaunchServer server, AuthProviderPair pair) { + super.init(server, pair); String userInfoCols = makeUserCols(); String hardwareInfoCols = "id, hwDiskId, baseboardSerialNumber, displayId, bitness, totalMemory, logicalProcessors, physicalProcessors, processorMaxFreq, battery, id, graphicCard, banned, publicKey"; if (sqlFindHardwareByPublicKey == null) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java index 38f3864a..509abef5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java @@ -41,11 +41,6 @@ public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext c throw new AuthException("Please configure AuthCoreProvider"); } - @Override - public void init(LaunchServer server) { - - } - @Override public User checkServer(Client client, String username, String serverID) throws IOException { return null; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportSudo.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportSudo.java new file mode 100644 index 00000000..377bbe7f --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportSudo.java @@ -0,0 +1,10 @@ +package pro.gravit.launchserver.auth.core.interfaces.provider; + +import pro.gravit.launchserver.auth.core.User; +import pro.gravit.launchserver.manangers.AuthManager; + +import java.io.IOException; + +public interface AuthSupportSudo { + AuthManager.AuthReport sudo(User user, boolean shadow) throws IOException; +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java index 41b99f05..7ef57961 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/Client.java @@ -10,6 +10,7 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; +import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -86,6 +87,14 @@ public pro.gravit.launchserver.auth.core.User getUser() { return coreObject; } + public Lock readLock() { + return lock.readLock(); + } + + public Lock writeLock() { + return lock.writeLock(); + } + public static class TrustLevel { public byte[] verifySecureKey; public boolean keyChecked; From 4f473982113351185e2f7052e976a462d33a80f5 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:47:31 +0700 Subject: [PATCH 28/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index d783e9ad..cd920b0e 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit d783e9adb9bbbe072e4dd78c6e15a85b27fab446 +Subproject commit cd920b0eda048771ea3c225074db32943d27503b From 80fc2900c8966261ab631e919072aff63a2b226e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Wed, 7 Feb 2024 14:27:04 +0700 Subject: [PATCH 29/73] [FEATURE] Public-Only server token --- .../launchserver/command/service/TokenCommand.java | 5 +++-- .../gravit/launchserver/manangers/AuthManager.java | 13 +++++++++---- .../socket/response/auth/CheckServerResponse.java | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java index 35fdb687..c2939900 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java @@ -23,10 +23,11 @@ public void invoke(String... args) throws Exception { logger.info("Token: {}", claims.getBody()); } }); - this.childCommands.put("server", new SubCommand("[profileName] (authId)", "generate new server token") { + this.childCommands.put("server", new SubCommand("[profileName] (authId) (public only)", "generate new server token") { @Override public void invoke(String... args) { AuthProviderPair pair = args.length > 1 ? server.config.getAuthProviderPair(args[1]) : server.config.getAuthProviderPair(); + boolean publicOnly = args.length <= 2 || Boolean.parseBoolean(args[2]); ClientProfile profile = null; for (ClientProfile p : server.getProfiles()) { if (p.getTitle().equals(args[0]) || p.getUUID().toString().equals(args[0])) { @@ -41,7 +42,7 @@ public void invoke(String... args) { logger.error("AuthId {} not found", args[1]); return; } - String token = server.authManager.newCheckServerToken(profile != null ? profile.getUUID().toString() : args[0], pair.name); + String token = server.authManager.newCheckServerToken(profile != null ? profile.getUUID().toString() : args[0], pair.name, publicOnly); logger.info("Server token {} authId {}: {}", args[0], pair.name, token); } }); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java index 8d00596d..7c01ab38 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java @@ -45,12 +45,13 @@ public AuthManager(LaunchServer server) { .build(); } - public String newCheckServerToken(String serverName, String authId) { + public String newCheckServerToken(String serverName, String authId, boolean publicOnly) { return Jwts.builder() .setIssuer("LaunchServer") .claim("serverName", serverName) .claim("authId", authId) .claim("tokenType", "checkServer") + .claim("isPublic", publicOnly ? "true" : "false") .signWith(server.keyAgreementManager.ecdsaPrivateKey) .compact(); } @@ -58,7 +59,8 @@ public String newCheckServerToken(String serverName, String authId) { public CheckServerTokenInfo parseCheckServerToken(String token) { try { var jwt = checkServerTokenParser.parseClaimsJws(token).getBody(); - return new CheckServerTokenInfo(jwt.get("serverName", String.class), jwt.get("authId", String.class)); + var isPublicClaim = jwt.get("isPublic", Boolean.class); + return new CheckServerTokenInfo(jwt.get("serverName", String.class), jwt.get("authId", String.class), isPublicClaim == null || isPublicClaim); } catch (Exception e) { return null; } @@ -301,7 +303,7 @@ private AuthRequest.AuthPasswordInterface tryDecryptPasswordPlain(AuthRequest.Au return password; } - public record CheckServerTokenInfo(String serverName, String authId) { + public record CheckServerTokenInfo(String serverName, String authId, boolean isPublic) { } public static class CheckServerVerifier implements RestoreResponse.ExtendedTokenProvider { @@ -321,7 +323,10 @@ public boolean accept(Client client, AuthProviderPair pair, String extendedToken client.auth = server.config.getAuthProviderPair(info.authId); if (client.permissions == null) client.permissions = new ClientPermissions(); client.permissions.addPerm("launchserver.checkserver"); - client.permissions.addPerm("launchserver.profile.%s.show".formatted(info.serverName)); + if(!info.isPublic) { + client.permissions.addPerm("launchserver.checkserver.extended"); + client.permissions.addPerm("launchserver.profile.%s.show".formatted(info.serverName)); + } client.setProperty("launchserver.serverName", info.serverName); return true; } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java index 29aed1be..f661b275 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CheckServerResponse.java @@ -40,7 +40,7 @@ public void execute(ChannelHandlerContext ctx, Client pClient) { } result.playerProfile = report.playerProfile; result.uuid = report.uuid; - if(report.session != null) { + if(pClient.permissions.hasPerm("launchserver.checkserver.extended") && report.session != null) { result.sessionId = report.session.getID(); if(needProperties && report.session instanceof UserSessionSupportProperties supportProperties) { result.sessionProperties = supportProperties.getProperties(); From 0b59d6c0edc3936115fce1236d744f86db1198df Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 10 Feb 2024 14:47:13 +0700 Subject: [PATCH 30/73] [FEATURE] Profile clone command --- .../command/handler/CommandHandler.java | 6 +- .../command/profiles/CloneProfileCommand.java | 73 +++++++++++++++++++ .../MakeProfileCommand.java | 2 +- .../command/profiles/ProfilesCommand.java | 28 +++++++ .../SaveProfilesCommand.java | 2 +- modules | 2 +- 6 files changed, 108 insertions(+), 5 deletions(-) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/CloneProfileCommand.java rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{hash => profiles}/MakeProfileCommand.java (97%) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java rename LaunchServer/src/main/java/pro/gravit/launchserver/command/{hash => profiles}/SaveProfilesCommand.java (98%) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java index c369e0a5..5b6d9aff 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java @@ -5,6 +5,9 @@ import pro.gravit.launchserver.command.hash.*; import pro.gravit.launchserver.command.modules.LoadModuleCommand; import pro.gravit.launchserver.command.modules.ModulesCommand; +import pro.gravit.launchserver.command.profiles.MakeProfileCommand; +import pro.gravit.launchserver.command.profiles.ProfilesCommand; +import pro.gravit.launchserver.command.profiles.SaveProfilesCommand; import pro.gravit.launchserver.command.service.*; import pro.gravit.launchserver.command.sync.*; import pro.gravit.launchserver.command.tools.SignDirCommand; @@ -37,8 +40,7 @@ public static void registerCommands(pro.gravit.utils.command.CommandHandler hand updates.registerCommand("downloadAsset", new DownloadAssetCommand(server)); updates.registerCommand("downloadClient", new DownloadClientCommand(server)); updates.registerCommand("sync", new SyncCommand(server)); - updates.registerCommand("saveProfiles", new SaveProfilesCommand(server)); - updates.registerCommand("makeProfile", new MakeProfileCommand(server)); + updates.registerCommand("profile", new ProfilesCommand(server)); Category updatesCategory = new Category(updates, "updates", "Update and Sync Management"); handler.registerCategory(updatesCategory); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/CloneProfileCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/CloneProfileCommand.java new file mode 100644 index 00000000..43e54f85 --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/CloneProfileCommand.java @@ -0,0 +1,73 @@ +package pro.gravit.launchserver.command.profiles; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import pro.gravit.launcher.base.Launcher; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; +import pro.gravit.utils.helper.IOHelper; + +import java.io.IOException; +import java.io.Reader; +import java.io.Writer; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.UUID; +import java.util.stream.Stream; + +public class CloneProfileCommand extends Command { + private final transient Logger logger = LogManager.getLogger(CloneProfileCommand.class); + public CloneProfileCommand(LaunchServer server) { + super(server); + } + + @Override + public String getArgsDescription() { + return "[profile file name] [new profile title]"; + } + + @Override + public String getUsageDescription() { + return "clone profile and profile dir"; + } + + @Override + public void invoke(String... args) throws Exception { + verifyArgs(args, 2); + var profilePath = server.profilesDir.resolve(args[0].concat(".json")); + if(!Files.exists(profilePath)) { + logger.error("File {} not found", profilePath); + } + ClientProfile profile; + try(Reader reader = IOHelper.newReader(profilePath)) { + profile = Launcher.gsonManager.gson.fromJson(reader, ClientProfile.class); + } + profile.setTitle(args[1]); + profile.setUUID(UUID.randomUUID()); + if(profile.getServers().size() == 1) { + profile.getServers().getFirst().name = args[1]; + } + logger.info("Copy {} to {}", profile.getDir(), args[1]); + var src = server.updatesDir.resolve(profile.getDir()); + var dest = server.updatesDir.resolve(args[1]); + try (Stream stream = Files.walk(src)) { + stream.forEach(source -> { + try { + IOHelper.copy(source, dest.resolve(src.relativize(source))); + } catch (IOException e) { + throw new RuntimeException(e); + } + }); + } + profile.setDir(args[1]); + var targetPath = server.profilesDir.resolve(args[1].concat(".json")); + try(Writer writer = IOHelper.newWriter(targetPath)) { + Launcher.gsonManager.gson.toJson(profile, writer); + } + logger.info("Profile {} cloned from {}", args[1], args[0]); + server.syncProfilesDir(); + server.syncUpdatesDir(List.of(args[1])); + } +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/MakeProfileCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/MakeProfileCommand.java similarity index 97% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/MakeProfileCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/MakeProfileCommand.java index a424593c..ad57670c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/MakeProfileCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/MakeProfileCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.hash; +package pro.gravit.launchserver.command.profiles; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java new file mode 100644 index 00000000..395c1945 --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java @@ -0,0 +1,28 @@ +package pro.gravit.launchserver.command.profiles; + +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; + +public class ProfilesCommand extends Command { + public ProfilesCommand(LaunchServer server) { + super(server); + this.childCommands.put("make", new MakeProfileCommand(server)); + this.childCommands.put("save", new SaveProfilesCommand(server)); + this.childCommands.put("clone", new CloneProfileCommand(server)); + } + + @Override + public String getArgsDescription() { + return "[subcommand] [args...]"; + } + + @Override + public String getUsageDescription() { + return "manage profiles"; + } + + @Override + public void invoke(String... args) throws Exception { + invokeSubcommands(args); + } +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/SaveProfilesCommand.java similarity index 98% rename from LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java rename to LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/SaveProfilesCommand.java index 32e65634..c0f0f5d0 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/hash/SaveProfilesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/SaveProfilesCommand.java @@ -1,4 +1,4 @@ -package pro.gravit.launchserver.command.hash; +package pro.gravit.launchserver.command.profiles; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/modules b/modules index cd920b0e..1c3646c8 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit cd920b0eda048771ea3c225074db32943d27503b +Subproject commit 1c3646c8161f38c44d6578ba7aeabce27823556f From d40dc09acaa30a321221199c049b18491f3ca4e4 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Thu, 15 Feb 2024 01:31:27 +0700 Subject: [PATCH 31/73] [FEATURE] Handle non 2XX codes in Downloader --- .../main/java/pro/gravit/launcher/base/Downloader.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java index 94782b7a..4517bdc2 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java @@ -190,7 +190,13 @@ public CompletableFuture downloadFiles(List files, String baseU } try { DownloadTask task = sendAsync(file, baseUri, targetDir, callback); - task.completableFuture.thenAccept(consumerObject.next).exceptionally(ec -> { + task.completableFuture.thenCompose((res) -> { + if(res.statusCode() < 200 || res.statusCode() >= 300) { + return CompletableFuture.failedFuture(new IOException(String.format("Failed to download %s: code %d", + file.urlPath != null ? file.urlPath /* TODO: baseUri */ : file.filePath, res.statusCode()))); + } + return CompletableFuture.completedFuture(res); + }).thenAccept(consumerObject.next).exceptionally(ec -> { future.completeExceptionally(ec); return null; }); From 4e50cea93a6efb947c7142dbba807a3d90569383 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Thu, 22 Feb 2024 17:33:44 +0700 Subject: [PATCH 32/73] [FEATURE] Use encrypted ClientParams --- .../runtime/client/ClientLauncherProcess.java | 7 +- .../client/ClientLauncherEntryPoint.java | 8 +- .../gravit/launcher/client/ClientParams.java | 1 + .../gravit/utils/helper/SecurityHelper.java | 99 ++++++------------- .../gravit/launcher/SecurityHelperTests.java | 48 +++++++++ 5 files changed, 89 insertions(+), 74 deletions(-) create mode 100644 LauncherCore/src/test/java/pro/gravit/launcher/SecurityHelperTests.java diff --git a/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java index 001502ca..ac85b898 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java @@ -19,6 +19,7 @@ import pro.gravit.launcher.core.serialize.HOutput; import pro.gravit.utils.helper.*; +import javax.crypto.CipherOutputStream; import java.io.File; import java.io.IOException; import java.net.ServerSocket; @@ -30,7 +31,6 @@ import java.util.stream.Collectors; public class ClientLauncherProcess { - public final List pre = new LinkedList<>(); public final ClientParams params = new ClientParams(); public final List jvmArgs = new LinkedList<>(); @@ -77,6 +77,7 @@ public ClientLauncherProcess(Path clientDir, Path assetDir, JavaHelper.JavaVersi this.params.clientDir = this.workDir.toString(); this.params.resourcePackDir = resourcePackDir.toAbsolutePath().toString(); this.params.assetDir = assetDir.toAbsolutePath().toString(); + this.params.timestamp = System.currentTimeMillis(); Path nativesPath; if(profile.hasFlag(ClientProfile.CompatibilityFlags.LEGACY_NATIVES_DIR)) { nativesPath = workDir.resolve("natives"); @@ -224,7 +225,7 @@ public void runWriteParams(SocketAddress address) throws IOException { waitWriteParams.notifyAll(); } Socket socket = serverSocket.accept(); - try (HOutput output = new HOutput(socket.getOutputStream())) { + try (HOutput output = new HOutput(new CipherOutputStream(socket.getOutputStream(), SecurityHelper.newAESEncryptCipher(SecurityHelper.fromHex(Launcher.getConfig().secretKeyClient))))) { byte[] serializedMainParams = IOHelper.encode(Launcher.gsonManager.gson.toJson(params)); output.writeByteArray(serializedMainParams, 0); params.clientHDir.write(output); @@ -235,6 +236,8 @@ public void runWriteParams(SocketAddress address) throws IOException { output.writeBoolean(true); params.javaHDir.write(output); } + } catch (Exception e) { + throw new IOException(e); } } LauncherEngine.modulesManager.invokeEvent(new ClientProcessBuilderParamsWrittedEvent(this)); diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java index cc0a1b28..e67726dc 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java @@ -24,6 +24,7 @@ import pro.gravit.utils.helper.*; import pro.gravit.utils.launch.*; +import javax.crypto.CipherInputStream; import java.io.File; import java.io.IOException; import java.lang.invoke.MethodHandle; @@ -50,7 +51,7 @@ public class ClientLauncherEntryPoint { private static ClientParams readParams(SocketAddress address) throws IOException { try (Socket socket = IOHelper.newSocket()) { socket.connect(address); - try (HInput input = new HInput(socket.getInputStream())) { + try (HInput input = new HInput(new CipherInputStream(socket.getInputStream(), SecurityHelper.newAESDecryptCipher(SecurityHelper.fromHex(Launcher.getConfig().secretKeyClient))))) { byte[] serialized = input.readByteArray(0); ClientParams params = Launcher.gsonManager.gson.fromJson(IOHelper.decode(serialized), ClientParams.class); params.clientHDir = new HashedDir(input); @@ -88,6 +89,11 @@ private static void realMain(String[] args) throws Throwable { if (params.profile.getClassLoaderConfig() != ClientProfile.ClassLoaderConfig.AGENT) { ClientLauncherMethods.verifyNoAgent(); } + if(params.timestamp > System.currentTimeMillis() || params.timestamp + 30*1000 < System.currentTimeMillis() ) { + LogHelper.error("Timestamp failed. Exit"); + ClientLauncherMethods.exitLauncher(-662); + return; + } ClientProfile profile = params.profile; Launcher.profile = profile; AuthService.profile = profile; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java index ee8381d9..9f259dcb 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java @@ -14,6 +14,7 @@ import java.util.*; public class ClientParams { + public long timestamp; public String assetDir; public String clientDir; diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java index f21eb4fc..9a959230 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java @@ -33,20 +33,15 @@ public final class SecurityHelper { public static final String RSA_ALGO = "RSA"; public static final String RSA_SIGN_ALGO = "SHA256withRSA"; public static final String RSA_CIPHER_ALGO = "RSA/ECB/PKCS1Padding"; + public static final String AES_CIPHER_ALGO = "AES/ECB/PKCS5Padding"; // Algorithm size constants - public static final int AES_KEY_LENGTH = 8; + public static final int AES_KEY_LENGTH = 16; public static final int TOKEN_STRING_LENGTH = TOKEN_LENGTH << 1; public static final int RSA_KEY_LENGTH_BITS = 2048; public static final int RSA_KEY_LENGTH = RSA_KEY_LENGTH_BITS / Byte.SIZE; public static final int CRYPTO_MAX_LENGTH = 2048; public static final String HEX = "0123456789abcdef"; - // Certificate constants - public static final byte[] NUMBERS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; - public static final SecureRandom secureRandom = new SecureRandom(); - // Random generator constants - private static final char[] VOWELS = {'e', 'u', 'i', 'o', 'a'}; - private static final char[] CONS = {'r', 't', 'p', 's', 'd', 'f', 'g', 'h', 'k', 'l', 'c', 'v', 'b', 'n', 'm'}; private SecurityHelper() { } @@ -189,6 +184,16 @@ private static Cipher newRSACipher(int mode, RSAKey key) { return cipher; } + private static Cipher newAESCipher(int mode, byte[] key) { + Cipher cipher = newCipher(AES_CIPHER_ALGO); + try { + cipher.init(mode, new SecretKeySpec(key, "AES")); + } catch (InvalidKeyException e) { + throw new InternalError(e); + } + return cipher; + } + private static KeyFactory newECDSAKeyFactory() { try { return KeyFactory.getInstance(EC_ALGO); @@ -313,70 +318,6 @@ public static byte[] randomAESKey(Random random) { return randomBytes(random, AES_KEY_LENGTH); } - - public static String randomUsername() { - return randomUsername(newRandom()); - } - - - public static String randomUsername(Random random) { - int usernameLength = 3 + random.nextInt(7); // 3-9 - - // Choose prefix - String prefix; - int prefixType = random.nextInt(7); - if (usernameLength >= 5 && prefixType == 6) { // (6) 2-char - prefix = random.nextBoolean() ? "Mr" : "Dr"; - usernameLength -= 2; - } else if (usernameLength >= 6 && prefixType == 5) { // (5) 3-char - prefix = "Mrs"; - usernameLength -= 3; - } else - prefix = ""; - - // Choose suffix - String suffix; - int suffixType = random.nextInt(7); // 0-6, 7 values - if (usernameLength >= 5 && suffixType == 6) { // (6) 10-99 - suffix = String.valueOf(10 + random.nextInt(90)); - usernameLength -= 2; - } else if (usernameLength >= 7 && suffixType == 5) { // (5) 1990-2015 - suffix = String.valueOf(1990 + random.nextInt(26)); - usernameLength -= 4; - } else - suffix = ""; - - // Choose name - int consRepeat = 0; - boolean consPrev = random.nextBoolean(); - char[] chars = new char[usernameLength]; - for (int i = 0; i < chars.length; i++) { - if (i > 1 && consPrev && random.nextInt(10) == 0) { // Doubled - chars[i] = chars[i - 1]; - continue; - } - - // Choose next char - if (consRepeat < 1 && random.nextInt() == 5) - consRepeat++; - else { - consRepeat = 0; - consPrev ^= true; - } - - // Choose char - char[] alphabet = consPrev ? CONS : VOWELS; - chars[i] = alphabet[random.nextInt(alphabet.length)]; - } - - // Make first letter uppercase - if (!prefix.isEmpty() || random.nextBoolean()) - chars[0] = Character.toUpperCase(chars[0]); - - // Return chosen name (and verify for sure) - return VerifyHelper.verifyUsername(prefix + new String(chars) + suffix); - } - public static byte[] sign(byte[] bytes, ECPrivateKey privateKey) { Signature signature = newECSignSignature(privateKey); try { @@ -484,6 +425,22 @@ public static Cipher newRSAEncryptCipher(RSAPublicKey publicKey) { } } + public static Cipher newAESDecryptCipher(byte[] key) { + try { + return newAESCipher(Cipher.DECRYPT_MODE, key); + } catch (SecurityException e) { + throw new InternalError(e); + } + } + + public static Cipher newAESEncryptCipher(byte[] key) { + try { + return newAESCipher(Cipher.ENCRYPT_MODE, key); + } catch (SecurityException e) { + throw new InternalError(e); + } + } + //AES public static byte[] encrypt(String seed, byte[] cleartext) throws Exception { byte[] rawKey = getAESKey(IOHelper.encode(seed)); diff --git a/LauncherCore/src/test/java/pro/gravit/launcher/SecurityHelperTests.java b/LauncherCore/src/test/java/pro/gravit/launcher/SecurityHelperTests.java new file mode 100644 index 00000000..4a78442d --- /dev/null +++ b/LauncherCore/src/test/java/pro/gravit/launcher/SecurityHelperTests.java @@ -0,0 +1,48 @@ +package pro.gravit.launcher; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import pro.gravit.utils.helper.SecurityHelper; + +import javax.crypto.CipherInputStream; +import javax.crypto.CipherOutputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.OutputStream; + +public class SecurityHelperTests { + @Test + public void aesLegacyTest() throws Exception { + byte[] bytes = SecurityHelper.randomBytes(24); + byte[] seed = SecurityHelper.randomBytes(32); + byte[] encrypted = SecurityHelper.encrypt(seed, bytes); + byte[] decrypted = SecurityHelper.decrypt(seed, encrypted); + Assertions.assertArrayEquals(bytes, decrypted); + } + + + @Test + public void aesStreamTest() throws Exception { + byte[] bytes = SecurityHelper.randomBytes(128); + byte[] seed = SecurityHelper.randomAESKey(); + byte[] encrypted; + ByteArrayOutputStream s = new ByteArrayOutputStream(); + try(OutputStream o = new CipherOutputStream(s, SecurityHelper.newAESEncryptCipher(seed))) { + try(ByteArrayInputStream i = new ByteArrayInputStream(bytes)) { + i.transferTo(o); + } + } + encrypted = s.toByteArray(); + byte[] decrypted; + ; + try(InputStream i = new CipherInputStream(new ByteArrayInputStream(encrypted), SecurityHelper.newAESDecryptCipher(seed))) { + ByteArrayOutputStream s2 = new ByteArrayOutputStream(); + try(s2) { + i.transferTo(s2); + } + decrypted = s2.toByteArray(); + } + Assertions.assertArrayEquals(bytes, decrypted); + } +} From a4bf033aa8a12d73e1d72eb917c304ee25f4bda1 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:42:00 +0700 Subject: [PATCH 33/73] [FEATURE] Support sudo in mysql/psotgresql/filesystem AuthCoreProvider --- .../auth/core/AbstractSQLCoreProvider.java | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java index 1ebc1939..857f9b7f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java @@ -12,6 +12,7 @@ import pro.gravit.launchserver.auth.AuthProviderPair; import pro.gravit.launchserver.auth.MySQLSourceConfig; import pro.gravit.launchserver.auth.SQLSourceConfig; +import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportSudo; import pro.gravit.launchserver.auth.password.PasswordVerifier; import pro.gravit.launchserver.helper.LegacySessionHelper; import pro.gravit.launchserver.manangers.AuthManager; @@ -33,7 +34,7 @@ import static java.util.concurrent.TimeUnit.HOURS; import static java.util.concurrent.TimeUnit.SECONDS; -public abstract class AbstractSQLCoreProvider extends AuthCoreProvider { +public abstract class AbstractSQLCoreProvider extends AuthCoreProvider implements AuthSupportSudo { public final transient Logger logger = LogManager.getLogger(); public long expireSeconds = HOURS.toSeconds(1); public String uuidColumn; @@ -142,14 +143,12 @@ public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext c if (user == null) { throw AuthException.userNotFound(); } - if (context != null) { - AuthPlainPassword plainPassword = (AuthPlainPassword) password; - if (plainPassword == null) { - throw AuthException.wrongPassword(); - } - if (!passwordVerifier.check(user.password, plainPassword.password)) { - throw AuthException.wrongPassword(); - } + AuthPlainPassword plainPassword = (AuthPlainPassword) password; + if (plainPassword == null) { + throw AuthException.wrongPassword(); + } + if (!passwordVerifier.check(user.password, plainPassword.password)) { + throw AuthException.wrongPassword(); } SQLUserSession session = createSession(user); var accessToken = LegacySessionHelper.makeAccessJwtTokenFromString(user, LocalDateTime.now(Clock.systemUTC()).plusSeconds(expireSeconds), server.keyAgreementManager.ecdsaPrivateKey); @@ -163,6 +162,17 @@ public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext c } } + @Override + public AuthManager.AuthReport sudo(User user, boolean shadow) throws IOException { + SQLUser sqlUser = (SQLUser) user; + SQLUserSession session = createSession(sqlUser); + var accessToken = LegacySessionHelper.makeAccessJwtTokenFromString(sqlUser, LocalDateTime.now(Clock.systemUTC()).plusSeconds(expireSeconds), server.keyAgreementManager.ecdsaPrivateKey); + var refreshToken = sqlUser.username.concat(".").concat(LegacySessionHelper.makeRefreshTokenFromPassword(sqlUser.username, sqlUser.password, server.keyAgreementManager.legacySalt)); + String minecraftAccessToken = SecurityHelper.randomStringToken(); + updateAuth(user, minecraftAccessToken); + return AuthManager.AuthReport.ofOAuthWithMinecraft(minecraftAccessToken, accessToken, refreshToken, SECONDS.toMillis(expireSeconds), session); + } + @Override public User checkServer(Client client, String username, String serverID) throws IOException { SQLUser user = (SQLUser) getUserByUsername(username); From 3ec79e3e93d8a1f4d7cff314eefad27e121d574e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:42:17 +0700 Subject: [PATCH 34/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 1c3646c8..9b8a1eef 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 1c3646c8161f38c44d6578ba7aeabce27823556f +Subproject commit 9b8a1eefa940a211b45a82e707e98fffd4008c9e From 31285a80660dc72bd5ef66f74e40aed896239f0e Mon Sep 17 00:00:00 2001 From: microwin7 Date: Sat, 24 Feb 2024 22:15:04 +0300 Subject: [PATCH 35/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 9b8a1eef..875cbb46 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 9b8a1eefa940a211b45a82e707e98fffd4008c9e +Subproject commit 875cbb463dc432bc48300e4f3a7e5b3b21c6267e From 11382d3465d982badf93ee1e09268efc02bbf6f6 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:34:04 +0700 Subject: [PATCH 36/73] [FEATURE] Profile delete and profile list commands --- .../pro/gravit/launchserver/LaunchServer.java | 1 + .../profiles/DeleteProfileCommand.java | 56 ++++++++++++++++++ .../command/profiles/ListProfilesCommand.java | 30 ++++++++++ .../command/profiles/ProfilesCommand.java | 2 + .../modules/impl/SimpleModuleManager.java | 1 - .../launcher/base/profiles/ClientProfile.java | 11 +++- .../gravit/utils/PublicURLClassLoader.java | 59 ------------------- .../pro/gravit/utils/helper/IOHelper.java | 11 ++++ .../pro/gravit/utils/helper/JVMHelper.java | 53 ----------------- .../server/setup/ServerWrapperSetup.java | 1 - modules | 2 +- 11 files changed, 111 insertions(+), 116 deletions(-) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ListProfilesCommand.java delete mode 100644 LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 44c716a7..2720e668 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -476,6 +476,7 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IO profile = Launcher.gsonManager.gson.fromJson(reader, ClientProfile.class); } profile.verify(); + profile.setProfileFilePath(file); // Add SIGNED profile to result list result.add(profile); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java new file mode 100644 index 00000000..0331f614 --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java @@ -0,0 +1,56 @@ +package pro.gravit.launchserver.command.profiles; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import pro.gravit.launcher.base.profiles.ClientProfile; +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; +import pro.gravit.utils.helper.IOHelper; + +import java.nio.file.Files; + +public class DeleteProfileCommand extends Command { + private final transient Logger logger = LogManager.getLogger(ListProfilesCommand.class); + public DeleteProfileCommand(LaunchServer server) { + super(server); + } + + @Override + public String getArgsDescription() { + return "[uuid/title]"; + } + + @Override + public String getUsageDescription() { + return "permanently delete profile"; + } + + @Override + public void invoke(String... args) throws Exception { + verifyArgs(args, 1); + ClientProfile profile = null; + for(var p : server.getProfiles()) { + if(p.getUUID().toString().equals(args[0]) || p.getTitle().equals(args[1])) { + profile = p; + break; + } + } + if(profile == null) { + logger.error("Profile {} not found", args[0]); + return; + } + var clientDir = server.updatesDir.resolve(profile.getDir()).toAbsolutePath(); + logger.warn("THIS ACTION DELETE PROFILE AND ALL FILES IN {}", clientDir); + if(!showApplyDialog("Continue?")) { + return; + } + logger.info("Delete {}", clientDir); + IOHelper.deleteDir(clientDir, true); + var profileFile = profile.getProfileFilePath(); + if(profileFile == null) { + profileFile = server.profilesDir.resolve(profile.getTitle().concat(".json")); + } + logger.info("Delete {}", profileFile); + Files.deleteIfExists(profileFile); + } +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ListProfilesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ListProfilesCommand.java new file mode 100644 index 00000000..8eaa913e --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ListProfilesCommand.java @@ -0,0 +1,30 @@ +package pro.gravit.launchserver.command.profiles; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; + +public class ListProfilesCommand extends Command { + private final transient Logger logger = LogManager.getLogger(ListProfilesCommand.class); + public ListProfilesCommand(LaunchServer server) { + super(server); + } + + @Override + public String getArgsDescription() { + return null; + } + + @Override + public String getUsageDescription() { + return "show all profiles"; + } + + @Override + public void invoke(String... args) throws Exception { + for(var profile : server.getProfiles()) { + logger.info("{} ({}) {}", profile.getTitle(), profile.getVersion().toString(), profile.isLimited() ? "limited" : ""); + } + } +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java index 395c1945..c9d7a2c7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/ProfilesCommand.java @@ -9,6 +9,8 @@ public ProfilesCommand(LaunchServer server) { this.childCommands.put("make", new MakeProfileCommand(server)); this.childCommands.put("save", new SaveProfilesCommand(server)); this.childCommands.put("clone", new CloneProfileCommand(server)); + this.childCommands.put("list", new ListProfilesCommand(server)); + this.childCommands.put("delete", new DeleteProfileCommand(server)); } @Override diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java index db3668a4..bb510661 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/modules/impl/SimpleModuleManager.java @@ -2,7 +2,6 @@ import pro.gravit.launcher.core.LauncherTrustManager; import pro.gravit.launcher.base.modules.*; -import pro.gravit.utils.PublicURLClassLoader; import pro.gravit.utils.Version; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfile.java index 810e96b0..3c268cac 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/ClientProfile.java @@ -12,12 +12,13 @@ import java.lang.reflect.Type; import java.net.InetSocketAddress; +import java.nio.file.Path; import java.util.*; public final class ClientProfile implements Comparable { private static final FileNameMatcher ASSET_MATCHER = new FileNameMatcher( new String[0], new String[]{"indexes", "objects"}, new String[0]); - + private transient Path profileFilePath; @LauncherNetworkAPI private String title; @LauncherNetworkAPI @@ -461,6 +462,14 @@ public List getFlags() { return flags; } + public Path getProfileFilePath() { + return profileFilePath; + } + + public void setProfileFilePath(Path profileFilePath) { + this.profileFilePath = profileFilePath; + } + public enum ClassLoaderConfig { AGENT, LAUNCHER, MODULE, SYSTEM_ARGS } diff --git a/LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java b/LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java deleted file mode 100644 index 90b73309..00000000 --- a/LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java +++ /dev/null @@ -1,59 +0,0 @@ -package pro.gravit.utils; - -import java.net.URL; -import java.net.URLClassLoader; - -public class PublicURLClassLoader extends URLClassLoader { - - /** - * Constructs a new URLClassLoader for the specified URLs using the - * default delegation parent {@code ClassLoader}. The URLs will - * be searched in the order specified for classes and resources after - * first searching in the parent class loader. Any URL that ends with - * a '/' is assumed to refer to a directory. Otherwise, the URL is - * assumed to refer to a JAR file which will be downloaded and opened - * as needed. - * - *

If there is a security manager, this method first - * calls the security manager's {@code checkCreateClassLoader} method - * to ensure creation of a class loader is allowed. - * - * @param urls the URLs from which to load classes and resources - * @throws SecurityException if a security manager exists and its - * {@code checkCreateClassLoader} method doesn't allow - * creation of a class loader. - * @throws NullPointerException if {@code urls} is {@code null}. - */ - public PublicURLClassLoader(URL[] urls) { - super(urls); - } - - /** - * Constructs a new URLClassLoader for the given URLs. The URLs will be - * searched in the order specified for classes and resources after first - * searching in the specified parent class loader. Any {@code jar:} - * scheme URL is assumed to refer to a JAR file. Any {@code file:} scheme - * URL that ends with a '/' is assumed to refer to a directory. Otherwise, - * the URL is assumed to refer to a JAR file which will be downloaded and - * opened as needed. - * - *

If there is a security manager, this method first - * calls the security manager's {@code checkCreateClassLoader} method - * to ensure creation of a class loader is allowed. - * - * @param urls the URLs from which to load classes and resources - * @param parent the parent class loader for delegation - * @throws SecurityException if a security manager exists and its - * {@code checkCreateClassLoader} method doesn't allow - * creation of a class loader. - * @throws NullPointerException if {@code urls} is {@code null}. - */ - public PublicURLClassLoader(URL[] urls, ClassLoader parent) { - super(urls, parent); - } - - @Override - public void addURL(URL url) { - super.addURL(url); - } -} diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java index 0c8425de..0f008c38 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java @@ -12,6 +12,8 @@ import java.nio.file.attribute.BasicFileAttributes; import java.util.Collections; import java.util.Set; +import java.util.jar.JarFile; +import java.util.jar.Manifest; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.zip.Deflater; @@ -82,6 +84,15 @@ public static void close(OutputStream out) { } } + public static Manifest getManifest(Class clazz) { + Path path = getCodeSource(clazz); + try(JarFile jar = new JarFile(path.toFile())) { + return jar.getManifest(); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + } + public static URL convertToURL(String url) { try { return new URL(url); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java index ba1bbf85..af0d7c6e 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java @@ -1,17 +1,12 @@ package pro.gravit.utils.helper; -import java.io.File; import java.lang.invoke.MethodHandles; import java.lang.management.ManagementFactory; import java.lang.management.OperatingSystemMXBean; import java.lang.management.RuntimeMXBean; -import java.net.MalformedURLException; -import java.net.URL; import java.security.cert.X509Certificate; import java.util.Arrays; -import java.util.Collection; import java.util.Locale; -import java.util.Map; public final class JVMHelper { @@ -77,45 +72,11 @@ public static String getNativePrefix(JVMHelper.OS OS_TYPE) { }; } - public static void appendVars(ProcessBuilder builder, Map vars) { - builder.environment().putAll(vars); - } - - public static Class firstClass(String... names) throws ClassNotFoundException { - for (String name : names) - try { - return Class.forName(name, false, LOADER); - } catch (ClassNotFoundException ignored) { - // Expected - } - throw new ClassNotFoundException(Arrays.toString(names)); - } - public static void fullGC() { RUNTIME.gc(); LogHelper.debug("Used heap: %d MiB", RUNTIME.totalMemory() - RUNTIME.freeMemory() >> 20); } - public static String[] getClassPath() { - return System.getProperty("java.class.path").split(File.pathSeparator); - } - - public static URL[] getClassPathURL() { - String[] cp = System.getProperty("java.class.path").split(File.pathSeparator); - URL[] list = new URL[cp.length]; - - for (int i = 0; i < cp.length; i++) { - URL url = null; - try { - url = new URL(cp[i]); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - list[i] = url; - } - return list; - } - public static X509Certificate[] getCertificates(Class clazz) { Object[] signers = clazz.getSigners(); if (signers == null) return null; @@ -140,10 +101,6 @@ private static int getCorrectOSArch() { return System.getProperty("os.arch").contains("64") ? 64 : 32; } - public static String getEnvPropertyCaseSensitive(String name) { - return System.getenv().get(name); - } - public static boolean isJVMMatchesSystemArch() { return JVM_BITS == OS_BITS; } @@ -152,16 +109,6 @@ public static String jvmProperty(String name, String value) { return String.format("-D%s=%s", name, value); } - public static String systemToJvmProperty(String name) { - return String.format("-D%s=%s", name, System.getProperties().getProperty(name)); - } - - public static void addSystemPropertyToArgs(Collection args, String name) { - String property = System.getProperty(name); - if (property != null) - args.add(String.format("-D%s=%s", name, property)); - } - public static void verifySystemProperties(Class mainClass, boolean requireSystem) { Locale.setDefault(Locale.US); // Verify class loader diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java index 79f655a7..b8b8215f 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/setup/ServerWrapperSetup.java @@ -7,7 +7,6 @@ import pro.gravit.launcher.base.request.auth.GetPublicKeyRequest; import pro.gravit.launcher.base.request.websockets.StdWebSocketService; import pro.gravit.launcher.server.ServerWrapper; -import pro.gravit.utils.PublicURLClassLoader; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; diff --git a/modules b/modules index 875cbb46..c176ddfe 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 875cbb463dc432bc48300e4f3a7e5b3b21c6267e +Subproject commit c176ddfef61247e98e3832921877ec4a79cdcc63 From 80176ff1e1d7a9bba1ba18dc9e4e79bc07f95db9 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:53:27 +0700 Subject: [PATCH 37/73] [FEATURE] sync updatescache command --- .../command/service/ComponentCommand.java | 1 - .../command/sync/SyncCommand.java | 3 ++- .../command/sync/SyncUpdatesCacheCommand.java | 25 +++++++++++++++++++ .../manangers/UpdatesManager.java | 4 +++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUpdatesCacheCommand.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java index 4ff72e01..576a987b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/ComponentCommand.java @@ -37,7 +37,6 @@ public void printHelp() { logger.info("Print help for component:"); logger.info("component unload [componentName]"); logger.info("component load [componentName] [filename]"); - logger.info("component gc [componentName]"); } @Override diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java index f645eaaa..099e6c25 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncCommand.java @@ -11,11 +11,12 @@ public SyncCommand(LaunchServer server) { this.childCommands.put("updates", new SyncUpdatesCommand(server)); this.childCommands.put("up", new SyncUPCommand(server)); this.childCommands.put("launchermodules", new SyncLauncherModulesCommand(server)); + this.childCommands.put("updatescache", new SyncUpdatesCacheCommand(server)); } @Override public String getArgsDescription() { - return "[updates/profiles/up/binaries/launchermodules] [args...]"; + return "[updates/profiles/up/binaries/launchermodules/updatescache] [args...]"; } @Override diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUpdatesCacheCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUpdatesCacheCommand.java new file mode 100644 index 00000000..19c30fac --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/sync/SyncUpdatesCacheCommand.java @@ -0,0 +1,25 @@ +package pro.gravit.launchserver.command.sync; + +import pro.gravit.launchserver.LaunchServer; +import pro.gravit.launchserver.command.Command; + +public class SyncUpdatesCacheCommand extends Command { + public SyncUpdatesCacheCommand(LaunchServer server) { + super(server); + } + + @Override + public String getArgsDescription() { + return null; + } + + @Override + public String getUsageDescription() { + return "sync updates cache"; + } + + @Override + public void invoke(String... args) throws Exception { + server.updatesManager.readUpdatesFromCache(); + } +} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java index 848fa27b..c2642d2e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/UpdatesManager.java @@ -52,6 +52,10 @@ private void readCache(Path file) throws IOException { this.updatesDirMap = Collections.unmodifiableMap(updatesDirMap); } + public void readUpdatesFromCache() throws IOException { + readCache(cacheFile); + } + public void readUpdatesDir() throws IOException { if (server.config.cacheUpdates) { if (Files.exists(cacheFile)) { From 3152758d31565ed1b0483286f14f031f94e1e229 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:04:17 +0700 Subject: [PATCH 38/73] [FEATURE] GetConnectUUIDRequest --- .../launchserver/socket/WebSocketService.java | 11 ++++++++--- .../socket/handlers/WebSocketFrameHandler.java | 2 +- .../socket/response/SimpleResponse.java | 1 + .../management/GetConnectUUIDResponse.java | 18 ++++++++++++++++++ .../request/GetConnectUUIDRequestEvent.java | 18 ++++++++++++++++++ .../management/GetConnectUUIDRequest.java | 11 +++++++++++ .../websockets/ClientWebSocketService.java | 1 + 7 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java create mode 100644 LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/GetConnectUUIDRequest.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index 9a54691d..024d1644 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -21,6 +21,7 @@ import pro.gravit.launchserver.socket.response.cabinet.AssetUploadInfoResponse; import pro.gravit.launchserver.socket.response.cabinet.GetAssetUploadInfoResponse; import pro.gravit.launchserver.socket.response.management.FeaturesResponse; +import pro.gravit.launchserver.socket.response.management.GetConnectUUIDResponse; import pro.gravit.launchserver.socket.response.management.GetPublicKeyResponse; import pro.gravit.launchserver.socket.response.profile.BatchProfileByUsername; import pro.gravit.launchserver.socket.response.profile.ProfileByUUIDResponse; @@ -94,6 +95,7 @@ public static void registerResponses() { providers.register("getPublicKey", GetPublicKeyResponse.class); providers.register("getAssetUploadUrl", GetAssetUploadInfoResponse.class); providers.register("assetUploadInfo", AssetUploadInfoResponse.class); + providers.register("getConnectUUID", GetConnectUUIDResponse.class); } public static String getIPFromContext(ChannelHandlerContext ctx) { @@ -121,9 +123,9 @@ public void forEachActiveChannels(BiConsumer cal } } - public void process(ChannelHandlerContext ctx, TextWebSocketFrame frame, Client client, String ip) { + public void process(ChannelHandlerContext ctx, TextWebSocketFrame frame, Client client, String ip, UUID connectUUID) { String request = frame.text(); - WebSocketRequestContext context = new WebSocketRequestContext(ctx, request, client, ip); + WebSocketRequestContext context = new WebSocketRequestContext(ctx, request, client, ip, connectUUID); if(hookBeforeParsing.hook(context)) { return; } @@ -183,6 +185,7 @@ void process(WebSocketRequestContext context, WebSocketServerResponse response, simpleResponse.ctx = ctx; if (ip != null) simpleResponse.ip = ip; else simpleResponse.ip = IOHelper.getIP(ctx.channel().remoteAddress()); + simpleResponse.connectUUID = context.connectUUID; } try { response.execute(ctx, client); @@ -333,14 +336,16 @@ public static class WebSocketRequestContext { public final String text; public final Client client; public final String ip; + public final UUID connectUUID; public WebSocketServerResponse response; public Throwable exception; - public WebSocketRequestContext(ChannelHandlerContext context, String text, Client client, String ip) { + public WebSocketRequestContext(ChannelHandlerContext context, String text, Client client, String ip, UUID connectUUID) { this.context = context; this.text = text; this.client = client; this.ip = ip; + this.connectUUID = connectUUID; } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java index 9d2c8dcd..c4260949 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java @@ -68,7 +68,7 @@ protected void channelRead0(ChannelHandlerContext ctx, WebSocketFrame frame) { logger.trace("Message from {}: {}", context.ip == null ? IOHelper.getIP(ctx.channel().remoteAddress()) : context.ip, textWebSocketFrame.text()); } try { - service.process(ctx, textWebSocketFrame, client, context.ip); + service.process(ctx, textWebSocketFrame, client, context.ip, connectUUID); } catch (Throwable ex) { logger.warn("Client {} send invalid request. Connection force closed.", context.ip == null ? IOHelper.getIP(ctx.channel().remoteAddress()) : context.ip); if (logger.isTraceEnabled()) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java index 28738232..97b097cd 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/SimpleResponse.java @@ -13,6 +13,7 @@ public abstract class SimpleResponse implements WebSocketServerResponse { public transient LaunchServer server; public transient WebSocketService service; public transient ChannelHandlerContext ctx; + public transient UUID connectUUID; public transient String ip; public void sendResult(RequestEvent result) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java new file mode 100644 index 00000000..b4f05dcb --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java @@ -0,0 +1,18 @@ +package pro.gravit.launchserver.socket.response.management; + +import io.netty.channel.ChannelHandlerContext; +import pro.gravit.launcher.base.events.request.GetConnectUUIDRequestEvent; +import pro.gravit.launchserver.socket.Client; +import pro.gravit.launchserver.socket.response.SimpleResponse; + +public class GetConnectUUIDResponse extends SimpleResponse { + @Override + public String getType() { + return "getConnectUUID"; + } + + @Override + public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + sendResult(new GetConnectUUIDRequestEvent(connectUUID)); + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java new file mode 100644 index 00000000..81594ded --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java @@ -0,0 +1,18 @@ +package pro.gravit.launcher.base.events.request; + +import pro.gravit.launcher.base.events.RequestEvent; + +import java.util.UUID; + +public class GetConnectUUIDRequestEvent extends RequestEvent { + public UUID connectUUID; + + public GetConnectUUIDRequestEvent(UUID connectUUID) { + this.connectUUID = connectUUID; + } + + @Override + public String getType() { + return "getConnectUUID"; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/GetConnectUUIDRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/GetConnectUUIDRequest.java new file mode 100644 index 00000000..a56bf98e --- /dev/null +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/management/GetConnectUUIDRequest.java @@ -0,0 +1,11 @@ +package pro.gravit.launcher.base.request.management; + +import pro.gravit.launcher.base.events.request.GetConnectUUIDRequestEvent; +import pro.gravit.launcher.base.request.Request; + +public class GetConnectUUIDRequest extends Request { + @Override + public String getType() { + return "getConnectUUID"; + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java index e5564f37..11fd7493 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientWebSocketService.java @@ -113,6 +113,7 @@ public void registerResults() { results.register("getPublicKey", GetPublicKeyRequestEvent.class); results.register("getAssetUploadUrl", GetAssetUploadUrlRequestEvent.class); results.register("assetUploadInfo", AssetUploadInfoRequestEvent.class); + results.register("getConnectUUID", GetConnectUUIDRequestEvent.class); resultsRegistered = true; } } From 666644c9e0c6908390410e5b4e493a13dd2a1507 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:12:50 +0700 Subject: [PATCH 39/73] [FEATURE] GetConnectUUIDCommand, shardId --- .../pro/gravit/launchserver/LaunchServer.java | 4 +++- .../launchserver/LaunchServerBuilder.java | 11 ++++++++- .../management/GetConnectUUIDResponse.java | 2 +- .../console/GetConnectUUIDCommand.java | 23 +++++++++++++++++++ .../request/GetConnectUUIDRequestEvent.java | 4 +++- 5 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 Launcher/src/main/java/pro/gravit/launcher/runtime/console/GetConnectUUIDCommand.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 2720e668..13236d5a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -115,11 +115,12 @@ public final class LaunchServer implements Runnable, AutoCloseable, Reconfigurab public final AtomicBoolean started = new AtomicBoolean(false); public final LauncherModuleLoader launcherModuleLoader; private final Logger logger = LogManager.getLogger(); + public final int shardId; public LaunchServerConfig config; // Updates and profiles private volatile Set profilesList; - public LaunchServer(LaunchServerDirectories directories, LaunchServerEnv env, LaunchServerConfig config, LaunchServerRuntimeConfig runtimeConfig, LaunchServerConfigManager launchServerConfigManager, LaunchServerModulesManager modulesManager, KeyAgreementManager keyAgreementManager, CommandHandler commandHandler, CertificateManager certificateManager) throws IOException { + public LaunchServer(LaunchServerDirectories directories, LaunchServerEnv env, LaunchServerConfig config, LaunchServerRuntimeConfig runtimeConfig, LaunchServerConfigManager launchServerConfigManager, LaunchServerModulesManager modulesManager, KeyAgreementManager keyAgreementManager, CommandHandler commandHandler, CertificateManager certificateManager, int shardId) throws IOException { this.dir = directories.dir; this.tmpDir = directories.tmpDir; this.env = env; @@ -136,6 +137,7 @@ public LaunchServer(LaunchServerDirectories directories, LaunchServerEnv env, La launcherLibraries = directories.launcherLibrariesDir; launcherLibrariesCompile = directories.launcherLibrariesCompileDir; launcherPack = directories.launcherPackDir; + this.shardId = shardId; if(!Files.isDirectory(launcherPack)) { Files.createDirectories(launcherPack); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java index ee7de119..3082eecf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerBuilder.java @@ -19,6 +19,7 @@ public class LaunchServerBuilder { private KeyAgreementManager keyAgreementManager; private CertificateManager certificateManager; private LaunchServer.LaunchServerConfigManager launchServerConfigManager; + private Integer shardId; public LaunchServerBuilder setConfig(LaunchServerConfig config) { this.config = config; @@ -55,6 +56,11 @@ public LaunchServerBuilder setDir(Path dir) { return this; } + public LaunchServerBuilder setShardId(Integer shardId) { + this.shardId = shardId; + return this; + } + public LaunchServerBuilder setLaunchServerConfigManager(LaunchServer.LaunchServerConfigManager launchServerConfigManager) { this.launchServerConfigManager = launchServerConfigManager; return this; @@ -68,7 +74,10 @@ public LaunchServer build() throws Exception { if (keyAgreementManager == null) { keyAgreementManager = new KeyAgreementManager(directories.keyDirectory); } - return new LaunchServer(directories, env, config, runtimeConfig, launchServerConfigManager, modulesManager, keyAgreementManager, commandHandler, certificateManager); + if(shardId == null) { + shardId = Integer.parseInt(System.getProperty("launchserver.shardId", "0")); + } + return new LaunchServer(directories, env, config, runtimeConfig, launchServerConfigManager, modulesManager, keyAgreementManager, commandHandler, certificateManager, shardId); } public LaunchServerBuilder setCertificateManager(CertificateManager certificateManager) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java index b4f05dcb..2bcd2c0d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetConnectUUIDResponse.java @@ -13,6 +13,6 @@ public String getType() { @Override public void execute(ChannelHandlerContext ctx, Client client) throws Exception { - sendResult(new GetConnectUUIDRequestEvent(connectUUID)); + sendResult(new GetConnectUUIDRequestEvent(connectUUID, server.shardId)); } } diff --git a/Launcher/src/main/java/pro/gravit/launcher/runtime/console/GetConnectUUIDCommand.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/GetConnectUUIDCommand.java new file mode 100644 index 00000000..ae3b0e11 --- /dev/null +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/console/GetConnectUUIDCommand.java @@ -0,0 +1,23 @@ +package pro.gravit.launcher.runtime.console; + +import pro.gravit.launcher.base.request.management.GetConnectUUIDRequest; +import pro.gravit.utils.command.Command; +import pro.gravit.utils.helper.LogHelper; + +public class GetConnectUUIDCommand extends Command { + @Override + public String getArgsDescription() { + return null; + } + + @Override + public String getUsageDescription() { + return "Get your connectUUID"; + } + + @Override + public void invoke(String... args) throws Exception { + var response = new GetConnectUUIDRequest().request(); + LogHelper.info("Your connectUUID: %s | shardId %d", response.connectUUID.toString(), response.shardId); + } +} diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java index 81594ded..28fad350 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/events/request/GetConnectUUIDRequestEvent.java @@ -6,9 +6,11 @@ public class GetConnectUUIDRequestEvent extends RequestEvent { public UUID connectUUID; + public int shardId; - public GetConnectUUIDRequestEvent(UUID connectUUID) { + public GetConnectUUIDRequestEvent(UUID connectUUID, int shardId) { this.connectUUID = connectUUID; + this.shardId = shardId; } @Override From 3e8c1adebe1149a003f209374a9f323aff5b6b6c Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:20:55 +0700 Subject: [PATCH 40/73] [FIX] GetConnectUUIDCommand --- .../pro/gravit/launcher/runtime/managers/ConsoleManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/ConsoleManager.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/ConsoleManager.java index 67fc9e0f..1c0945de 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/ConsoleManager.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/managers/ConsoleManager.java @@ -3,6 +3,7 @@ import pro.gravit.launcher.base.Launcher; import pro.gravit.launcher.runtime.LauncherEngine; import pro.gravit.launcher.client.events.ClientUnlockConsoleEvent; +import pro.gravit.launcher.runtime.console.GetConnectUUIDCommand; import pro.gravit.launcher.runtime.console.UnlockCommand; import pro.gravit.launcher.runtime.console.test.PrintHardwareInfoCommand; import pro.gravit.utils.command.CommandHandler; @@ -46,6 +47,7 @@ public static void registerCommands() { handler.registerCommand("clear", new ClearCommand(handler)); handler.registerCommand("unlock", new UnlockCommand()); handler.registerCommand("printhardware", new PrintHardwareInfoCommand()); + handler.registerCommand("getconnectuuid", new GetConnectUUIDCommand()); } public static boolean checkUnlockKey(String key) { From 8cd43b032414766811bcc9f2fb2bc58d645d3393 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:33:43 +0700 Subject: [PATCH 41/73] [FEATURE] clearLauncherPackages, LaunchServerControlHolder --- .../java/pro/gravit/launchserver/Main.java | 7 +++++- .../holder/LaunchServerControlHolder.java | 24 +++++++++++++++++++ .../pro/gravit/utils/launch/BasicLaunch.java | 5 ++++ .../utils/launch/ClassLoaderControl.java | 1 + .../pro/gravit/utils/launch/LegacyLaunch.java | 9 +++++++ .../pro/gravit/utils/launch/ModuleLaunch.java | 9 +++++++ 6 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 LaunchServer/src/main/java/pro/gravit/launchserver/holder/LaunchServerControlHolder.java diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java index 8026ddb2..a4bbc556 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java @@ -1,5 +1,6 @@ package pro.gravit.launchserver; +import pro.gravit.launchserver.holder.LaunchServerControlHolder; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.launch.ClassLoaderControl; import pro.gravit.utils.launch.LaunchOptions; @@ -54,7 +55,6 @@ public static void main(String[] args) throws Throwable { unpackLog4j(); ModuleLaunch launch = new ModuleLaunch(); LaunchOptions options = new LaunchOptions(); - options.disablePackageDelegateSupport = true; options.moduleConf = new LaunchOptions.ModuleConf(); List libraries; try(Stream files = Files.walk(Path.of("libraries"), FileVisitOption.FOLLOW_LINKS)) { @@ -73,7 +73,12 @@ public static void main(String[] args) throws Throwable { options.moduleConf.modulePath.addAll(modulepath); options.moduleConf.modules.add("ALL-MODULE-PATH"); ClassLoaderControl control = launch.init(classpath, "natives", options); + control.clearLauncherPackages(); + control.addLauncherPackage("pro.gravit.utils.launch"); + control.addLauncherPackage("pro.gravit.launchserver.holder"); ModuleLayer.Controller controller = (ModuleLayer.Controller) control.getJava9ModuleController(); + LaunchServerControlHolder.setControl(control); + LaunchServerControlHolder.setController(controller); launch.launch("pro.gravit.launchserver.LaunchServerStarter", null, Arrays.asList(args)); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/holder/LaunchServerControlHolder.java b/LaunchServer/src/main/java/pro/gravit/launchserver/holder/LaunchServerControlHolder.java new file mode 100644 index 00000000..a29d4cd4 --- /dev/null +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/holder/LaunchServerControlHolder.java @@ -0,0 +1,24 @@ +package pro.gravit.launchserver.holder; + +import pro.gravit.utils.launch.ClassLoaderControl; + +public class LaunchServerControlHolder { + private static ClassLoaderControl control; + private static ModuleLayer.Controller controller; + + public static ClassLoaderControl getControl() { + return control; + } + + public static void setControl(ClassLoaderControl control) { + LaunchServerControlHolder.control = control; + } + + public static ModuleLayer.Controller getController() { + return controller; + } + + public static void setController(ModuleLayer.Controller controller) { + LaunchServerControlHolder.controller = controller; + } +} diff --git a/LauncherCore/src/main/java/pro/gravit/utils/launch/BasicLaunch.java b/LauncherCore/src/main/java/pro/gravit/utils/launch/BasicLaunch.java index 1cb326a4..b4865b8d 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/launch/BasicLaunch.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/launch/BasicLaunch.java @@ -56,6 +56,11 @@ public void addLauncherPackage(String prefix) { throw new UnsupportedOperationException(); } + @Override + public void clearLauncherPackages() { + throw new UnsupportedOperationException(); + } + @Override public void addTransformer(ClassTransformer transformer) { if (instrumentation == null) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/launch/ClassLoaderControl.java b/LauncherCore/src/main/java/pro/gravit/utils/launch/ClassLoaderControl.java index 08e44065..8d2cfd98 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/launch/ClassLoaderControl.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/launch/ClassLoaderControl.java @@ -7,6 +7,7 @@ public interface ClassLoaderControl { void addLauncherPackage(String prefix); + void clearLauncherPackages(); void addTransformer(ClassTransformer transformer); void addURL(URL url); void addJar(Path path); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/launch/LegacyLaunch.java b/LauncherCore/src/main/java/pro/gravit/utils/launch/LegacyLaunch.java index 08f65795..1a155fe4 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/launch/LegacyLaunch.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/launch/LegacyLaunch.java @@ -126,6 +126,10 @@ public void addAllowedPackage(String pkg) { packages.add(pkg); } + public void clearAllowedPackages() { + packages.clear(); + } + private LegacyClassLoaderControl makeControl() { return new LegacyClassLoaderControl(); } @@ -137,6 +141,11 @@ public void addLauncherPackage(String prefix) { addAllowedPackage(prefix); } + @Override + public void clearLauncherPackages() { + clearAllowedPackages(); + } + @Override public void addTransformer(ClassTransformer transformer) { transformers.add(transformer); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java b/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java index ab4d829d..5a414ea8 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/launch/ModuleLaunch.java @@ -264,6 +264,10 @@ public void addAllowedPackage(String pkg) { packages.add(pkg); } + public void clearAllowedPackages() { + packages.clear(); + } + private ModuleClassLoaderControl makeControl() { return new ModuleClassLoaderControl(); } @@ -275,6 +279,11 @@ public void addLauncherPackage(String prefix) { addAllowedPackage(prefix); } + @Override + public void clearLauncherPackages() { + clearAllowedPackages(); + } + @Override public void addTransformer(ClassTransformer transformer) { transformers.add(transformer); From b21082e201bfcf7921da21666e4cdf1544058b34 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:50:58 +0700 Subject: [PATCH 42/73] [FIX] Netty in ServerWrapper --- ServerWrapper/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index 9937f08f..68a4f2bc 100644 --- a/ServerWrapper/build.gradle +++ b/ServerWrapper/build.gradle @@ -39,13 +39,11 @@ dependencies { pack project(':LauncherAPI') - pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] } shadowJar { duplicatesStrategy = 'EXCLUDE' archiveClassifier = null - relocate 'io.netty', 'pro.gravit.repackage.io.netty' configurations = [project.configurations.pack] exclude 'module-info.class' } From 7a96e6751748f01e5f316cb75c367439f9a4fa16 Mon Sep 17 00:00:00 2001 From: Gravit <12893402+gravit0@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:11:24 +0700 Subject: [PATCH 43/73] Update push.yml --- .github/workflows/push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e432fedc..00c8687f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -26,6 +26,8 @@ jobs: - name: Build with Gradle run: ./gradlew build + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 - name: Create artifacts run: | From ead4689bcf823287e1bf8a7ddde1174577efe849 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:18:09 +0700 Subject: [PATCH 44/73] [FIX] checkServer token --- .../java/pro/gravit/launchserver/manangers/AuthManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java index 7c01ab38..e6262f87 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java @@ -51,7 +51,7 @@ public String newCheckServerToken(String serverName, String authId, boolean publ .claim("serverName", serverName) .claim("authId", authId) .claim("tokenType", "checkServer") - .claim("isPublic", publicOnly ? "true" : "false") + .claim("isPublic", publicOnly) .signWith(server.keyAgreementManager.ecdsaPrivateKey) .compact(); } From f484f045ca7dd76d4f1dcbb2a7f88b3e17f41155 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 3 Mar 2024 13:39:28 +0700 Subject: [PATCH 45/73] [FEATURE] FxRuntimeOptimizerModule --- .../launchserver/binary/BuildContext.java | 23 ++++++++++++++++++- .../binary/tasks/MainBuildTask.java | 9 +++++--- Launcher/build.gradle | 5 ---- build.gradle | 2 +- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java index 3bf50c71..b00633f7 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java @@ -46,11 +46,14 @@ public class BuildContext { public final HashSet fileList; public final HashSet clientModules; public final HashSet legacyClientModules; + private Path runtimeDir; + private boolean deleteRuntimeDir; - public BuildContext(ZipOutputStream output, List readerClassPath, MainBuildTask task) { + public BuildContext(ZipOutputStream output, List readerClassPath, MainBuildTask task, Path runtimeDir) { this.output = output; this.readerClassPath = readerClassPath; this.task = task; + this.runtimeDir = runtimeDir; fileList = new HashSet<>(1024); clientModules = new HashSet<>(); legacyClientModules = new HashSet<>(); @@ -103,6 +106,14 @@ public void pushJarFile(Path jarfile, Predicate filter, Predicate filter, Predicate needTransform) throws IOException { try (ZipInputStream input = new ZipInputStream(IOHelper.newInput(jarfile))) { ZipEntry e = input.getNextEntry(); @@ -129,6 +140,16 @@ public void pushJarFile(URL jarfile, Predicate filter, Predicate { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java index 0be26b3a..9475456f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java @@ -53,7 +53,7 @@ public String getName() { public Path process(Path inputJar) throws IOException { Path outputJar = server.launcherBinary.nextPath(this); try (ZipOutputStream output = new ZipOutputStream(IOHelper.newOutput(outputJar))) { - BuildContext context = new BuildContext(output, reader.getCp(), this); + BuildContext context = new BuildContext(output, reader.getCp(), this, server.launcherBinary.runtimeDir); initProps(); preBuildHook.hook(context); properties.put("launcher.legacymodules", context.legacyClientModules.stream().map(e -> Type.getObjectType(e.replace('.', '/'))).collect(Collectors.toList())); @@ -69,9 +69,12 @@ public Path process(Path inputJar) throws IOException { Map runtime = new HashMap<>(256); // Write launcher guard dir if (server.config.launcher.encryptRuntime) { - context.pushEncryptedDir(server.launcherBinary.runtimeDir, Launcher.RUNTIME_DIR, server.runtime.runtimeEncryptKey, runtime, false); + context.pushEncryptedDir(context.getRuntimeDir(), Launcher.RUNTIME_DIR, server.runtime.runtimeEncryptKey, runtime, false); } else { - context.pushDir(server.launcherBinary.runtimeDir, Launcher.RUNTIME_DIR, runtime, false); + context.pushDir(context.getRuntimeDir(), Launcher.RUNTIME_DIR, runtime, false); + } + if(context.isDeleteRuntimeDir()) { + IOHelper.deleteDir(context.getRuntimeDir(), true); } LauncherConfig launcherConfig = new LauncherConfig(server.config.netty.address, server.keyAgreementManager.ecdsaPublicKey, server.keyAgreementManager.rsaPublicKey, runtime, server.config.projectName); diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 11bf8b2b..9c7b81ba 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -1,4 +1,3 @@ -apply plugin: 'org.openjfx.javafxplugin' apply plugin: 'com.github.johnrengelman.shadow' String mainClassName = "pro.gravit.launcher.start.ClientLauncherWrapper" @@ -9,10 +8,6 @@ url "https://repo.spring.io/plugins-release/" } } -javafx { - version = "12" - modules = ['javafx.controls', 'javafx.fxml'] -} sourceCompatibility = '17' targetCompatibility = '17' diff --git a/build.gradle b/build.gradle index a586a61d..d8bf3d63 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ id 'com.github.johnrengelman.shadow' version '7.1.2' apply false id 'maven-publish' id 'signing' - id 'org.openjfx.javafxplugin' version '0.0.10' apply false + id 'org.openjfx.javafxplugin' version '0.1.0' apply false } group = 'pro.gravit.launcher' version = '5.6.0-SNAPSHOT' From 3179ee00eb04b99487161e035ec81f506761044f Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 3 Mar 2024 13:39:49 +0700 Subject: [PATCH 46/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index c176ddfe..ade7dbc8 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit c176ddfef61247e98e3832921877ec4a79cdcc63 +Subproject commit ade7dbc8584d2f13b68bc26dee4927b4e869f639 From 29619bb7a4acf85e7692bb15e64b65c9765aa3eb Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 3 Mar 2024 15:29:58 +0700 Subject: [PATCH 47/73] [FIX] WebSocket dev log --- .../launcher/base/request/websockets/ClientJSONPoint.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java index 0cc63d33..08df0ec1 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java @@ -85,6 +85,7 @@ public CompletionStage onText(WebSocket webSocket, CharSequence data, boolean if(last) { String message = builder.toString(); builder = new StringBuilder(); + LogHelper.dev("Received %s", message); onMessage(message); } } @@ -104,6 +105,7 @@ public void onError(WebSocket webSocket, Throwable error) { } public void send(String text) { + LogHelper.dev("Send %s", text); webSocket.sendText(text, true); } From 7ff062f9e41c6584663978f620b0407afda4299b Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:48:35 +0700 Subject: [PATCH 48/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index ade7dbc8..aba0b84a 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit ade7dbc8584d2f13b68bc26dee4927b4e869f639 +Subproject commit aba0b84aec4cc647e28879e642361c6f9d7797b7 From e28c9773fc36c381c83ea9bdcd7e68787cfc5571 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:07:02 +0700 Subject: [PATCH 49/73] [FIX] file.encoding utf-8 by default --- .../java/pro/gravit/launchserver/config/LaunchServerConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 82598844..9300340a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -75,6 +75,7 @@ public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { newConfig.launcher.compress = true; newConfig.launcher.deleteTempFiles = true; newConfig.launcher.stripLineNumbers = true; + newConfig.launcher.customJvmOptions.add("-Dfile.encoding=UTF-8"); newConfig.sign = new JarSignerConf(); From d686d9a388f4355228b53022a6ea912bf14f8dfd Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:37:15 +0700 Subject: [PATCH 50/73] [FEATURE] Add newHttpClientBuilder() --- .../pro/gravit/launcher/base/Downloader.java | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java index 4517bdc2..f7f0038a 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java @@ -6,6 +6,7 @@ import pro.gravit.utils.helper.LogHelper; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLSocketFactory; import java.io.IOException; import java.net.URI; @@ -55,6 +56,24 @@ public static ThreadFactory getDaemonThreadFactory(String name) { }; } + public static HttpClient.Builder newHttpClientBuilder() { + try { + if(isCertificatePinning) { + return HttpClient.newBuilder() + .sslContext(makeSSLContext()) + .version(isNoHttp2 ? HttpClient.Version.HTTP_1_1 : HttpClient.Version.HTTP_2) + .followRedirects(HttpClient.Redirect.NORMAL); + } else { + return HttpClient.newBuilder() + .version(isNoHttp2 ? HttpClient.Version.HTTP_1_1 : HttpClient.Version.HTTP_2) + .followRedirects(HttpClient.Redirect.NORMAL); + } + } catch (NoSuchAlgorithmException | CertificateException | KeyStoreException | IOException | + KeyManagementException e) { + throw new RuntimeException(e); + } + } + public static SSLSocketFactory makeSSLSocketFactory() throws NoSuchAlgorithmException, CertificateException, KeyStoreException, IOException, KeyManagementException { if (sslSocketFactory != null) return sslSocketFactory; SSLContext sslContext = makeSSLContext(); @@ -110,17 +129,8 @@ public static Downloader newDownloader(ExecutorService executor) { if (executor == null) { throw new NullPointerException(); } - HttpClient.Builder builder = HttpClient.newBuilder() - .version(isNoHttp2 ? HttpClient.Version.HTTP_1_1 : HttpClient.Version.HTTP_2) - .followRedirects(HttpClient.Redirect.NORMAL) + HttpClient.Builder builder = newHttpClientBuilder() .executor(executor); - if (isCertificatePinning) { - try { - builder.sslContext(makeSSLContext()); - } catch (Exception e) { - throw new SecurityException(e); - } - } HttpClient client = builder.build(); return new Downloader(client, executor); } From 494b3227b6bebc2509eeae9927a437709a6d1180 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:46:43 +0700 Subject: [PATCH 51/73] [FIX] Remove deprecated 'new URL' --- .../java/pro/gravit/launcher/base/profiles/Texture.java | 6 +++++- .../src/main/java/pro/gravit/utils/helper/IOHelper.java | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java index 7f917e85..d77fb3b7 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java @@ -8,6 +8,8 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.nio.file.Path; import java.util.Arrays; @@ -29,8 +31,10 @@ public Texture(String url, boolean cloak, Map metadata) throws I // Fetch texture byte[] texture; - try (InputStream input = IOHelper.newInput(new URL(url))) { + try (InputStream input = IOHelper.newInput(new URI(url).toURL())) { texture = IOHelper.read(input); + } catch (URISyntaxException e) { + throw new IOException(e); } try (ByteArrayInputStream input = new ByteArrayInputStream(texture)) { IOHelper.readTexture(input, cloak); // Verify texture diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java index 0f008c38..b1a4686f 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java @@ -95,8 +95,8 @@ public static Manifest getManifest(Class clazz) { public static URL convertToURL(String url) { try { - return new URL(url); - } catch (MalformedURLException e) { + return new URI(url).toURL(); + } catch (MalformedURLException | URISyntaxException e) { throw new IllegalArgumentException("Invalid URL", e); } } @@ -576,9 +576,9 @@ public static BufferedImage verifyTexture(BufferedImage skin, boolean cloak) { public static String verifyURL(String url) { try { - new URL(url).toURI(); + new URI(url); return url; - } catch (MalformedURLException | URISyntaxException e) { + } catch (URISyntaxException e) { throw new IllegalArgumentException("Invalid URL", e); } } From 998db808373fe14d25e9cabc1b312952e0610cb8 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:46:55 +0700 Subject: [PATCH 52/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index aba0b84a..22288f21 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit aba0b84aec4cc647e28879e642361c6f9d7797b7 +Subproject commit 22288f216709ecfc75659730418f775f47dbfbfc From 3002371fad3a68f40e951327ce152dde7ab0cfda Mon Sep 17 00:00:00 2001 From: microwin7 Date: Sat, 9 Mar 2024 00:40:28 +0300 Subject: [PATCH 53/73] [FEATURE] Sort jar files, before patching in installAuthlib --- .../launcher/server/authlib/InstallAuthlib.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java index 3cdf6d22..2db343cb 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java @@ -15,6 +15,7 @@ public class InstallAuthlib { private static final Map modifierMap; + private static final String LaunchAuthLibName = "authlib.jar"; static { modifierMap = new HashMap<>(); modifierMap.put("META-INF/libraries.list", new LibrariesLstModifier()); @@ -26,7 +27,7 @@ public void run(String... args) throws Exception { boolean deleteAuthlibAfterInstall = false; InstallAuthlibContext context = new InstallAuthlibContext(); if(args[0].startsWith("http://") || args[0].startsWith("https://")) { - Path tempAuthlib = Paths.get("authlib.jar"); + Path tempAuthlib = Paths.get(LaunchAuthLibName); LogHelper.info("Download %s to %s", args[0], tempAuthlib); try(InputStream input = IOHelper.newInput(new URL(args[0]))) { IOHelper.transfer(input, tempAuthlib); @@ -44,12 +45,14 @@ public void run(String... args) throws Exception { IOHelper.walk(context.workdir, new SimpleFileVisitor<>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { - if (file.getFileName().toString().endsWith(".jar")) { + if (file.getFileName().toString().endsWith(".jar") && !file.getFileName().toString().equals(LaunchAuthLibName)) { context.files.add(file); } return FileVisitResult.CONTINUE; } }, true); + context.files.sort(Comparator.comparingInt((Path path) -> - countSlashes(path.toString())) + .thenComparing(Comparator.naturalOrder())); LogHelper.info("Search authlib in %d files", context.files.size()); for(Path path : context.files) { boolean foundAuthlib = false; @@ -215,6 +218,10 @@ private byte[] repackAuthlibJar(byte[] data, Path path) throws IOException { } } + private static int countSlashes(String s) { + return (int) s.chars().filter(c -> c == '/').count(); + } + public static class RepackInfo { public Path path; public String prefix; From ef5f932afb7a6564ecb0c4999600b0ee6e703ba6 Mon Sep 17 00:00:00 2001 From: microwin7 Date: Sat, 9 Mar 2024 14:24:12 +0300 Subject: [PATCH 54/73] [FIX] Sort files in installAuthlib --- .../server/authlib/InstallAuthlib.java | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java index 2db343cb..a5ed38cf 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java @@ -15,7 +15,7 @@ public class InstallAuthlib { private static final Map modifierMap; - private static final String LaunchAuthLibName = "authlib.jar"; + private static final String tempLaunchAuthLibName = "authlib.jar"; static { modifierMap = new HashMap<>(); modifierMap.put("META-INF/libraries.list", new LibrariesLstModifier()); @@ -27,32 +27,30 @@ public void run(String... args) throws Exception { boolean deleteAuthlibAfterInstall = false; InstallAuthlibContext context = new InstallAuthlibContext(); if(args[0].startsWith("http://") || args[0].startsWith("https://")) { - Path tempAuthlib = Paths.get(LaunchAuthLibName); + Path tempAuthlib = Paths.get(tempLaunchAuthLibName); LogHelper.info("Download %s to %s", args[0], tempAuthlib); try(InputStream input = IOHelper.newInput(new URL(args[0]))) { IOHelper.transfer(input, tempAuthlib); } - context.pathToAuthlib = tempAuthlib; + context.pathToAuthlib = tempAuthlib.toAbsolutePath(); deleteAuthlibAfterInstall = true; } else { - context.pathToAuthlib = Paths.get(args[0]); + context.pathToAuthlib = Paths.get(args[0]).toAbsolutePath(); } if(Files.notExists(context.pathToAuthlib)) { throw new FileNotFoundException(context.pathToAuthlib.toString()); } - context.workdir = IOHelper.WORKING_DIR; LogHelper.info("Search .jar files in %s", context.workdir.toAbsolutePath()); IOHelper.walk(context.workdir, new SimpleFileVisitor<>() { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { - if (file.getFileName().toString().endsWith(".jar") && !file.getFileName().toString().equals(LaunchAuthLibName)) { + if (file.getFileName().toString().endsWith(".jar") && !file.equals(context.pathToAuthlib)) { context.files.add(file); } return FileVisitResult.CONTINUE; } }, true); - context.files.sort(Comparator.comparingInt((Path path) -> - countSlashes(path.toString())) - .thenComparing(Comparator.naturalOrder())); + context.files.sort(Comparator.comparingInt((Path path) -> - path.getNameCount())); LogHelper.info("Search authlib in %d files", context.files.size()); for(Path path : context.files) { boolean foundAuthlib = false; @@ -218,10 +216,6 @@ private byte[] repackAuthlibJar(byte[] data, Path path) throws IOException { } } - private static int countSlashes(String s) { - return (int) s.chars().filter(c -> c == '/').count(); - } - public static class RepackInfo { public Path path; public String prefix; From 666c8a4b3e710c27e77bfc8354919b1221ca95c9 Mon Sep 17 00:00:00 2001 From: Gravit'a <12893402+gravit0@users.noreply.github.com> Date: Sun, 10 Mar 2024 14:03:25 +0700 Subject: [PATCH 55/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 22288f21..6cd9cb1b 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 22288f216709ecfc75659730418f775f47dbfbfc +Subproject commit 6cd9cb1bde5679ba2745aab052ecde58aa88f2b1 From 572052163b82215cd418c5d1e22cd135213767a3 Mon Sep 17 00:00:00 2001 From: Gravit'a <12893402+gravit0@users.noreply.github.com> Date: Sun, 10 Mar 2024 14:47:53 +0700 Subject: [PATCH 56/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 6cd9cb1b..97d53ef1 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 6cd9cb1bde5679ba2745aab052ecde58aa88f2b1 +Subproject commit 97d53ef18cf5208a980ab9431f811fa2f41a8127 From d811a04cba9dd96ba90d6720fd59267addd5e7bc Mon Sep 17 00:00:00 2001 From: Gravit'a <12893402+gravit0@users.noreply.github.com> Date: Sun, 10 Mar 2024 14:53:52 +0700 Subject: [PATCH 57/73] [FIX] DeleteProfileCommand --- .../launchserver/command/profiles/DeleteProfileCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java index 0331f614..642a115c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/profiles/DeleteProfileCommand.java @@ -30,7 +30,7 @@ public void invoke(String... args) throws Exception { verifyArgs(args, 1); ClientProfile profile = null; for(var p : server.getProfiles()) { - if(p.getUUID().toString().equals(args[0]) || p.getTitle().equals(args[1])) { + if(p.getUUID().toString().equals(args[0]) || p.getTitle().equals(args[0])) { profile = p; break; } From e72e4ebb928d2b76ab62e1ff03ec7ebca1914566 Mon Sep 17 00:00:00 2001 From: Gravit'a <12893402+gravit0@users.noreply.github.com> Date: Sun, 10 Mar 2024 14:54:38 +0700 Subject: [PATCH 58/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 97d53ef1..1f4abce7 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 97d53ef18cf5208a980ab9431f811fa2f41a8127 +Subproject commit 1f4abce7b7b9b7c0416f30d6edf7e7d0033b1c76 From 5c7f7eedec8d03d97091d51a624226dcebae4152 Mon Sep 17 00:00:00 2001 From: Gravit'a <12893402+gravit0@users.noreply.github.com> Date: Sun, 10 Mar 2024 15:49:01 +0700 Subject: [PATCH 59/73] [FIX] Possible problem with lwjgl --- .../gravit/launcher/base/api/ClientService.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ClientService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ClientService.java index 6228e8ea..4bcf9e88 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ClientService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/api/ClientService.java @@ -14,6 +14,19 @@ public class ClientService { public static URL[] baseURLs; public static String findLibrary(String name) { - return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION); + if(name == null) { + return null; + } + var needExt = !name.endsWith(JVMHelper.NATIVE_EXTENSION); + var needPrefix = !name.startsWith(JVMHelper.NATIVE_PREFIX); + if(needExt && needPrefix) { + return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name).concat(JVMHelper.NATIVE_EXTENSION); + } else if(needExt) { + return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(name).concat(JVMHelper.NATIVE_EXTENSION); + } else if(needPrefix) { + return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(JVMHelper.NATIVE_PREFIX).concat(name); + } else { + return nativePath.concat(IOHelper.PLATFORM_SEPARATOR).concat(name); + } } } From bc6da641d6f45257285098a2f0eddc391573860a Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:08:22 +0700 Subject: [PATCH 60/73] [FEATURE] Support autobuild lwjgl3ify --- .../helper/MakeProfileHelper.java | 75 +++++++++++++------ .../client/ClientLauncherEntryPoint.java | 18 ++++- 2 files changed, 66 insertions(+), 27 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java index 7f81329a..d627d3ed 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/MakeProfileHelper.java @@ -27,6 +27,7 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti builder.setMainClass(getMainClassByVersion(version, options)); builder.setServers(List.of(new ClientProfile.ServerProfile(title, "localhost", 25565))); // ------------ + var lwjgl3ify = findOption(options, Lwjgl3ifyOption.class); builder.setUpdateVerify(List.of("libraries", "natives", "mods", "minecraft.jar", "forge.jar", "liteloader.jar")); { List classPath = new ArrayList<>(5); @@ -44,8 +45,40 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti jvmArgs.add("-XX:+DisableAttachMechanism"); // Official Mojang launcher java arguments if (version.compareTo(ClientProfileVersions.MINECRAFT_1_12_2) <= 0) { - jvmArgs.add("-XX:+UseConcMarkSweepGC"); - jvmArgs.add("-XX:+CMSIncrementalMode"); + // lwjgl3ify arguments https://github.com/GTNewHorizons/lwjgl3ify + jvmArgs.add("-Djava.security.manager=allow"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/jdk.internal.loader=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/java.net=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/java.nio=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/java.io=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/java.lang=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/java.lang.reflect=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/java.text=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/java.util=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/jdk.internal.reflect=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.base/sun.nio.ch=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED,java.naming"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.desktop/sun.awt=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.desktop/sun.awt.image=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.desktop/com.sun.imageio.plugins.png=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED"); + jvmArgs.add("--add-opens"); + jvmArgs.add("java.sql.rowset/javax.sql.rowset.serial=ALL-UNNAMED"); } else if (version.compareTo(ClientProfileVersions.MINECRAFT_1_18) <= 0) { // 1.13 - 1.16.5 jvmArgs.add("-XX:+UseG1GC"); jvmArgs.add("-XX:+UnlockExperimentalVMOptions"); @@ -116,14 +149,8 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti } } } - if (version.compareTo(ClientProfileVersions.MINECRAFT_1_17) >= 0 && version.compareTo(ClientProfileVersions.MINECRAFT_1_18) < 0) { - builder.setMinJavaVersion(16); - builder.setRecommendJavaVersion(16); - } - if (version.compareTo(ClientProfileVersions.MINECRAFT_1_18) >= 0) { - builder.setMinJavaVersion(17); - builder.setRecommendJavaVersion(17); - } + builder.setMinJavaVersion(17); + builder.setRecommendJavaVersion(17); if(version.compareTo(ClientProfileVersions.MINECRAFT_1_20_3) >= 0) { builder.setMinJavaVersion(21); builder.setRecommendJavaVersion(21); @@ -133,7 +160,10 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti builder.setJvmArgs(jvmArgs); builder.setUpdateOptional(optionals); List clientArgs = new ArrayList<>(); - if (findOption(options, MakeProfileOptionLaunchWrapper.class).isPresent()) { + if(version.compareTo(ClientProfileVersions.MINECRAFT_1_7_10) == 0) { + jvmArgs.add("-Drfb.skipClassLoaderCheck=true"); + } + if (findOption(options, MakeProfileOptionLaunchWrapper.class).isPresent() || findOption(options, MakeProfileRfbOption.class).isPresent()) { if (findOption(options, MakeProfileOptionLiteLoader.class).isPresent()) { clientArgs.add("--tweakClass"); clientArgs.add("com.mumfrey.liteloader.launch.LiteLoaderTweaker"); @@ -145,20 +175,9 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti } else { clientArgs.add("cpw.mods.fml.common.launcher.FMLTweaker"); } - if (version.compareTo(ClientProfileVersions.MINECRAFT_1_12_2) <= 0) { - builder.setMinJavaVersion(8); - builder.setRecommendJavaVersion(8); - builder.setMaxJavaVersion(8); - } } } else if (version.compareTo(ClientProfileVersions.MINECRAFT_1_12_2) > 0) { - if (forge.isPresent()) { - clientArgs.addAll(forge.get().makeClientArgs()); - builder.setClassLoaderConfig(ClientProfile.ClassLoaderConfig.SYSTEM_ARGS); - if (version.compareTo(ClientProfileVersions.MINECRAFT_1_16_5) <= 0) { - builder.setMaxJavaVersion(15); - } - } + forge.ifPresent(makeProfileOptionForge -> clientArgs.addAll(makeProfileOptionForge.makeClientArgs())); } builder.setClientArgs(clientArgs); @@ -171,6 +190,9 @@ private static Optional findOption(MakeProfileOption[] options, Class } public static String getMainClassByVersion(ClientProfile.Version version, MakeProfileOption... options) { + if(version.compareTo(ClientProfileVersions.MINECRAFT_1_7_10) == 0) { + return "com.gtnewhorizons.retrofuturabootstrap.Main"; + } if (findOption(options, MakeProfileOptionLaunchWrapper.class).isPresent()) { return "net.minecraft.launchwrapper.Launch"; } @@ -320,6 +342,13 @@ public static class MakeProfileOptionLaunchWrapper implements MakeProfileOption } + public static class MakeProfileRfbOption implements MakeProfileOption { + + } + + public record Lwjgl3ifyOption(String lwjgl3ifyForgePatches) implements MakeProfileOption { + } + public static class MakeProfileOptionFabric implements MakeProfileOption { public String jimfsPath; public String guavaPath; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java index e67726dc..6c83934e 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java @@ -121,6 +121,11 @@ private static void realMain(String[] args) throws Throwable { List classpath = resolveClassPath(clientDir, params.actions, params.profile) .filter(x -> !profile.getModulePath().contains(clientDir.relativize(x).toString())) .collect(Collectors.toCollection(ArrayList::new)); + if(LogHelper.isDevEnabled()) { + for(var e : classpath) { + LogHelper.dev("Classpath entry %s", e); + } + } List classpathURLs = classpath.stream().map(IOHelper::toURL).collect(Collectors.toList()); // Start client with WatchService monitoring RequestService service; @@ -256,7 +261,12 @@ private static Stream resolveClassPathStream(Path clientDir, String... cla for (String classPathEntry : classPath) { Path path = clientDir.resolve(IOHelper.toPath(classPathEntry.replace(IOHelper.CROSS_SEPARATOR, IOHelper.PLATFORM_SEPARATOR))); if (IOHelper.isDir(path)) { // Recursive walking and adding - IOHelper.walk(path, new ClassPathFileVisitor(builder), false); + List jars = new ArrayList<>(32); + IOHelper.walk(path, new ClassPathFileVisitor(jars), false); + Collections.sort(jars); + for(var e : jars) { + builder.accept(e); + } continue; } builder.accept(path); @@ -322,16 +332,16 @@ private static void launch(ClientProfile profile, ClientParams params) throws Th } private static final class ClassPathFileVisitor extends SimpleFileVisitor { - private final Stream.Builder result; + private final List result; - private ClassPathFileVisitor(Stream.Builder result) { + private ClassPathFileVisitor(List result) { this.result = result; } @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { if (IOHelper.hasExtension(file, "jar") || IOHelper.hasExtension(file, "zip")) - result.accept(file); + result.add(file); return super.visitFile(file, attrs); } } From 730efae7c70edc9858d96ad563b8294653934f4d Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:08:35 +0700 Subject: [PATCH 61/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 1f4abce7..df5e6bd7 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 1f4abce7b7b9b7c0416f30d6edf7e7d0033b1c76 +Subproject commit df5e6bd7e2ab3078f9f2860e21112cbf85dce098 From 044813cca26667a742e322eec5164e484853034a Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:56:23 +0700 Subject: [PATCH 62/73] [FIX] Fix resolution of files with special characters for embedded file server --- .../socket/handlers/fileserver/FileServerHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java index 393443cb..1a3f9588 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java @@ -14,6 +14,8 @@ import java.io.RandomAccessFile; import java.net.URI; import java.net.URISyntaxException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; import java.time.Clock; @@ -186,7 +188,7 @@ public void channelRead0(ChannelHandlerContext ctx, FullHttpRequest request) thr final String path; try { - path = Paths.get(new URI(uri).getPath()).normalize().toString().substring(1); + path = Paths.get(new URI(URLEncoder.encode(uri, StandardCharsets.UTF_8)).getPath()).normalize().toString().substring(1); } catch (URISyntaxException e) { sendError(ctx, BAD_REQUEST); return; From ac6c312ed41e6ecea1b31044d1ff75bb03f83269 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:46:17 +0700 Subject: [PATCH 63/73] [FIX] Fix log4j config unpacking (#704) --- LaunchServer/src/main/java/pro/gravit/launchserver/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java index a4bbc556..8361e8f4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java @@ -37,7 +37,7 @@ private static void unpackLog4j() { Path log4jConfigPath = Path.of("log4j2.xml"); if(!Files.exists(log4jConfigPath)) { try(FileOutputStream output = new FileOutputStream(log4jConfigPath.toFile())) { - try(InputStream input = Main.class.getResourceAsStream("log4j2.xml")) { + try(InputStream input = Main.class.getResourceAsStream("/log4j2.xml")) { if(input == null) { return; } From 7759ea9182304cc192de111a2d13664d689a5f5e Mon Sep 17 00:00:00 2001 From: microwin7 Date: Tue, 12 Mar 2024 19:33:17 +0300 Subject: [PATCH 64/73] Revert "Merge pull request #703 from zznty/dev" This reverts commit 3e6af5afd3db11e21e3419b95322eb4c52cdc800, reversing changes made to 730efae7c70edc9858d96ad563b8294653934f4d. --- .../socket/handlers/fileserver/FileServerHandler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java index 1a3f9588..393443cb 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java @@ -14,8 +14,6 @@ import java.io.RandomAccessFile; import java.net.URI; import java.net.URISyntaxException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; import java.time.Clock; @@ -188,7 +186,7 @@ public void channelRead0(ChannelHandlerContext ctx, FullHttpRequest request) thr final String path; try { - path = Paths.get(new URI(URLEncoder.encode(uri, StandardCharsets.UTF_8)).getPath()).normalize().toString().substring(1); + path = Paths.get(new URI(uri).getPath()).normalize().toString().substring(1); } catch (URISyntaxException e) { sendError(ctx, BAD_REQUEST); return; From 3926f3e5bfb11fc5c382fbed9970dfbb35746cda Mon Sep 17 00:00:00 2001 From: XakepSDK Date: Thu, 14 Mar 2024 17:07:44 +0600 Subject: [PATCH 65/73] [ANY] Update JWT library (#706) Co-authored-by: d3coder --- .../launchserver/auth/protect/AdvancedProtectHandler.java | 4 ++-- .../pro/gravit/launchserver/command/service/TokenCommand.java | 2 +- .../pro/gravit/launchserver/helper/LegacySessionHelper.java | 2 +- .../java/pro/gravit/launchserver/manangers/AuthManager.java | 2 +- .../launchserver/socket/response/update/LauncherResponse.java | 2 +- props.gradle | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java index 25caa43f..613e2a5a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java @@ -132,7 +132,7 @@ public static class HardwareInfoTokenVerifier implements RestoreResponse.Extende private final JwtParser parser; public HardwareInfoTokenVerifier(LaunchServer server) { - this.parser = Jwts.parserBuilder() + this.parser = Jwts.parser() .requireIssuer("LaunchServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) .build(); @@ -164,7 +164,7 @@ public static class PublicKeyTokenVerifier implements RestoreResponse.ExtendedTo private final JwtParser parser; public PublicKeyTokenVerifier(LaunchServer server) { - this.parser = Jwts.parserBuilder() + this.parser = Jwts.parser() .requireIssuer("LaunchServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) .build(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java index c2939900..3d644074 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java @@ -18,7 +18,7 @@ public TokenCommand(LaunchServer server) { @Override public void invoke(String... args) throws Exception { verifyArgs(args, 1); - var parser = Jwts.parserBuilder().setSigningKey(server.keyAgreementManager.ecdsaPublicKey).build(); + var parser = Jwts.parser().setSigningKey(server.keyAgreementManager.ecdsaPublicKey).build(); var claims = parser.parseClaimsJws(args[0]); logger.info("Token: {}", claims.getBody()); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java index 9b4acb45..764a7208 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java @@ -25,7 +25,7 @@ public static String makeAccessJwtTokenFromString(User user, LocalDateTime expir } public static JwtTokenInfo getJwtInfoFromAccessToken(String token, ECPublicKey publicKey) { - var parser = Jwts.parserBuilder() + var parser = Jwts.parser() .requireIssuer("LaunchServer") .setClock(() -> new Date(Clock.systemUTC().millis())) .setSigningKey(publicKey) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java index e6262f87..b6122689 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java @@ -38,7 +38,7 @@ public class AuthManager { public AuthManager(LaunchServer server) { this.server = server; - this.checkServerTokenParser = Jwts.parserBuilder() + this.checkServerTokenParser = Jwts.parser() .requireIssuer("LaunchServer") .require("tokenType", "checkServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java index ec4e0b53..f96fb48d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java @@ -89,7 +89,7 @@ public static class LauncherTokenVerifier implements RestoreResponse.ExtendedTok private final Logger logger = LogManager.getLogger(); public LauncherTokenVerifier(LaunchServer server) { - parser = Jwts.parserBuilder() + parser = Jwts.parser() .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) .requireIssuer("LaunchServer") .build(); diff --git a/props.gradle b/props.gradle index e5c70361..6ac97aee 100644 --- a/props.gradle +++ b/props.gradle @@ -6,7 +6,7 @@ verGuavaC = '30.1.1-jre' verJansi = '2.4.1' verJline = '3.25.0' - verJwt = '0.11.5' + verJwt = '0.12.5' verBcprov = '1.70' verGson = '2.10.1' verBcpkix = '1.70' From 1710eb7bec00cf1e8b53a1ff4498b03933c91c42 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sat, 16 Mar 2024 21:50:47 +0700 Subject: [PATCH 66/73] [FIX] Fix resolution of files with special characters for embedded file server (#705) --- .../fileserver/FileServerHandler.java | 16 +++++++--- .../pro/gravit/utils/helper/IOHelper.java | 31 +++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java index 393443cb..2f91224f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java @@ -7,13 +7,13 @@ import io.netty.handler.stream.ChunkedFile; import io.netty.util.CharsetUtil; import pro.gravit.launchserver.socket.handlers.ContentType; +import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.VerifyHelper; import java.io.File; import java.io.FileNotFoundException; import java.io.RandomAccessFile; -import java.net.URI; -import java.net.URISyntaxException; +import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.Paths; import java.time.Clock; @@ -182,12 +182,18 @@ public void channelRead0(ChannelHandlerContext ctx, FullHttpRequest request) thr return; } - final String uri = request.uri(); + // URLDecoder tries to decode string as application/x-www-form-urlencoded which allows + character to be used as space escape therefore breaking file names with + + final String uri = IOHelper.urlDecodeStrict(request.uri()); final String path; + if (uri == null) { + sendError(ctx, NOT_FOUND); + return; + } + try { - path = Paths.get(new URI(uri).getPath()).normalize().toString().substring(1); - } catch (URISyntaxException e) { + path = Paths.get(IOHelper.getPathFromUrlFragment(uri)).normalize().toString().substring(1); + } catch (InvalidPathException e) { sendError(ctx, BAD_REQUEST); return; } diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java index b1a4686f..1b9d17b0 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java @@ -5,12 +5,15 @@ import java.awt.image.BufferedImage; import java.io.*; import java.net.*; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.FileSystem; import java.nio.file.*; import java.nio.file.attribute.BasicFileAttributes; import java.util.Collections; +import java.util.HexFormat; import java.util.Set; import java.util.jar.JarFile; import java.util.jar.Manifest; @@ -559,6 +562,34 @@ public static String urlEncode(String s) { return URLEncoder.encode(s, UNICODE_CHARSET); } + public static String urlDecodeStrict(String s) { + var builder = new StringBuilder(); + char[] charArray = s.toCharArray(); + for (int i = 0; i < charArray.length; i++) { + char c = charArray[i]; + if (c != '%') { + builder.append(c); + continue; + } + + if (i + 2 >= charArray.length) { + return null; + } + + var buffer = UNICODE_CHARSET.decode(ByteBuffer.wrap(HexFormat.of().parseHex(CharBuffer.wrap(charArray, i + 1, 2)))); + + builder.append(buffer); + + i += 2; + } + + return builder.toString(); + } + + public static String getPathFromUrlFragment(String urlFragment) { + return urlFragment.indexOf('?') < 0 ? urlFragment : urlFragment.substring(0, urlFragment.indexOf('?')); + } + public static String verifyFileName(String fileName) { return VerifyHelper.verify(fileName, IOHelper::isValidFileName, String.format("Invalid file name: '%s'", fileName)); } From f7decac23d451aed3819cc010df7af874b64cdd9 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:40:24 +0700 Subject: [PATCH 67/73] [FIX] Jwt library remove deprecated --- .../auth/protect/AdvancedProtectHandler.java | 4 ++-- .../launchserver/command/service/TokenCommand.java | 6 +++--- .../launchserver/helper/LegacySessionHelper.java | 10 +++++----- .../pro/gravit/launchserver/manangers/AuthManager.java | 4 ++-- .../socket/response/update/LauncherResponse.java | 2 +- .../src/main/java/pro/gravit/utils/Version.java | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java index 613e2a5a..7bbc7930 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java @@ -134,7 +134,7 @@ public static class HardwareInfoTokenVerifier implements RestoreResponse.Extende public HardwareInfoTokenVerifier(LaunchServer server) { this.parser = Jwts.parser() .requireIssuer("LaunchServer") - .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) + .verifyWith(server.keyAgreementManager.ecdsaPublicKey) .build(); } @@ -166,7 +166,7 @@ public static class PublicKeyTokenVerifier implements RestoreResponse.ExtendedTo public PublicKeyTokenVerifier(LaunchServer server) { this.parser = Jwts.parser() .requireIssuer("LaunchServer") - .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) + .verifyWith(server.keyAgreementManager.ecdsaPublicKey) .build(); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java index 3d644074..6fd89943 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java @@ -18,9 +18,9 @@ public TokenCommand(LaunchServer server) { @Override public void invoke(String... args) throws Exception { verifyArgs(args, 1); - var parser = Jwts.parser().setSigningKey(server.keyAgreementManager.ecdsaPublicKey).build(); - var claims = parser.parseClaimsJws(args[0]); - logger.info("Token: {}", claims.getBody()); + var parser = Jwts.parser().verifyWith(server.keyAgreementManager.ecdsaPublicKey).build(); + var claims = parser.parseSignedClaims(args[0]); + logger.info("Token: {}", claims.getPayload()); } }); this.childCommands.put("server", new SubCommand("[profileName] (authId) (public only)", "generate new server token") { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java index 764a7208..bc165fba 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/LegacySessionHelper.java @@ -27,12 +27,12 @@ public static String makeAccessJwtTokenFromString(User user, LocalDateTime expir public static JwtTokenInfo getJwtInfoFromAccessToken(String token, ECPublicKey publicKey) { var parser = Jwts.parser() .requireIssuer("LaunchServer") - .setClock(() -> new Date(Clock.systemUTC().millis())) - .setSigningKey(publicKey) + .clock(() -> new Date(Clock.systemUTC().millis())) + .verifyWith(publicKey) .build(); - var claims = parser.parseClaimsJws(token); - var uuid = UUID.fromString(claims.getBody().get("uuid", String.class)); - var username = claims.getBody().getSubject(); + var claims = parser.parseSignedClaims(token); + var uuid = UUID.fromString(claims.getPayload().get("uuid", String.class)); + var username = claims.getPayload().getSubject(); return new JwtTokenInfo(username, uuid); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java index b6122689..fcfb4b20 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/AuthManager.java @@ -41,13 +41,13 @@ public AuthManager(LaunchServer server) { this.checkServerTokenParser = Jwts.parser() .requireIssuer("LaunchServer") .require("tokenType", "checkServer") - .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) + .verifyWith(server.keyAgreementManager.ecdsaPublicKey) .build(); } public String newCheckServerToken(String serverName, String authId, boolean publicOnly) { return Jwts.builder() - .setIssuer("LaunchServer") + .issuer("LaunchServer") .claim("serverName", serverName) .claim("authId", authId) .claim("tokenType", "checkServer") diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java index f96fb48d..05e6c958 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java @@ -90,7 +90,7 @@ public static class LauncherTokenVerifier implements RestoreResponse.ExtendedTok public LauncherTokenVerifier(LaunchServer server) { parser = Jwts.parser() - .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) + .verifyWith(server.keyAgreementManager.ecdsaPublicKey) .requireIssuer("LaunchServer") .build(); } diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index 62fb4e33..0f523f08 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -8,7 +8,7 @@ public final class Version implements Comparable { public static final int MINOR = 6; public static final int PATCH = 0; public static final int BUILD = 1; - public static final Version.Type RELEASE = Type.EXPERIMENTAL; + public static final Version.Type RELEASE = Type.DEV; public final int major; public final int minor; public final int patch; From 038af764a1643c6988299953eff0b1a9f79febb2 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:40:45 +0700 Subject: [PATCH 68/73] [REFACTOR] IDEA Code Inspect --- .../pro/gravit/launchserver/LaunchServer.java | 1 - .../java/pro/gravit/launchserver/Main.java | 1 - .../auth/core/AuthCoreProvider.java | 1 - .../auth/core/MemoryAuthCoreProvider.java | 1 - .../auth/core/RejectAuthCoreProvider.java | 1 - .../command/handler/CommandHandler.java | 2 - .../command/service/SecurityCheckCommand.java | 26 +++++----- .../components/AbstractLimiter.java | 2 +- .../components/ProGuardComponent.java | 2 - .../config/LaunchServerConfig.java | 2 - .../manangers/hook/AuthHookManager.java | 1 - .../launchserver/socket/WebSocketService.java | 4 +- .../handlers/WebSocketFrameHandler.java | 48 ++++++++++--------- .../fileserver/FileServerHandler.java | 2 +- .../runtime/client/ClientLauncherProcess.java | 2 +- .../pro/gravit/launcher/base/Downloader.java | 1 - .../launcher/base/profiles/Texture.java | 1 - .../base/profiles/optional/OptionalView.java | 6 +-- .../uuid/BatchProfileByUsernameRequest.java | 2 +- .../request/websockets/ClientJSONPoint.java | 1 - .../client/BasicLauncherEventHandler.java | 6 +-- .../launcher/client/ClientModuleManager.java | 1 - .../client/api/CertificateService.java | 1 - .../launcher/core/hasher/HashedDir.java | 1 - .../pro/gravit/utils/helper/JVMHelper.java | 1 - .../pro/gravit/utils/helper/UnpackHelper.java | 2 +- 26 files changed, 48 insertions(+), 71 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 13236d5a..d3a435ea 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -34,7 +34,6 @@ import java.io.BufferedReader; import java.io.IOException; -import java.lang.ProcessBuilder.Redirect; import java.nio.file.*; import java.nio.file.attribute.BasicFileAttributes; import java.security.KeyStore; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java index 8361e8f4..fc95cb72 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/Main.java @@ -6,7 +6,6 @@ import pro.gravit.utils.launch.LaunchOptions; import pro.gravit.utils.launch.ModuleLaunch; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java index bdf060ee..b6e14d8d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java @@ -27,7 +27,6 @@ import pro.gravit.utils.ProviderMap; import pro.gravit.utils.command.Command; import pro.gravit.utils.command.SubCommand; -import pro.gravit.utils.helper.VerifyHelper; import java.io.IOException; import java.lang.reflect.Type; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java index 280ae084..bae81df6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java @@ -4,7 +4,6 @@ import pro.gravit.launcher.base.events.request.GetAvailabilityAuthRequestEvent; import pro.gravit.launcher.base.request.auth.AuthRequest; import pro.gravit.launcher.base.request.auth.details.AuthLoginOnlyDetails; -import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.auth.core.interfaces.provider.AuthSupportSudo; import pro.gravit.launchserver.manangers.AuthManager; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java index 509abef5..3358ad9b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java @@ -1,7 +1,6 @@ package pro.gravit.launchserver.auth.core; import pro.gravit.launcher.base.request.auth.AuthRequest; -import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.AuthException; import pro.gravit.launchserver.manangers.AuthManager; import pro.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java index 5b6d9aff..bd8a8567 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java @@ -5,9 +5,7 @@ import pro.gravit.launchserver.command.hash.*; import pro.gravit.launchserver.command.modules.LoadModuleCommand; import pro.gravit.launchserver.command.modules.ModulesCommand; -import pro.gravit.launchserver.command.profiles.MakeProfileCommand; import pro.gravit.launchserver.command.profiles.ProfilesCommand; -import pro.gravit.launchserver.command.profiles.SaveProfilesCommand; import pro.gravit.launchserver.command.service.*; import pro.gravit.launchserver.command.sync.*; import pro.gravit.launchserver.command.tools.SignDirCommand; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java index a18c19e7..88472600 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java @@ -60,19 +60,19 @@ public void invoke(String... args) { LaunchServerConfig config = server.config; config.auth.forEach((name, pair) -> { }); - if (config.protectHandler instanceof NoProtectHandler) { - printCheckResult("protectHandler", "protectHandler none", false); - } else if (config.protectHandler instanceof AdvancedProtectHandler) { - printCheckResult("protectHandler", "", true); - if (!((AdvancedProtectHandler) config.protectHandler).enableHardwareFeature) { - printCheckResult("protectHandler.hardwareId", "you can improve security by using hwid provider", null); - } else { - printCheckResult("protectHandler.hardwareId", "", true); + switch (config.protectHandler) { + case NoProtectHandler noProtectHandler -> printCheckResult("protectHandler", "protectHandler none", false); + case AdvancedProtectHandler advancedProtectHandler -> { + printCheckResult("protectHandler", "", true); + if (!advancedProtectHandler.enableHardwareFeature) { + printCheckResult("protectHandler.hardwareId", "you can improve security by using hwid provider", null); + } else { + printCheckResult("protectHandler.hardwareId", "", true); + } } - } else if (config.protectHandler instanceof StdProtectHandler) { - printCheckResult("protectHandler", "you can improve security by using advanced", null); - } else { - printCheckResult("protectHandler", "unknown protectHandler", null); + case StdProtectHandler stdProtectHandler -> + printCheckResult("protectHandler", "you can improve security by using advanced", null); + case null, default -> printCheckResult("protectHandler", "unknown protectHandler", null); } if (config.netty.address.startsWith("ws://")) { if (config.netty.ipForwarding) @@ -110,7 +110,7 @@ public void invoke(String... args) { KeyStore keyStore = SignHelper.getStore(new File(config.sign.keyStore).toPath(), config.sign.keyStorePass, config.sign.keyStoreType); Certificate[] certChainPlain = keyStore.getCertificateChain(config.sign.keyAlias); List certChain = Arrays.stream(certChainPlain).map(e -> (X509Certificate) e).toList(); - X509Certificate cert = certChain.get(0); + X509Certificate cert = certChain.getFirst(); cert.checkValidity(); if (certChain.size() == 1) { printCheckResult("sign", "certificate chain contains <2 element(recommend 2 and more)", false); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/AbstractLimiter.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/AbstractLimiter.java index 3fd4f2eb..1c74307e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/AbstractLimiter.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/AbstractLimiter.java @@ -90,7 +90,7 @@ public boolean check(T address) { } } - static class LimitEntry { + protected static class LimitEntry { long time; int trys; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java index ee92b7e0..97a36b49 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java @@ -9,7 +9,6 @@ import pro.gravit.utils.command.SubCommand; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.JVMHelper; -import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; import pro.gravit.utils.helper.UnpackHelper; @@ -20,7 +19,6 @@ import java.nio.file.Paths; import java.security.SecureRandom; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 9300340a..ecba3a95 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -15,9 +15,7 @@ import pro.gravit.launchserver.components.AuthLimiterComponent; import pro.gravit.launchserver.components.Component; import pro.gravit.launchserver.components.ProGuardComponent; -import pro.gravit.utils.helper.JVMHelper; -import java.io.File; import java.util.*; import static java.util.concurrent.TimeUnit.HOURS; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java index fcaaf91a..27b5a491 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/hook/AuthHookManager.java @@ -7,7 +7,6 @@ import pro.gravit.launchserver.socket.response.auth.JoinServerResponse; import pro.gravit.launchserver.socket.response.auth.SetProfileResponse; import pro.gravit.utils.BiHookSet; -import pro.gravit.utils.HookSet; public class AuthHookManager { public final BiHookSet preHook = new BiHookSet<>(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index 024d1644..ee46dc8f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -142,9 +142,7 @@ public void process(ChannelHandlerContext ctx, TextWebSocketFrame frame, Client if(executors == null) { process(safeStatus, client, ip, context, response); } else { - executors.submit(() -> { - process(safeStatus, client, ip, context, response); - }); + executors.submit(() -> process(safeStatus, client, ip, context, response)); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java index c4260949..9b5a25dc 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/WebSocketFrameHandler.java @@ -63,32 +63,36 @@ protected void channelRead0(ChannelHandlerContext ctx, WebSocketFrame frame) { } catch (Throwable ex) { logger.error("WebSocket frame handler hook error", ex); } - if (frame instanceof TextWebSocketFrame textWebSocketFrame) { - if (logger.isTraceEnabled()) { - logger.trace("Message from {}: {}", context.ip == null ? IOHelper.getIP(ctx.channel().remoteAddress()) : context.ip, textWebSocketFrame.text()); - } - try { - service.process(ctx, textWebSocketFrame, client, context.ip, connectUUID); - } catch (Throwable ex) { - logger.warn("Client {} send invalid request. Connection force closed.", context.ip == null ? IOHelper.getIP(ctx.channel().remoteAddress()) : context.ip); + switch (frame) { + case TextWebSocketFrame textWebSocketFrame -> { if (logger.isTraceEnabled()) { - logger.trace("Client message: {}", textWebSocketFrame.text()); - logger.error("Process websockets request failed", ex); + logger.trace("Message from {}: {}", context.ip == null ? IOHelper.getIP(ctx.channel().remoteAddress()) : context.ip, textWebSocketFrame.text()); } + try { + service.process(ctx, textWebSocketFrame, client, context.ip, connectUUID); + } catch (Throwable ex) { + logger.warn("Client {} send invalid request. Connection force closed.", context.ip == null ? IOHelper.getIP(ctx.channel().remoteAddress()) : context.ip); + if (logger.isTraceEnabled()) { + logger.trace("Client message: {}", textWebSocketFrame.text()); + logger.error("Process websockets request failed", ex); + } + ctx.channel().close(); + } + } + case PingWebSocketFrame pingWebSocketFrame -> { + frame.content().retain(); + ctx.channel().writeAndFlush(new PongWebSocketFrame(frame.content())); + //return; + } + case PongWebSocketFrame pongWebSocketFrame -> logger.trace("WebSocket Client received pong"); + case CloseWebSocketFrame closeWebSocketFrame -> { + int statusCode = closeWebSocketFrame.statusCode(); ctx.channel().close(); } - } else if ((frame instanceof PingWebSocketFrame)) { - frame.content().retain(); - ctx.channel().writeAndFlush(new PongWebSocketFrame(frame.content())); - //return; - } else if (frame instanceof PongWebSocketFrame) { - logger.trace("WebSocket Client received pong"); - } else if (frame instanceof CloseWebSocketFrame closeWebSocketFrame) { - int statusCode = closeWebSocketFrame.statusCode(); - ctx.channel().close(); - } else { - String message = "unsupported frame type: " + frame.getClass().getName(); - logger.error(new UnsupportedOperationException(message)); // prevent strange crash here. + case null, default -> { + String message = "unsupported frame type: " + frame.getClass().getName(); + logger.error(new UnsupportedOperationException(message)); // prevent strange crash here. + } } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java index 2f91224f..1030b973 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/fileserver/FileServerHandler.java @@ -152,7 +152,7 @@ private static void setDateAndCacheHeaders(HttpResponse response, File fileToCac response.headers().set(HttpHeaderNames.DATE, dateFormatter.format(time)); // Add cache headers - response.headers().set(HttpHeaderNames.EXPIRES, dateFormatter.format(time.plus(HTTP_CACHE_SECONDS, ChronoUnit.SECONDS))); + response.headers().set(HttpHeaderNames.EXPIRES, dateFormatter.format(time.plusSeconds(HTTP_CACHE_SECONDS))); response.headers().set(HttpHeaderNames.CACHE_CONTROL, "private, max-age=" + HTTP_CACHE_SECONDS); response.headers().set( HttpHeaderNames.LAST_MODIFIED, dateFormatter.format(Instant.ofEpochMilli(fileToCache.lastModified()))); diff --git a/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java index ac85b898..9f8b3293 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java +++ b/Launcher/src/main/java/pro/gravit/launcher/runtime/client/ClientLauncherProcess.java @@ -150,7 +150,7 @@ public void start(boolean pipeOutput) throws IOException, InterruptedException { systemClassPath.addAll(ClientLauncherEntryPoint.resolveClassPath(workDir, params.actions, params.profile) .filter(x -> !params.profile.getModulePath().contains(workDir.relativize(x).toString())) .map(Path::toString) - .collect(Collectors.toList())); + .toList()); } if (Launcher.getConfig().environment != LauncherConfig.LauncherEnvironment.PROD) { processArgs.add(JVMHelper.jvmProperty(LogHelper.DEV_PROPERTY, String.valueOf(LogHelper.isDevEnabled()))); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java index f7f0038a..6eecdc21 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/Downloader.java @@ -6,7 +6,6 @@ import pro.gravit.utils.helper.LogHelper; import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLSocketFactory; import java.io.IOException; import java.net.URI; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java index d77fb3b7..568f1d14 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/Texture.java @@ -10,7 +10,6 @@ import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; -import java.net.URL; import java.nio.file.Path; import java.util.Arrays; import java.util.Map; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java index d257215e..80df3666 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java @@ -126,11 +126,7 @@ public void enable(OptionalFile file, boolean manual, BiConsumer new OptionalFileInstallInfo()); installInfo.isManual = manual; if (file.dependencies != null) { for (OptionalFile dep : file.dependencies) { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/BatchProfileByUsernameRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/BatchProfileByUsernameRequest.java index 65509418..01e5067a 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/BatchProfileByUsernameRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/uuid/BatchProfileByUsernameRequest.java @@ -27,7 +27,7 @@ public String getType() { return "batchProfileByUsername"; } - static class Entry { + public static class Entry { @LauncherNetworkAPI String username; @LauncherNetworkAPI diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java index 08df0ec1..ffdab6c6 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/request/websockets/ClientJSONPoint.java @@ -15,7 +15,6 @@ import java.security.cert.CertificateException; import java.time.Duration; import java.util.concurrent.CompletionStage; -import java.util.concurrent.ExecutionException; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Consumer; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java index 87d03fa9..6269c269 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/BasicLauncherEventHandler.java @@ -13,8 +13,7 @@ public class BasicLauncherEventHandler implements RequestService.EventHandler { @Override public boolean eventHandle(T event) { - if (event instanceof SecurityReportRequestEvent) { - SecurityReportRequestEvent event1 = (SecurityReportRequestEvent) event; + if (event instanceof SecurityReportRequestEvent event1) { if (event1.action == SecurityReportRequestEvent.ReportAction.TOKEN_EXPIRED) { try { Request.restore(); @@ -22,8 +21,7 @@ public boolean eventHandle(T event) { LogHelper.error(e); } } - } else if (event instanceof ExtendedTokenRequestEvent) { - ExtendedTokenRequestEvent event1 = (ExtendedTokenRequestEvent) event; + } else if (event instanceof ExtendedTokenRequestEvent event1) { String token = event1.getExtendedToken(); if (token != null) { Request.addExtendedToken(event1.getExtendedTokenName(), new Request.ExtendedToken(event1.getExtendedToken(), event1.getExtendedTokenExpire())); diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java index b516523f..bbcefeeb 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java @@ -5,7 +5,6 @@ import pro.gravit.launcher.base.modules.LauncherModule; import pro.gravit.launcher.base.modules.impl.SimpleModuleManager; -import java.net.URL; import java.nio.file.Path; import java.util.Collections; import java.util.List; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java index 3c6a6e56..ada1e6ac 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/api/CertificateService.java @@ -84,7 +84,6 @@ private static CheckClassResultTypeApi fromType(LauncherTrustManager.CheckClassR case UNTRUSTED -> CheckClassResultTypeApi.UNTRUSTED; case UNVERIFED -> CheckClassResultTypeApi.UNVERIFED; case UNCOMPAT -> CheckClassResultTypeApi.UNCOMPAT; - default -> CheckClassResultTypeApi.UNKNOWN; }; } } diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java index 232e98ce..343f7e80 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/core/hasher/HashedDir.java @@ -33,7 +33,6 @@ public HashedDir(HInput input) throws IOException { entry = switch (type) { case FILE -> new HashedFile(input); case DIR -> new HashedDir(input); - default -> throw new AssertionError("Unsupported hashed entry type: " + type.name()); }; // Try add entry to map diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java index af0d7c6e..bf5ecbdf 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JVMHelper.java @@ -61,7 +61,6 @@ public static String getNativeExtension(JVMHelper.OS OS_TYPE) { case MUSTDIE -> ".dll"; case LINUX -> ".so"; case MACOSX -> ".dylib"; - default -> throw new InternalError(String.format("Unsupported OS TYPE '%s'", OS_TYPE)); }; } diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java index b967fb03..5ba58433 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java @@ -61,7 +61,7 @@ public static void unpackZipNoCheck(String resource, Path target) throws IOExcep IOHelper.transfer(input, target.resolve(IOHelper.toPath(entry.getName()))); } } - } catch (NoSuchFileException e) { + } catch (NoSuchFileException ignored) { } } } From 09d36e066a756fe6d73cbd2cf5211cd3681f2f83 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:41:00 +0700 Subject: [PATCH 69/73] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index df5e6bd7..e93620f1 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit df5e6bd7e2ab3078f9f2860e21112cbf85dce098 +Subproject commit e93620f10963b951c8874dfef17dce91cf8c8da9 From e5840243b3298cc8f293d6fb7b703a5a1e1167ac Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:40:46 +0700 Subject: [PATCH 70/73] [ANY] Update gradle --- gradle/wrapper/gradle-wrapper.jar | Bin 63721 -> 43462 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew.bat | 20 ++++++++++---------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135c49b765f8051ef9d0a6055ff8e46073d8..d64cd4917707c1f8861d8cb53dd15194d4248596 100644 GIT binary patch literal 43462 zcma&NWl&^owk(X(xVyW%ySuwf;qI=D6|RlDJ2cR^yEKh!@I- zp9QeisK*rlxC>+~7Dk4IxIRsKBHqdR9b3+fyL=ynHmIDe&|>O*VlvO+%z5;9Z$|DJ zb4dO}-R=MKr^6EKJiOrJdLnCJn>np?~vU-1sSFgPu;pthGwf}bG z(1db%xwr#x)r+`4AGu$j7~u2MpVs3VpLp|mx&;>`0p0vH6kF+D2CY0fVdQOZ@h;A` z{infNyvmFUiu*XG}RNMNwXrbec_*a3N=2zJ|Wh5z* z5rAX$JJR{#zP>KY**>xHTuw?|-Rg|o24V)74HcfVT;WtQHXlE+_4iPE8QE#DUm%x0 zEKr75ur~W%w#-My3Tj`hH6EuEW+8K-^5P62$7Sc5OK+22qj&Pd1;)1#4tKihi=~8C zHiQSst0cpri6%OeaR`PY>HH_;CPaRNty%WTm4{wDK8V6gCZlG@U3$~JQZ;HPvDJcT1V{ z?>H@13MJcC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N+&8U@CIlN zrZkcT9yh%LrlGS9`G)KdP(@9Eo-AQz@8GEFWcb7U=a0H^ZVbLmz{+&M7W(nXJ4sN8 zJLR7eeK(K8`2-}j(T7JsO`L!+CvbueT%izanm-^A1Dn{`1Nw`9P?cq;7no+XfC`K(GO9?O^5zNIt4M+M8LM0=7Gz8UA@Z0N+lg+cX)NfazRu z5D)~HA^(u%w^cz+@2@_#S|u>GpB+j4KzQ^&Wcl9f z&hG#bCA(Yk0D&t&aJE^xME^&E-&xGHhXn%}psEIj641H+Nl-}boj;)Zt*t(4wZ5DN z@GXF$bL=&pBq-#vkTkh>7hl%K5|3 z{`Vn9b$iR-SoGENp}bn4;fR3>9sA%X2@1L3aE9yTra;Wb#_`xWwLSLdfu+PAu+o3| zGVnpzPr=ch{uuoHjtw7+_!L_2;knQ!DuDl0R`|%jr+}jFzXtrHIKc323?JO{l&;VF z*L1+}JU7%QJOg|5|Tc|D8fN zJORAg=_vsy{ak|o);@)Yh8Lkcg@$FG3k@ep36BRa^>~UmnRPziS>Z=`Jb2x*Q#`%A zU*i3&Vg?TluO@X0O;r2Jl6LKLUOVhSqg1*qOt^|8*c7 zo(298@+r$k_wQNGHv{|$tW(T8L+4_`FQ{kEW5Jgg{yf7ey4ss_(SNKfz(N9lx&a;< je(UuV8hP?p&}TPdm1I$XmG#(RzlD&B2izSj9sl%y5~4qc diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8838ba97..2ea3535d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..25da30db 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail From bd677c26ba5a068147fda9b5d54108ac447ff71a Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 23 Mar 2024 14:09:47 +0700 Subject: [PATCH 71/73] [FIX] Oshi requires slf4j api --- Launcher/build.gradle | 4 +--- .../src/main/java/pro/gravit/utils/helper/LogHelper.java | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Launcher/build.gradle b/Launcher/build.gradle index 9c7b81ba..a2253345 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -47,9 +47,7 @@ pack project(':LauncherAPI') pack project(':LauncherClient') pack project(':LauncherStart') - bundle(group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore']) { - exclude group: 'org.slf4j' - } + bundle(group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore']) } tasks.register('genRuntimeJS', Zip) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java index 9ba2af43..92e9b182 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java @@ -23,7 +23,7 @@ public final class LogHelper { public static final String DEV_PROPERTY = "launcher.dev"; public static final String STACKTRACE_PROPERTY = "launcher.stacktrace"; public static final String NO_JANSI_PROPERTY = "launcher.noJAnsi"; - public static final String NO_SLF4J_PROPERTY = "launcher.noSlf4j"; + public static final String SLF4J_PROPERTY = "launcher.useSlf4j"; private static final Set> EXCEPTIONS_CALLBACKS = Collections.newSetFromMap(new ConcurrentHashMap<>(2)); private static final LogHelperAppender impl; @@ -31,7 +31,7 @@ public final class LogHelper { boolean useSlf4j = false; try { Class.forName("org.slf4j.Logger", false, LogHelper.class.getClassLoader()); - useSlf4j = !Boolean.getBoolean(NO_SLF4J_PROPERTY); + useSlf4j = Boolean.getBoolean(SLF4J_PROPERTY); } catch (ClassNotFoundException ignored) { } if (useSlf4j) { From 6017a89e2089869fefa09180c8a916ff091929bc Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 24 Mar 2024 16:11:32 +0700 Subject: [PATCH 72/73] [ANY] 5.6.0 beta --- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index 0f523f08..61b27f92 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -8,7 +8,7 @@ public final class Version implements Comparable { public static final int MINOR = 6; public static final int PATCH = 0; public static final int BUILD = 1; - public static final Version.Type RELEASE = Type.DEV; + public static final Version.Type RELEASE = Type.BETA; public final int major; public final int minor; public final int patch; From 06ada30459d41641ceb7bb50cd9c2bf32b1416f6 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 24 Mar 2024 22:10:25 +0700 Subject: [PATCH 73/73] [ANY] 5.6.0 stable --- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index 61b27f92..5da954a4 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -8,7 +8,7 @@ public final class Version implements Comparable { public static final int MINOR = 6; public static final int PATCH = 0; public static final int BUILD = 1; - public static final Version.Type RELEASE = Type.BETA; + public static final Version.Type RELEASE = Type.STABLE; public final int major; public final int minor; public final int patch; diff --git a/build.gradle b/build.gradle index d8bf3d63..b4b18f09 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ id 'org.openjfx.javafxplugin' version '0.1.0' apply false } group = 'pro.gravit.launcher' -version = '5.6.0-SNAPSHOT' +version = '5.6.0' apply from: 'props.gradle'