Правки конфига по умолчанию

This commit is contained in:
Gravit 2018-12-24 17:16:57 +07:00
parent 8df7d148da
commit 5eac763f8f
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -190,7 +190,7 @@ public static void main(String... args) throws Throwable {
JVMHelper.verifySystemProperties(LaunchServer.class, true); JVMHelper.verifySystemProperties(LaunchServer.class, true);
LogHelper.addOutput(IOHelper.WORKING_DIR.resolve("LaunchServer.log")); LogHelper.addOutput(IOHelper.WORKING_DIR.resolve("LaunchServer.log"));
LogHelper.printVersion("LaunchServer"); LogHelper.printVersion("LaunchServer");
LogHelper.printLicense("LauncherServer"); LogHelper.printLicense("LaunchServer");
// Start LaunchServer // Start LaunchServer
Instant start = Instant.now(); Instant start = Instant.now();
@ -269,7 +269,7 @@ public static void main(String... args) throws Throwable {
public LaunchServer(Path dir) throws IOException, InvalidKeySpecException { public LaunchServer(Path dir) throws IOException, InvalidKeySpecException {
// Setup config locations // Setup config locations
this.dir = dir; this.dir = dir;
configFile = dir.resolve("LaunchServer.cfg"); configFile = dir.resolve("LaunchServer.conf");
publicKeyFile = dir.resolve("public.key"); publicKeyFile = dir.resolve("public.key");
privateKeyFile = dir.resolve("private.key"); privateKeyFile = dir.resolve("private.key");
updatesDir = dir.resolve("updates"); updatesDir = dir.resolve("updates");
@ -451,10 +451,13 @@ private void generateConfigIfNotExists() throws IOException {
newConfig.authHandler = new MemoryAuthHandler(); newConfig.authHandler = new MemoryAuthHandler();
newConfig.hwidHandler = new AcceptHWIDHandler(); newConfig.hwidHandler = new AcceptHWIDHandler();
newConfig.authProvider = new AuthProvider[]{new RejectAuthProvider("Технические работы")}; newConfig.authProvider = new AuthProvider[]{new RejectAuthProvider("Настройте authProvider")};
newConfig.textureProvider = new RequestTextureProvider("http://example.com/skins/%username%.png","http://example.com/cloaks/%username%.png"); newConfig.textureProvider = new RequestTextureProvider("http://example.com/skins/%username%.png","http://example.com/cloaks/%username%.png");
newConfig.port = 7420; newConfig.port = 7420;
newConfig.bindAddress = "0.0.0.0"; newConfig.bindAddress = "0.0.0.0";
newConfig.authRejectString = "Превышен лимит авторизаций";
newConfig.binaryName = "Launcher";
newConfig.whitelistRejectString = "Вас нет в белом списке";
//try (BufferedReader reader = IOHelper.newReader(IOHelper.getResourceURL("ru/gravit/launchserver/defaults/config.cfg"))) { //try (BufferedReader reader = IOHelper.newReader(IOHelper.getResourceURL("ru/gravit/launchserver/defaults/config.cfg"))) {
// newConfig = Launcher.gson.fromJson(reader,Config.class); // newConfig = Launcher.gson.fromJson(reader,Config.class);
//} //}