diff --git a/meshchat.py b/meshchat.py
index 1ddc053..fadbb1a 100644
--- a/meshchat.py
+++ b/meshchat.py
@@ -359,6 +359,27 @@ class ReticulumMeshChat:
interface_details["target_host"] = data.get('target_host')
interface_details["target_port"] = data.get('target_port')
+ # handle tcp server interface
+ if interface_type == "TCPServerInterface":
+
+ interface_listen_ip = data.get('listen_ip')
+ interface_listen_port = data.get('listen_port')
+
+ # ensure listen ip provided
+ if interface_listen_ip is None or interface_listen_ip == "":
+ return web.json_response({
+ "message": "Listen IP is required",
+ }, status=422)
+
+ # ensure listen port provided
+ if interface_listen_port is None or interface_listen_port == "":
+ return web.json_response({
+ "message": "Listen Port is required",
+ }, status=422)
+
+ interface_details["listen_ip"] = data.get('listen_ip')
+ interface_details["listen_port"] = data.get('listen_port')
+
# handle rnode interface
if interface_type == "RNodeInterface":
diff --git a/public/index.html b/public/index.html
index e3f1c92..27c8764 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1069,6 +1069,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1261,9 +1274,13 @@
newInterfaceName: null,
newInterfaceType: null,
+
newInterfaceTargetHost: null,
newInterfaceTargetPort: null,
+ newInterfaceListenIp: null,
+ newInterfaceListenPort: null,
+
newInterfacePort: null,
newInterfaceFrequency: null,
newInterfaceBandwidth: null,
@@ -2711,6 +2728,10 @@
this.newInterfaceTargetHost = null;
this.newInterfaceTargetPort = null;
+ // tcp server interface
+ this.newInterfaceListenIp = null;
+ this.newInterfaceListenPort = null;
+
// rnode interface
this.newInterfacePort = null;
this.newInterfaceFrequency = null;
@@ -2739,6 +2760,10 @@
this.newInterfaceTargetHost = iface.target_host;
this.newInterfaceTargetPort = iface.target_port;
+ // tcp server interface
+ this.newInterfaceListenIp = iface.listen_ip;
+ this.newInterfaceListenPort = iface.listen_port;
+
// rnode interface
this.newInterfacePort = iface.port;
this.newInterfaceFrequency = iface.frequency;
@@ -2782,6 +2807,9 @@
// tcp client interface
target_host: this.newInterfaceTargetHost,
target_port: this.newInterfaceTargetPort,
+ // tcp server interface
+ listen_ip: this.newInterfaceListenIp,
+ listen_port: this.newInterfaceListenPort,
// rnode interface
port: this.newInterfacePort,
frequency: this.newInterfaceFrequency,