use only IPSocket::getaddress is a problem to retrieve the public IP because usually the host will resolve the domain name to the internal IP, not the external one; the solution adopted was to use the jsondns service to query for the domain name and get the way it's resolved to the Internet
if there's any problem with the jsondns service, it won't replace the previous external_ip value