> Really Bad Idea
Brother, if I can do something to you based on your IP address you are already totally fucked.
This whole "the thing that I use to be addressed on the internet is dangerous" myth needs to die. It's a telephone number, not a home address. You can block numbers.
Similarly, using P2P for game VOIP is a Really Bad Idea as it basically doxxes the player. Even 1v1 lobbies aren't always with people you trust enough to invite them into your house, so you shouldn't be handing them your IP address! In 99% of cases it is better to proxy it via a server instead.
[0]: https://localsend.org/