Get hashed IP of player (message sender) for blocking handling?

Hi! Is it possible to get the IP of a message's sender (for privacy reasons, hashed), so that one can implement custom client player block lists -- that is, a block which would guard against the other re-entering the room or quickly setting up a new account to circumvent the block?

For what it's worth, I don't have my own server in the mix, I'm using all-Photon.

If this is not possible, I'd like to suggest this as feature. Thanks!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Philipp,

    Photon does not expose client IP addresses.
    What you can do is block users based on their UserId.
    So you need to have a "blacklist" or "banned users list" and prevent them from authenticating using custom authentication.
  • Thank you for the fast reply!

    One problem with using authentication is that people will just create a new account to circumvent a block (whereas switching to a new IP is technically more challenging for most, and one can even block known VPNs). We see this happen all the time in the social apps we maintain where we use authentication (Google login, Facebook etc. -- people created dozens of these a day if needed), and only an IP block even begins to help. We could, of course, implement IP blocks in a custom server authentication we were to write, but that brings me back to me using all-Photon without a custom server on our end.

    So yeah, I would love if you could consider this (an option to show hashed IPs, so it's keeping privacy) as a feature request.

    Maybe for now, my best bet is to use a Player CustomProperty "HashedIP" myself, and hope most people will not understand how to hack that (though they could, as it's their own network traffic sending it).
  • ... or maybe even better than setting a Player CustomProperty, I'll push the HashedIP into AuthenticationValues.UserId, set RoomOptions.PublishUserId, and then access it via PhotonPlayer.UserId. Hmm.
  • PS: I do understand that many people are on dynamically switching IPs via their Internet Providers, however, that's usually much slower (and more out of their control & understanding) than setting up a fresh account.
  • OneManArmy
    OneManArmy ✭✭✭
    From my experience blocking IP's is waste of time and does more harm than helps.