If you make a direct connection to other users, they see your IP address. So use Tor or a VPN.
Many P2P lookup systems assign identifiers for routing etc. So assign ephemeral ones for anything that doesn't need a persistent one, and make sure persistent ones aren't suitable for correlation, either by not using the same identifier for multiple services by the same person, or by using the same identifier for multiple services operated by a large number of unrelated people, or both.
If you make a direct connection to other users, they see your IP address. So use Tor or a VPN.
Many P2P lookup systems assign identifiers for routing etc. So assign ephemeral ones for anything that doesn't need a persistent one, and make sure persistent ones aren't suitable for correlation, either by not using the same identifier for multiple services by the same person, or by using the same identifier for multiple services operated by a large number of unrelated people, or both.