Who are you and who am I?
Returns the public IP address of this server and of the requester.
Useful for monitoring boxes connected to VPNs for internet IP redirection.
$ git clone https://github.com/justinnamilee/IPdiff.git
$ cd IPdiff
$ npm install
$ node ipdiff.js
$ curl http://your-application-host.local:6969/json
/
- Provides a basic health line to let you know it's working.
/health
- Returns a full json health status.
/text
- Returns the service's external IP and the requester's IP in text/html format (for some reason).
/json
- Returns the service's external IP and the requester's IP in json format.
/ip
- Returns the requester's IP only, like a good IP lookup service would in text/plain format.
Make sure you enable the x-forwarded-for
header if you are running behind a reverse proxy.