diff --git a/server/index.js b/server/index.js index 38d18c6..9bab5ee 100644 --- a/server/index.js +++ b/server/index.js @@ -32,7 +32,7 @@ tun.on('data', (buff) => { const user = Object.values(config.users).find(x => x.addr == p.destinationIp); //(user); if (!user) return; - const targetIp = ips[user.username]; + const targetIp = Object.entries(conns).find(x => x[1] == user.username)[0]; const targetPort = ports[user.username]; //(targetIp, targetPort); if (!targetIp || !targetPort) return;