CHANGED: Use icanhazip instead of whatismyip.com for external IP detection when required