From 8c01071868f229f03fcb6b5ec36061ff028b9d07 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Fri, 1 Jul 2022 13:58:31 -0700 Subject: [PATCH] Display alternate port in relay links. --- views/default.handlebars | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/views/default.handlebars b/views/default.handlebars index 3a206ab3..7bfaf286 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -4583,8 +4583,8 @@ // RDP link, show this link only of the remote machine is Windows. if ((((node.conn & 1) != 0) || (node.mtype == 3)) && (node.agent) && ((meshrights & 8) != 0) && (node.agent.id != 14)) { if (webRelayPort != 0) { - x += '' + "HTTP" + ' '; - x += '' + "HTTPS" + ' '; + x += '' + "HTTP" + ((node.httpport && (node.httpport != 80)) ? '/' + node.httpport : '') + ' '; + x += '' + "HTTPS" + ((node.httspport && (node.httpsport != 443)) ? '/' + node.httpsport : '') + ' '; } if ((node.agent.id > 0) && (node.agent.id < 5)) { if (navigator.platform.toLowerCase() == 'win32') { @@ -4596,12 +4596,12 @@ if (node.agent.id > 4) { if ((navigator.platform.toLowerCase() == 'win32') || (navigator.platform.toLowerCase() == 'macintel')) { if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.ssh != false)) { - x += '' + "SSH" + ' '; + x += '' + "SSH" + ' '; } } if (navigator.platform.toLowerCase() == 'win32') { if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.scp != false)) { - x += '' + "SCP" + ' '; + x += '' + "SCP" + ' '; } } } @@ -7183,25 +7183,25 @@ // RDP link, show this link only of the remote machine is Windows. if ((((connectivity & 1) != 0) || (node.mtype == 3)) && (node.agent) && ((meshrights & 8) != 0)) { if (webRelayPort != 0) { - x += '' + "HTTP" + ' '; - x += '' + "HTTPS" + ' '; + x += '' + "HTTP" + ((node.httpport && (node.httpport != 80)) ? '/' + node.httpport : '') + ' '; + x += '' + "HTTPS" + ((node.httpsport && (node.httpsport != 443)) ? '/' + node.httpsport : '') + ' '; } if ((node.agent.id > 0) && (node.agent.id < 5)) { if (navigator.platform.toLowerCase() == 'win32') { if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.rdp != false)) { - x += '' + "RDP" + ' '; + x += '' + "RDP" + ((node.rdpport && (node.rdpport != 3389)) ? '/' + node.rdpport : '') + ' '; } } } if (node.agent.id > 4) { if ((navigator.platform.toLowerCase() == 'win32') || (navigator.platform.toLowerCase() == 'macintel')) { if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.ssh != false)) { - x += '' + "SSH" + ' '; + x += '' + "SSH" + ((node.sshport && (node.sshport != 22)) ? '/' + node.sshport : '') + ' '; } } if (navigator.platform.toLowerCase() == 'win32') { if ((serverinfo.devicemeshrouterlinks == null) || (serverinfo.devicemeshrouterlinks.scp != false)) { - x += '' + "SCP" + ' '; + x += '' + "SCP" + ((node.sshport && (node.sshport != 22)) ? '/' + node.sshport : '') + ' '; } } }