简体   繁体   中英

Distinguishing Between Multiple Clients On Same Machine

I have been actively developing a networking library called NitroNet over the past year now and am looking to get ideas on how to securely distinguish between multiple clients (sockets) connected to a server on the same machine.

I have been developing the library using Java and I currently have it distinguishing between clients using the clients UDP port as the unique identifier. This works fine but I'm not convinced that it is the most secure way to actually distinguish between them. So I want to know, is there a better more secure way to truly distinguish between them?

When I say I need "to distinguish between them" I mean that when a packet is received from a client on the server-side I need to be able to get the corresponding connection instance on the server side using only the information from the socket. I don't want any ID numbers being stored on the actual client for fear of reverse engineering and manually changing the ID. Any ideas or suggestions would be greatly appreciated.

When a client first connects, have the initial server response contain a hash built using both the UDP port and the time the connection was established. That way you know it's the same client, because two clients can't connect at the exact same time on the same port.

This doesn't address the fear of reverse engineering unless you could keep your server, and thus the hash-building algorithm, secure. However, even if this is compromised, the UDP port would remain the same leaving you at the same level of security you currently have.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM