In Node.js, it queries the DNS records of OpenDNS which has an entry with your IP address. In browsers, it uses the excellent icanhaz service through HTTPS..