cuberite / cuberite

A lightweight, fast and extensible game server for Minecraft

Home Page:https://cuberite.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maybe display IP adress on startup

12xx12 opened this issue · comments

We had someone needing help on the discord server, and some might be resolved by displaying the server's IP address.

This is just an idea. And i'd like to hear your thoughts

We have a message saying "Webadmin running on port 8080" so extending that message would make sense. But getting the public IP? It may be more educational to tell people how to do it themselves via icanhazip.com or similar.

It's not technically possible to get the public inbound IP. We can make a reasonable guess by pinging out to an internet server that returns the IP but that's relatively useless - if somebody doesn't know their public IP, they can't set up port forwarding; this will just cause more headaches for us.

Slightly different for local network IP, although a computer can have multiple network interfaces it should be possible to programmatically get all the IPs. This will be OS-specific and annoying though. I'm not opposed to this as it would certainly be a useful feature but (personally) it's more work than it's worth. If this issue really takes somebody then make a PR.