Autodetect IP address for advertisement

While still allowing it to be overridden in the config file if desired.