100% of attacks can not be protected. If someone wants DDoS, he knows what to do and knows how to find out the IP.

But it will be more beautiful if it is hidden by default.
If you run the client with some kind of safe / debug option, then you can display it.