Add ability to change HTTP proxy port 05/27005/1
authorOndrej Tomcik <ondrej.tomcik@kistler.com>
Tue, 10 Apr 2018 08:06:57 +0000 (10:06 +0200)
committerPeter Rafaj <peter.rafaj@kistler.com>
Thu, 20 Sep 2018 10:53:48 +0000 (12:53 +0200)
Change-Id: I249eaeb4102e397bd872a9093a9947912fc2815d
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
cloud/interface/Dockerfile
cloud/interface/src/main/java/org/iotivity/cloud/ciserver/CloudInterfaceServer.java

index fcb20e4..e2ef361 100644 (file)
@@ -8,7 +8,8 @@ WORKDIR iotivity/
 ENV COAP_PORT 5683
 ENV TLS_MODE 0
 ENV KEEPALIVE_CLOUD 1
-ENV HC_PROXY_MODE 0
+ENV HTTP_PROXY_MODE 0
+ENV HTTP_PROXY_PORT 80
 ENV WEBSOCKET_MODE 0
 ENV RESOURCE_DIRECTORY_ADDRESS iotivity-resourcedirectory
 ENV RESOURCE_DIRECTORY_PORT 5684
index fa09fa8..a31d4b2 100644 (file)
@@ -197,8 +197,8 @@ public class CloudInterfaceServer {
             resourceDirectoryPort = Integer.parseInt(System.getenv("RESOURCE_DIRECTORY_PORT"));
             accountServerAddress = System.getenv("ACCOUNT_SERVER_ADDRESS");
             accountServerPort = Integer.parseInt(System.getenv("ACCOUNT_SERVER_PORT"));
-            hcProxyMode = Integer.parseInt(System.getenv("HC_PROXY_MODE")) == 1;
-            hcProxyPort = Constants.DEFAULT_HC_PROXY_PORT;
+            hcProxyMode = Integer.parseInt(System.getenv("HTTP_PROXY_MODE")) == 1;
+            hcProxyPort = Integer.parseInt(System.getenv("HTTP_PROXY_PORT"));
             websocketMode = Integer.parseInt(System.getenv("WEBSOCKET_MODE")) == 1;
             websocketPort = Constants.DEFAULT_WEBSOCKET_PORT;
             keepAlive = Integer.parseInt(System.getenv("KEEPALIVE_CLOUD")) == 1;