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

Added Strato as Provider #193

Closed Phiwatec closed 1 year ago

Phiwatec commented 1 year ago

I added the german hosting company Strato as a provider. It is basically the same as google with the url and login params changed.

TimothyYe commented 1 year ago

Hi @Phiwatec , I see a new file added internal/provider/hetzner/hetzner_handler.go but it's empty. May I know what this file is used for?

Phiwatec commented 1 year ago

Hi @Phiwatec , I see a new file added internal/provider/hetzner/hetzner_handler.go but it's empty. May I know what this file is used for?

Sorry I messed up that file. Was supposed to be on a different branch. I now deleted the empty file and folder. :)

TimothyYe commented 1 year ago

Hi @Phiwatec , I see a new file added internal/provider/hetzner/hetzner_handler.go but it's empty. May I know what this file is used for?

Sorry I messed up that file. Was supposed to be on a different branch. I now deleted the empty file and folder. :)

I see, thanks.

BTW, to register a new DNS provider, I think you should also update the file factory.go, and pay attention to the function GetProvider, all the providers are registered here. So did you test this newly added provider? Does it work well?

Phiwatec commented 1 year ago

It works now. I updated all necessary files. (Took a bit. Was on vacation :) ) I added one line in google_handler because the system did not handle a wrong password or domain name. Google and strato return either badauth or nohost when auth failed or the domain to update is unknown respectively. Now it checks for 'good' or 'nochg' and returns an error otherwise. ( Same as in PR from UniqueUserajs)

TimothyYe commented 1 year ago

@Phiwatec Thank you for your contribution!