I recently planned to open-source a DDNS dynamic DNS resolution program I wrote, but on a computer or server you can’t directly see the public IP—only the internal IP is visible—so the program cannot know the address of its Internet exit. I wrote another app to obtain the public IP address. It is implemented using serverless function compute, with good availability and speed, so I’m sharing it for everyone to use.
Windows Users: Get Your Internet Public Exit IP Address
Windows users can use a browser to directly visit the link: http://ip.renfei.net to view their Internet public exit IP address.
Linux Command-Line Users: Get Your Internet Public Exit IP Address
Linux users without a graphical interface, such as on a server, can use the curl command to view their Internet public exit IP address:
curl ip.renfei.net

Get Your Internet Public Exit IP Address Programmatically via the API
For convenient programmatic access, I return the IP address directly in JSON format. You can use any programming language to send an HTTP request to ip.renfei.net, supporting common request types such as GET, POST, and PUT.
No Response Received
In some special network environments, there may be web behavior management devices that, upon detecting that the returned IP is treated as sensitive data, will block it. You can try accessing via HTTPS instead.
