smith
smith

Reputation: 13

Does cloudflare site http://1.1.1.1/ have any http endpoint that returns the visitor's internet ip address?

Like what http://httpbin.org/ip returns, does cloudflare site http://1.1.1.1/ have any similar http endpoint that returns the visitor's internet ip address?

Upvotes: 1

Views: 136

Answers (2)

Laurent
Laurent

Reputation: 14401

You can also use an IP geolocation API for this purpose. It has the benefit to include many data related to the visitor IP, in addition to the IP address. Here is an example:

https://api.ipregistry.co/?key=tryout&pretty=true

Upvotes: 0

iBug
iBug

Reputation: 37227

https://1.1.1.1/cdn-cgi/trace

The 3rd line typically reads ip=ex.a.mp.le, go parse it out.

Upvotes: 1

Related Questions