proxy progress
This commit is contained in:
parent
eaca7ab0da
commit
c24b0c2f83
|
@ -26,7 +26,7 @@ public class Launcher extends rusEFIVersion {
|
|||
* @see StartupFrame if no parameters specified
|
||||
*/
|
||||
public static void main(final String[] args) throws Exception {
|
||||
System.out.println("rusEfi UI console " + CONSOLE_VERSION);
|
||||
System.out.println("rusEFI UI console " + CONSOLE_VERSION);
|
||||
System.out.println("Compiled " + new Date(ConsoleTools.classBuildTimeMillis()));
|
||||
System.out.println("\n\n");
|
||||
PersistentConfiguration.registerShutdownHook();
|
||||
|
|
|
@ -21,8 +21,7 @@ import com.rusefi.io.LinkManager;
|
|||
import com.rusefi.io.serial.SerialIoStreamJSerialComm;
|
||||
import com.rusefi.io.tcp.BinaryProtocolServer;
|
||||
import com.rusefi.maintenance.ExecHelper;
|
||||
import com.rusefi.proxy.NetworkConnector;
|
||||
import com.rusefi.server.Backend;
|
||||
import com.rusefi.server.BackendLauncher;
|
||||
import com.rusefi.tools.online.Online;
|
||||
import com.rusefi.tune.xml.Msq;
|
||||
import com.rusefi.ui.AuthTokenPanel;
|
||||
|
@ -62,7 +61,7 @@ public class ConsoleTools {
|
|||
registerTool("compile_fsio_line", ConsoleTools::invokeCompileExpressionTool, "Convert a line to RPN form.");
|
||||
registerTool("compile_fsio_file", ConsoleTools::runCompileTool, "Convert all lines from a file to RPN form.");
|
||||
|
||||
registerTool("proxy_server", Backend::start, "NOT A USER TOOL");
|
||||
registerTool("proxy_server", BackendLauncher::start, "NOT A USER TOOL");
|
||||
registerTool("network_connector", NetworkConnectorStartup::start, "Connect your rusEFI ECU to rusEFI Online");
|
||||
registerTool("network_authenticator", LocalApplicationProxy::start, "rusEFI Online Authenticator");
|
||||
|
||||
|
@ -70,6 +69,7 @@ public class ConsoleTools {
|
|||
registerTool(SET_AUTH_TOKEN, ConsoleTools::setAuthToken, "Set rusEFI authentication token.");
|
||||
registerTool("upload_tune", ConsoleTools::uploadTune, "Upload specified tune file using auth token from settings");
|
||||
|
||||
registerTool("version", ConsoleTools::version, "Only print version");
|
||||
|
||||
registerTool("lightui", ConsoleTools::lightUI, "Start lightweight GUI for tiny screens");
|
||||
|
||||
|
@ -79,6 +79,10 @@ public class ConsoleTools {
|
|||
registerTool(Fields.CMD_REBOOT_DFU, args -> sendCommand(Fields.CMD_REBOOT_DFU), "Sends a command to switch rusEFI controller into DFU mode.");
|
||||
}
|
||||
|
||||
private static void version(String[] strings) {
|
||||
// version is printed by already, all we need is to do nothing
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
System.out.println(Arrays.toString(new File(".").list()));
|
||||
System.setProperty("ini_file_path", "../firmware/tunerstudio");
|
||||
|
|
|
@ -224,16 +224,4 @@ public class Backend {
|
|||
}
|
||||
}
|
||||
|
||||
public static void start(String[] args) throws MalformedURLException {
|
||||
rusEFISSLContext.setupCertificates(new File("keystore.jks"), System.getProperty("RUSEFI_PROXY_PASSWORD"));
|
||||
|
||||
Function<String, UserDetails> userDetailsFunction = new JsonUserDetailsResolver();
|
||||
|
||||
Backend backend = new Backend(userDetailsFunction, HTTP_PORT, Logger.CONSOLE);
|
||||
backend.runApplicationConnector(SERVER_PORT_FOR_APPLICATIONS, parameter -> {
|
||||
});
|
||||
backend.runControllerConnector(SERVER_PORT_FOR_CONTROLLERS, parameter -> {
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.rusefi.server;
|
||||
|
||||
import com.opensr5.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.MalformedURLException;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class BackendLauncher {
|
||||
/**
|
||||
* need this method to be not in Backend class for console to work without all backend classes
|
||||
*/
|
||||
public static void start(String[] args) throws MalformedURLException {
|
||||
rusEFISSLContext.setupCertificates(new File("keystore.jks"), System.getProperty("RUSEFI_PROXY_PASSWORD"));
|
||||
|
||||
Function<String, UserDetails> userDetailsFunction = new JsonUserDetailsResolver();
|
||||
|
||||
Backend backend = new Backend(userDetailsFunction, Backend.HTTP_PORT, Logger.CONSOLE);
|
||||
backend.runApplicationConnector(Backend.SERVER_PORT_FOR_APPLICATIONS, parameter -> {
|
||||
});
|
||||
backend.runControllerConnector(Backend.SERVER_PORT_FOR_CONTROLLERS, parameter -> {
|
||||
});
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue