oznu / docker-cloudflare-ddns

A small amd64/ARM/ARM64 Docker image that allows you to use CloudFlare as a DDNS / DynDNS Provider.
https://hub.docker.com/r/oznu/cloudflare-ddns/
GNU General Public License v3.0
1.07k stars 213 forks source link

ERROR: Failed To Get Public IPv4 Address #78

Open MilkTeaNo7 opened 3 years ago

MilkTeaNo7 commented 3 years ago

I use docker to create command as follows.

docker run \ -e API_KEY=I-y2XXXSPXXcDXXJXXXWJ \ -e ZONE=baidu.top \ -e RRTYPE=A \ --network host \ oznu/cloudflare-ddns

But it always prompts that I can't get the IPV4 address, but when I use a proxy, I can get the IP address, but not the real one.

This problem may be that a domain name is blocked by a telecom operator, I do not know how to deal with it

Thank you for your help!

piloer commented 2 years ago

Go to /app/cloudflare.sh in the container

found

curl -sf4 https://ipinfo.io | jq -r '.ip'

Replace

curl -sf4 https://ipconfig.io