opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
810 stars 593 forks source link

Added Gandi support to ddclient native backend. #4066

Closed ElectronicViking closed 2 days ago

ElectronicViking commented 4 days ago

Adding Gandi LiveDNS native backend support to the DDclient plugin.

Problem: while the ddclient plugin supports Gandi when using the ddclient backend, support is absent from the native backend.

I used the cloudflare.py and dyndns2.py files as a template for gandi.py.

What needs to be configured in the plugin web interface for it to work: Password (API key / personal access token), zone, hostname (host only, not the FQDN), check IP method.

Possible issues: Not all fields in the opnsense web interface are used. Specifically username, resource ID, and force SSL. Gandi appears in the bottom of the service list, instead of being sorted alphabetically. I'm unsure how to fix this. I only check for a 2xx response to determine success or failure. This could be improved by something as simple as writing the http response body to the log when there's an error (non-200 response code).

AdSchellevis commented 4 days ago

@ElectronicViking thanks, some feedback on your comments:

Not all fields in the opnsense web interface are used. Specifically username, resource ID, and force SSL.

Maybe you can also open a PR for the documentation (https://github.com/opnsense/docs/blob/master/source/manual/dynamic_dns.rst), specifics for different services are explained there when they matter. I assume the same input is valid for the native client as well.

Gandi appears in the bottom of the service list, instead of being sorted alphabetically. I'm unsure how to fix this.

I need to double check this, maybe we miss a sort somewhere.

fichtner commented 4 days ago

For naming purposes this would still be nice: https://github.com/opnsense/plugins/issues/3553

ElectronicViking commented 4 days ago

Maybe you can also open a PR for the documentation (https://github.com/opnsense/docs/blob/master/source/manual/dynamic_dns.rst), specifics for different services are explained there when they matter. I assume the same input is valid for the native client as well.

Good idea, I'll give it a shot when I have some time.