mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-10 01:29:45 +03:00
[FEATURE] nettyAddress
This commit is contained in:
parent
57fc3b1c04
commit
2fa638d3c6
4 changed files with 18 additions and 0 deletions
|
@ -188,6 +188,7 @@ public class NettyConfig
|
||||||
public boolean clientEnabled;
|
public boolean clientEnabled;
|
||||||
public String launcherURL;
|
public String launcherURL;
|
||||||
public String launcherEXEURL;
|
public String launcherEXEURL;
|
||||||
|
public String address;
|
||||||
}
|
}
|
||||||
public class GuardLicenseConf
|
public class GuardLicenseConf
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,6 +70,11 @@ public void setAddress(String address) {
|
||||||
body.append(address);
|
body.append(address);
|
||||||
body.append("\";");
|
body.append("\";");
|
||||||
}
|
}
|
||||||
|
public void setNettyAddress(String address) {
|
||||||
|
body.append("this.nettyAddress = \"");
|
||||||
|
body.append(address);
|
||||||
|
body.append("\";");
|
||||||
|
}
|
||||||
|
|
||||||
public void setProjectName(String name) {
|
public void setProjectName(String name) {
|
||||||
body.append("this.projectname = \"");
|
body.append("this.projectname = \"");
|
||||||
|
@ -134,6 +139,11 @@ public void setDownloadJava(boolean b) {
|
||||||
body.append(b ? "true" : "false");
|
body.append(b ? "true" : "false");
|
||||||
body.append(";");
|
body.append(";");
|
||||||
}
|
}
|
||||||
|
public void setNettyEnabled(boolean b) {
|
||||||
|
body.append("this.isNettyEnabled = ");
|
||||||
|
body.append(b ? "true" : "false");
|
||||||
|
body.append(";");
|
||||||
|
}
|
||||||
|
|
||||||
public void setWarningMissArchJava(boolean b) {
|
public void setWarningMissArchJava(boolean b) {
|
||||||
body.append("this.isWarningMissArchJava = ");
|
body.append("this.isWarningMissArchJava = ");
|
||||||
|
|
|
@ -130,14 +130,19 @@ public Path process(Path inputJar) throws IOException {
|
||||||
server.buildHookManager.hook(context);
|
server.buildHookManager.hook(context);
|
||||||
jaConfigurator.setAddress(server.config.getAddress());
|
jaConfigurator.setAddress(server.config.getAddress());
|
||||||
jaConfigurator.setPort(server.config.port);
|
jaConfigurator.setPort(server.config.port);
|
||||||
|
jaConfigurator.setNettyEnabled(server.config.netty.clientEnabled);
|
||||||
if(server.config.netty.clientEnabled)
|
if(server.config.netty.clientEnabled)
|
||||||
|
{
|
||||||
jaConfigurator.setNettyPort(server.config.netty.port);
|
jaConfigurator.setNettyPort(server.config.netty.port);
|
||||||
|
jaConfigurator.setNettyAddress(server.config.netty.address);
|
||||||
|
}
|
||||||
if(server.config.guardLicense != null)
|
if(server.config.guardLicense != null)
|
||||||
jaConfigurator.setGuardLicense(server.config.guardLicense.name, server.config.guardLicense.key, server.config.guardLicense.encryptKey);
|
jaConfigurator.setGuardLicense(server.config.guardLicense.name, server.config.guardLicense.key, server.config.guardLicense.encryptKey);
|
||||||
jaConfigurator.setProjectName(server.config.projectName);
|
jaConfigurator.setProjectName(server.config.projectName);
|
||||||
jaConfigurator.setSecretKey(SecurityHelper.randomStringAESKey());
|
jaConfigurator.setSecretKey(SecurityHelper.randomStringAESKey());
|
||||||
jaConfigurator.setClientPort(32148 + SecurityHelper.newRandom().nextInt(512));
|
jaConfigurator.setClientPort(32148 + SecurityHelper.newRandom().nextInt(512));
|
||||||
jaConfigurator.setUsingWrapper(server.config.isUsingWrapper);
|
jaConfigurator.setUsingWrapper(server.config.isUsingWrapper);
|
||||||
|
jaConfigurator.setWarningMissArchJava(server.config.isWarningMissArchJava);
|
||||||
jaConfigurator.setDownloadJava(server.config.isDownloadJava);
|
jaConfigurator.setDownloadJava(server.config.isDownloadJava);
|
||||||
jaConfigurator.setEnv(server.config.env);
|
jaConfigurator.setEnv(server.config.env);
|
||||||
server.buildHookManager.registerAllClientModuleClass(jaConfigurator);
|
server.buildHookManager.registerAllClientModuleClass(jaConfigurator);
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
public class AutogenConfig {
|
public class AutogenConfig {
|
||||||
public String projectname;
|
public String projectname;
|
||||||
public String address;
|
public String address;
|
||||||
|
public String nettyAddress;
|
||||||
public int port;
|
public int port;
|
||||||
public int nettyPort;
|
public int nettyPort;
|
||||||
public int clientPort;
|
public int clientPort;
|
||||||
|
@ -10,6 +11,7 @@ public class AutogenConfig {
|
||||||
private boolean isInitModules;
|
private boolean isInitModules;
|
||||||
public boolean isUsingWrapper;
|
public boolean isUsingWrapper;
|
||||||
public boolean isDownloadJava; //Выставление этого флага требует модификации runtime части
|
public boolean isDownloadJava; //Выставление этого флага требует модификации runtime части
|
||||||
|
public boolean isNettyEnabled;
|
||||||
public String secretKeyClient;
|
public String secretKeyClient;
|
||||||
public String guardLicenseName;
|
public String guardLicenseName;
|
||||||
public String guardLicenseKey;
|
public String guardLicenseKey;
|
||||||
|
|
Loading…
Reference in a new issue