Better myip function for local and public ip