You don't have to do that. Protocols like tox for example are distributed and use DHT in order to find peers.