dns/ddclient Add Cloudflare (#2781)

* Added Cloudflare as DynDNS provider
* Fixed zone requirement
This commit is contained in:
Robin Müller 2022-01-29 15:59:46 +01:00 committed by GitHub
parent af2ec65aa0
commit 8ee15ced75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 1 deletions

View file

@ -30,6 +30,13 @@
<style>optional_setting service_dyndns2 service_easydns</style>
<help>add a DNS wildcard CNAME record that points to the configured host.</help>
</field>
<field>
<id>account.zone</id>
<label>Zone</label>
<type>text</type>
<style>optional_setting service_cloudflare</style>
<help>Zone containing the host entry.</help>
</field>
<field>
<id>account.hostnames</id>
<label>Hostname(s)</label>

View file

@ -54,6 +54,7 @@
<ValidationMessage>A service type is required.</ValidationMessage>
<OptionValues>
<changeip>Changeip</changeip>
<cloudflare>Cloudflare</cloudflare>
<dyndns2>DynDNS.com</dyndns2>
<dnspark>DnsPark</dnspark>
<dslreports1>DslReports</dslreports1>
@ -87,6 +88,10 @@
<default>0</default>
<Required>Y</Required>
</wildcard>
<zone type="HostnameField">
<Required>N</Required>
<IpAllowed>N</IpAllowed>
</zone>
<description type="TextField">
<Required>N</Required>
<mask>/^([\t\n\v\f\r 0-9a-zA-Z.,_\x{00A0}-\x{FFFF}]){1,255}$/u</mask>

View file

@ -46,7 +46,10 @@ use=web, web=http://dynamic.zoneedit.com/checkip.html
{% if helpers.exists('OPNsense.DynDNS.accounts.account') %}
{% for account in helpers.toList('OPNsense.DynDNS.accounts.account') %}
{% if account.enabled|default('0') == '1' %}
{% if account.service == 'nsupdatev4' %}
{% if account.service == 'cloudflare' %}
protocol=cloudflare
zone={{account.zone}}
{% elif account.service == 'nsupdatev4' %}
protocol=dyndns2
ssl=yes
server=ipv4.nsupdate.info