Get the Current Public IP Address
I saw someone sharing an open source Py library to get the current IP on v2ex, Which remind me that the proxy crawler I wrote before was verified by Taobao’s API. There are concurrency restrictions, and maybe I can change it to a better way.
Let me talk about a particularly amazing way
nc ns1.dnspod.net 6666
The data returned is IP, and the speed is very fast.
There are also various ways based on curl, such as
If you have a large demand for access, buy a VPS, and build a Web Server to return the IP in the HTTP Header. Here is what I try with Python.
First, install the flask, local debugging is best to install virtualenv
from flask import Flask, request
I did not use the pressure measurement tool to measure, But I think is not bad. If you have running Nginx, you should consider the IP change of the forwarding process, mainly the
The performance should improve a lot if we use Go but not Python.
After obtaining the public network IP and matching the domain name resolution interface, and using DMZ, it is actually another type of Ory DDNS.