mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-14 08:14:59 -05:00
fix agentaliasdns display (#5518)
This commit is contained in:
parent
6ba4bf7202
commit
b7385e382c
@ -7829,12 +7829,14 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
|||||||
function StartAltWebServer(port, addr) {
|
function StartAltWebServer(port, addr) {
|
||||||
if ((port < 1) || (port > 65535)) return;
|
if ((port < 1) || (port > 65535)) return;
|
||||||
var agentAliasPort = null;
|
var agentAliasPort = null;
|
||||||
|
var agentAliasDns = null;
|
||||||
if (args.agentaliasport != null) { agentAliasPort = args.agentaliasport; }
|
if (args.agentaliasport != null) { agentAliasPort = args.agentaliasport; }
|
||||||
|
if (args.agentaliasdns != null) { agentAliasDns = args.agentaliasdns; }
|
||||||
if (obj.tlsAltServer != null) {
|
if (obj.tlsAltServer != null) {
|
||||||
if (obj.args.lanonly == true) {
|
if (obj.args.lanonly == true) {
|
||||||
obj.tcpAltServer = obj.tlsAltServer.listen(port, addr, function () { console.log('MeshCentral HTTPS agent-only server running on port ' + port + ((agentAliasPort != null) ? (', alias port ' + agentAliasPort) : '') + '.'); });
|
obj.tcpAltServer = obj.tlsAltServer.listen(port, addr, function () { console.log('MeshCentral HTTPS agent-only server running on port ' + port + ((agentAliasPort != null) ? (', alias port ' + agentAliasPort) : '') + '.'); });
|
||||||
} else {
|
} else {
|
||||||
obj.tcpAltServer = obj.tlsAltServer.listen(port, addr, function () { console.log('MeshCentral HTTPS agent-only server running on ' + certificates.CommonName + ':' + port + ((agentAliasPort != null) ? (', alias port ' + agentAliasPort) : '') + '.'); });
|
obj.tcpAltServer = obj.tlsAltServer.listen(port, addr, function () { console.log('MeshCentral HTTPS agent-only server running on ' + ((agentAliasDns != null) ? agentAliasDns : certificates.CommonName) + ':' + port + ((agentAliasPort != null) ? (', alias port ' + agentAliasPort) : '') + '.'); });
|
||||||
}
|
}
|
||||||
obj.parent.authLog('https', 'Server listening on 0.0.0.0 port ' + port + '.');
|
obj.parent.authLog('https', 'Server listening on 0.0.0.0 port ' + port + '.');
|
||||||
obj.parent.updateServerState('https-agent-port', port);
|
obj.parent.updateServerState('https-agent-port', port);
|
||||||
|
Loading…
Reference in New Issue
Block a user