TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.5k stars 221 forks source link

use regexp to match public IP #123

Closed atomlong closed 2 years ago

atomlong commented 2 years ago

The data returned by some 'ip_url' may be in the json format (http://ip-api.com/json/) or xml format (http://ip-api.com/xml/). This commit allows godns to extract a IP address from a complex string. Both IPv4 and IPv6 are supported.

atomlong commented 2 years ago

A new commit pushed.

TimothyYe commented 2 years ago

Thanks for your contribution!