jeessy2 / ddns-go

Simple and easy to use DDNS. Support Aliyun, Tencent Cloud, Dnspod, Cloudflare, Callback, Huawei Cloud, Baidu Cloud, Porkbun, GoDaddy, Namecheap, NameSilo...
MIT License
10.7k stars 1.23k forks source link

fix(cloudflare): convert DNS record names to Punycode #1160

Closed WaterLemons2k closed 1 month ago

WaterLemons2k commented 1 month ago

What does this PR do?

Converts DNS record names to its Punycode format with package golang.org/x/net/idna.

Cloudflare API still has trouble handling Unicode forms of IDNs.

Motivation

Additional Notes


Also use url.Values to build the URL parameters for GET requests.

jeessy2 commented 1 month ago

Possible values in the Webhook may be xn--xxx?

WaterLemons2k commented 1 month ago

Possible values in the Webhook may be xn--xxx?

Forgot that editing in-place can have side effects on Webhooks, sorry. Fixed that too.