Fix client IP when connected via SSH

This commit is contained in:
Bryan Ashby 2017-02-18 09:37:22 -07:00
parent 27991ec3a0
commit 701f3c9728
3 changed files with 6 additions and 9 deletions

View file

@ -56,16 +56,17 @@ function getActiveNodeList(authUsersOnly) {
}
function addNewClient(client, clientSock) {
const id = client.session.id = clientConnections.push(client) - 1;
const id = client.session.id = clientConnections.push(client) - 1;
const remoteAddress = client.remoteAddress = clientSock.remoteAddress;
// Create a client specific logger
// Note that this will be updated @ login with additional information
client.log = logger.log.child( { clientId : id } );
const connInfo = {
ip : clientSock.remoteAddress,
serverName : client.session.serverName,
isSecure : client.session.isSecure,
remoteAddress : remoteAddress,
serverName : client.session.serverName,
isSecure : client.session.isSecure,
};
if(client.log.debug()) {