mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FEATURE] Support properties in ServerWrapper
This commit is contained in:
parent
58d8ba2358
commit
e12f2ef897
1 changed files with 8 additions and 0 deletions
|
@ -128,6 +128,11 @@ public void run(String... args) throws Throwable {
|
|||
LogHelper.error(e);
|
||||
}
|
||||
};
|
||||
if(config.properties != null) {
|
||||
for(Map.Entry<String, String> e : config.properties.entrySet()) {
|
||||
System.setProperty(e.getKey(), e.getValue());
|
||||
}
|
||||
}
|
||||
Request.setRequestService(service);
|
||||
if (config.logFile != null) LogHelper.addOutput(IOHelper.newWriter(Paths.get(config.logFile), true));
|
||||
{
|
||||
|
@ -213,6 +218,7 @@ public Config getDefaultConfig() {
|
|||
newConfig.address = "ws://localhost:9274/api";
|
||||
newConfig.classLoaderConfig = ClientProfile.ClassLoaderConfig.SYSTEM_ARGS;
|
||||
newConfig.env = LauncherConfig.LauncherEnvironment.STD;
|
||||
newConfig.properties = new HashMap<>();
|
||||
return newConfig;
|
||||
}
|
||||
|
||||
|
@ -238,6 +244,8 @@ public static final class Config {
|
|||
public byte[] encodedServerRsaPublicKey;
|
||||
|
||||
public byte[] encodedServerEcPublicKey;
|
||||
|
||||
public Map<String, String> properties;
|
||||
}
|
||||
|
||||
public static final class ModuleConf {
|
||||
|
|
Loading…
Reference in a new issue