From 971b11c9026d2106befe397188263712a05fb073 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 25 Jul 2020 00:33:38 -0400 Subject: [PATCH] configurable http.port --- .../io/src/main/java/com/rusefi/tools/online/HttpUtil.java | 2 +- .../models/src/main/java/com/rusefi/rusEFIVersion.java | 2 +- .../src/main/java/com/rusefi/server/Backend.java | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/java_console/io/src/main/java/com/rusefi/tools/online/HttpUtil.java b/java_console/io/src/main/java/com/rusefi/tools/online/HttpUtil.java index 9ab2d16c4a..8f1f6302c3 100644 --- a/java_console/io/src/main/java/com/rusefi/tools/online/HttpUtil.java +++ b/java_console/io/src/main/java/com/rusefi/tools/online/HttpUtil.java @@ -23,7 +23,7 @@ public class HttpUtil { // todo: migrate proxy http json API server to TLS public static final String RUSEFI_PROXY_JSON_PROTOCOL = "http://"; - public static final int PROXY_JSON_API_HTTP_PORT = 8001; + public static final int PROXY_JSON_API_HTTP_PORT = Integer.parseInt("http.port", 8001); /** * hostname of PROXY server, not primary rusEFI web server - those are two separate hosts at the moment */ diff --git a/java_console/models/src/main/java/com/rusefi/rusEFIVersion.java b/java_console/models/src/main/java/com/rusefi/rusEFIVersion.java index 383cbd8a97..a103786bde 100644 --- a/java_console/models/src/main/java/com/rusefi/rusEFIVersion.java +++ b/java_console/models/src/main/java/com/rusefi/rusEFIVersion.java @@ -6,7 +6,7 @@ import java.net.URL; import java.util.concurrent.atomic.AtomicReference; public class rusEFIVersion { - public static final int CONSOLE_VERSION = 20200723; + public static final int CONSOLE_VERSION = 20200724; public static AtomicReference firmwareVersion = new AtomicReference<>("N/A"); public static long classBuildTimeMillis() { diff --git a/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java b/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java index 159207b8dc..6ca38bfe37 100644 --- a/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java +++ b/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java @@ -2,6 +2,7 @@ package com.rusefi.server; import com.devexperts.logging.Logging; import com.rusefi.Listener; +import com.rusefi.LocalApplicationProxy; import com.rusefi.Timeouts; import com.rusefi.binaryprotocol.BinaryProtocol; import com.rusefi.core.Sensor; @@ -10,6 +11,7 @@ import com.rusefi.io.commands.HelloCommand; import com.rusefi.io.tcp.BinaryProtocolProxy; import com.rusefi.io.tcp.BinaryProtocolServer; import com.rusefi.io.tcp.TcpIoStream; +import com.rusefi.tools.online.HttpUtil; import com.rusefi.tools.online.ProxyClient; import net.jcip.annotations.GuardedBy; import org.jetbrains.annotations.NotNull; @@ -43,6 +45,10 @@ import static com.rusefi.Timeouts.SECOND; public class Backend implements Closeable { private static final Logging log = getLogging(Backend.class); + /** + * @see HttpUtil#PROXY_JSON_API_HTTP_PORT + * @see LocalApplicationProxy#SERVER_PORT_FOR_APPLICATIONS + */ public static final int SERVER_PORT_FOR_CONTROLLERS = 8003; private static final String MAX_PACKET_GAP = "MAX_PACKET_GAP";