Added router link local port to schema.

This commit is contained in:
Ylian Saint-Hilaire 2021-05-12 12:10:55 -07:00
parent 02fd8751b0
commit 97e328ea3f
2 changed files with 11 additions and 2 deletions

View File

@ -321,12 +321,22 @@
},
"port": {
"description": "The port on the remote device.",
"type": "number"
"default": 0,
"minimum": 0,
"maximum": 65535,
"type": "integer"
},
"ip": {
"description": "Target IP address. If not specified, the target of the connection is the remote device running the MeshAgent.",
"type": "string"
},
"localport": {
"description": "The local port MeshCentral Router would bind to. By default, a random available port is used.",
"default": 0,
"minimum": 0,
"maximum": 65535,
"type": "integer"
},
"filter": {
"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.",
"type": "array",

View File

@ -4337,7 +4337,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
if (command.nodeid) { cookieContent.nodeid = command.nodeid; }
if (command.tcpaddr) { cookieContent.tcpaddr = command.tcpaddr; } // Indicates the browser want the agent to TCP connect to a remote address
if (command.tcpport) { cookieContent.tcpport = command.tcpport; } // Indicates the browser want the agent to TCP connect to a remote port
//if (command.localport) { cookieContent.localport = command.localport; } // Indicates the browser want MeshCenral Router to use a local port
if (command.ip) { cookieContent.ip = command.ip; } // Indicates the browser want to agent to relay a TCP connection to a IP:port
if (node.mtype == 3) { cookieContent.lc = 1; command.localRelay = true; } // Indicate this is for a local connection
command.cookie = parent.parent.encodeCookie(cookieContent, parent.parent.loginCookieEncryptionKey);