Update server.cjs #17

Merged
firestrife23 merged 1 commits from patch-1 into dev-1.1 2025-03-08 05:46:39 +00:00

View File

@@ -22,8 +22,17 @@ io.on("connection", (socket) => {
console.error("Invalid hostConfig received:", hostConfig);
return;
}
console.log("Received hostConfig:", hostConfig);
// Redact only sensitive info for logging
const safeHostConfig = {
ip: hostConfig.ip,
port: hostConfig.port,
user: hostConfig.user,
password: hostConfig.password ? '***REDACTED***' : undefined,
rsaKey: hostConfig.rsaKey ? '***REDACTED***' : undefined,
};
console.log("Received hostConfig:", safeHostConfig);
const { ip, port, user, password, rsaKey } = hostConfig;
const conn = new SSHClient();
@@ -100,4 +109,4 @@ io.on("connection", (socket) => {
server.listen(8081, '0.0.0.0', () => {
console.log("Server is running on port 8081");
});
});