Added router link local port to schema.

Ylian Saint-Hilaire committed May 12, 2021 at 12:10 UTC 97e328ea3ffa7f6b029e29806eed78b6f75873b2
2 files changed +11 -2
meshcentral-config-schema.json
+11 -1
@@ -321,12 +321,22 @@
321 },
322 "port": {
323 "description": "The port on the remote device.",
324 - "type": "number"
324 + "default": 0,
325 + "minimum": 0,
326 + "maximum": 65535,
327 + "type": "integer"
328 },
329 "ip": {
330 "description": "Target IP address. If not specified, the target of the connection is the remote device running the MeshAgent.",
331 "type": "string"
332 },
333 + "localport": {
334 + "description": "The local port MeshCentral Router would bind to. By default, a random available port is used.",
335 + "default": 0,
336 + "minimum": 0,
337 + "maximum": 65535,
338 + "type": "integer"
339 + },
340 "filter": {
341 "description": "Array of node/<domain>/<id> or mesh/<domain>/<id> or tag:<tag> strings. When set, the link will only show up for the specified devices, device groups or device tag.",
342 "type": "array",
meshuser.js
-1
@@ -4337,7 +4337,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
4337 if (command.nodeid) { cookieContent.nodeid = command.nodeid; }
4338 if (command.tcpaddr) { cookieContent.tcpaddr = command.tcpaddr; } // Indicates the browser want the agent to TCP connect to a remote address
4339 if (command.tcpport) { cookieContent.tcpport = command.tcpport; } // Indicates the browser want the agent to TCP connect to a remote port
4340 - //if (command.localport) { cookieContent.localport = command.localport; } // Indicates the browser want MeshCenral Router to use a local port
4340 if (command.ip) { cookieContent.ip = command.ip; } // Indicates the browser want to agent to relay a TCP connection to a IP:port
4341 if (node.mtype == 3) { cookieContent.lc = 1; command.localRelay = true; } // Indicate this is for a local connection
4342 command.cookie = parent.parent.encodeCookie(cookieContent, parent.parent.loginCookieEncryptionKey);