haxball / haxball-issues

114 stars 42 forks source link

Player unique id #320

Closed VukBakic closed 5 years ago

VukBakic commented 6 years ago

Can we get id that doesn't change when player rejoins room? I have players ranks and people started joining with other people names and it kinda ruins the point. Can we get like unique id that corresponds to players ip address? I think this could be done since bans are probably handled that way and this would also make #317 doable.

Leo-MapCreator commented 6 years ago

Create object player.ip where it doesnt return the actual player ip, but an id that doesnt change over time

tohey commented 6 years ago

This is definitely an urgent need. However, giving out IP addresses can harm privacy. How about hashing the IP address? For extra privacy, add a random salt that changes after a long enough period of time.

Wrathen commented 6 years ago

This is definitely an urgent need. However, giving out IP addresses can harm privacy. How about hashing the IP address? For extra privacy, add a random salt that changes after a long enough period of time.

This was implemented in flash version. But in the current version when you are banning people it uses the IP adress. He can't give other people's IP adress thats for sure but making an ID based on IP and maybe some other factors is something he can do.

basro commented 6 years ago

In the future I'll probably implement automatically generated player ids that will allow the host to verify that a user is who he claims to be in a cryptographically secure way.

Users will be able to generate new ids any time they want, but they wont be able to fake other player id's.

olehmisar commented 6 years ago

You can look at players' IPs if you are host. Just track webrtc connections with your browser. So, I think hashing IP addresses is not necessary.

basro commented 5 years ago

This feature is implemented (player auth) now so I'm closing this issue.