Whitespace fixes

This commit is contained in:
Richard Hansen 2024-06-24 17:05:31 -04:00
parent 5620127c71
commit 9c5160a514
3 changed files with 118 additions and 122 deletions

View file

@ -13,43 +13,43 @@ your dynamic DNS provider(s): <https://github.com/troglobit/inadyn> or
Dynamic DNS services currently supported include: Dynamic DNS services currently supported include:
* [1984.is](https://www.1984.is/product/freedns) * [1984.is](https://www.1984.is/product/freedns)
* [ChangeIP](https://www.changeip.com) * [ChangeIP](https://www.changeip.com)
* [CloudFlare](https://www.cloudflare.com) * [CloudFlare](https://www.cloudflare.com)
* [ClouDNS](https://www.cloudns.net) * [ClouDNS](https://www.cloudns.net)
* [DDNS.fm](https://www.ddns.fm/) * [DDNS.fm](https://www.ddns.fm/)
* [DigitalOcean](https://www.digitalocean.com/) * [DigitalOcean](https://www.digitalocean.com/)
* [dinahosting](https://dinahosting.com) * [dinahosting](https://dinahosting.com)
* [DonDominio](https://www.dondominio.com) * [DonDominio](https://www.dondominio.com)
* [DNS Made Easy](https://dnsmadeeasy.com) * [DNS Made Easy](https://dnsmadeeasy.com)
* [DNSExit](https://dnsexit.com/dns/dns-api) * [DNSExit](https://dnsexit.com/dns/dns-api)
* [dnsHome.de](https://www.dnshome.de) * [dnsHome.de](https://www.dnshome.de)
* [Domeneshop](https://api.domeneshop.no/docs/#tag/ddns/paths/~1dyndns~1update/get) * [Domeneshop](https://api.domeneshop.no/docs/#tag/ddns/paths/~1dyndns~1update/get)
* [DslReports](https://www.dslreports.com) * [DslReports](https://www.dslreports.com)
* [Duck DNS](https://duckdns.org) * [Duck DNS](https://duckdns.org)
* [DynDNS.com](https://account.dyn.com) * [DynDNS.com](https://account.dyn.com)
* [EasyDNS](https://www.easydns.com ) * [EasyDNS](https://www.easydns.com )
* [Enom](https://www.enom.com) * [Enom](https://www.enom.com)
* [Freedns](https://freedns.afraid.org) * [Freedns](https://freedns.afraid.org)
* [Freemyip](https://freemyip.com) * [Freemyip](https://freemyip.com)
* [Gandi](https://gandi.net) * [Gandi](https://gandi.net)
* [GoDaddy](https://www.godaddy.com) * [GoDaddy](https://www.godaddy.com)
* [Hurricane Electric](https://dns.he.net) * [Hurricane Electric](https://dns.he.net)
* [Infomaniak](https://faq.infomaniak.com/2376) * [Infomaniak](https://faq.infomaniak.com/2376)
* [INWX](https://www.inwx.com/) * [INWX](https://www.inwx.com/)
* [Loopia](https://www.loopia.se) * [Loopia](https://www.loopia.se)
* [Mythic Beasts](https://www.mythic-beasts.com/support/api/dnsv2/dynamic-dns) * [Mythic Beasts](https://www.mythic-beasts.com/support/api/dnsv2/dynamic-dns)
* [NameCheap](https://www.namecheap.com) * [NameCheap](https://www.namecheap.com)
* [NearlyFreeSpeech.net](https://www.nearlyfreespeech.net/services/dns) * [NearlyFreeSpeech.net](https://www.nearlyfreespeech.net/services/dns)
* [Njalla](https://njal.la/docs/ddns) * [Njalla](https://njal.la/docs/ddns)
* [Noip](https://www.noip.com) * [Noip](https://www.noip.com)
* nsupdate - see nsupdate(1) and ddns-confgen(8) * nsupdate - see nsupdate(1) and ddns-confgen(8)
* [OVH](https://www.ovhcloud.com) * [OVH](https://www.ovhcloud.com)
* [Porkbun](https://porkbun.com) * [Porkbun](https://porkbun.com)
* [regfish.de](https://www.regfish.de/domains/dyndns) * [regfish.de](https://www.regfish.de/domains/dyndns)
* [Sitelutions](https://www.sitelutions.com) * [Sitelutions](https://www.sitelutions.com)
* [Yandex](https://dns.yandex.com) * [Yandex](https://dns.yandex.com)
* [Zoneedit](https://www.zoneedit.com) * [Zoneedit](https://www.zoneedit.com)
`ddclient` supports finding your IP address from many cable and DSL `ddclient` supports finding your IP address from many cable and DSL
broadband routers. broadband routers.

View file

@ -1,12 +1,12 @@
###################################################################### ######################################################################
## ##
## Define default global variables with lines like: ## Define default global variables with lines like:
## var=value [, var=value]* ## var=value [, var=value]*
## These values will be used for each following host unless overridden ## These values will be used for each following host unless overridden
## with a local variable definition. ## with a local variable definition.
## ##
## Define local variables for one or more hosts with: ## Define local variables for one or more hosts with:
## var=value [, var=value]* host.and.domain[,host2.and.domain...] ## var=value [, var=value]* host.and.domain[,host2.and.domain...]
## ##
## Lines can be continued on the following line by ending the line ## Lines can be continued on the following line by ending the line
## with a \ ## with a \
@ -21,31 +21,31 @@
## missing from a URL. Defaults to "yes". ## missing from a URL. Defaults to "yes".
#ssl=yes #ssl=yes
daemon=300 # check every 300 seconds daemon=300 # check every 300 seconds
syslog=yes # log update msgs to syslog syslog=yes # log update msgs to syslog
mail=root # mail all msgs to root mail=root # mail all msgs to root
mail-failure=root # mail failed update msgs to root mail-failure=root # mail failed update msgs to root
pid=@runstatedir@/ddclient.pid # record PID in file. pid=@runstatedir@/ddclient.pid # record PID in file.
# postscript=script # run script after updating. The # postscript=script # run script after updating. The new IP is
# new IP is added as argument. # added as argument.
# #
#use=watchguard-soho, fw=192.168.111.1:80 # via Watchguard's SOHO FW #use=watchguard-soho, fw=192.168.111.1:80 # via Watchguard's SOHO FW
#use=netopia-r910, fw=192.168.111.1:80 # via Netopia R910 FW #use=netopia-r910, fw=192.168.111.1:80 # via Netopia R910 FW
#use=smc-barricade, fw=192.168.123.254:80 # via SMC's Barricade FW #use=smc-barricade, fw=192.168.123.254:80 # via SMC's Barricade FW
#use=netgear-rt3xx, fw=192.168.0.1:80 # via Netgear's internet FW #use=netgear-rt3xx, fw=192.168.0.1:80 # via Netgear's internet FW
#use=linksys, fw=192.168.1.1:80 # via Linksys's internet FW #use=linksys, fw=192.168.1.1:80 # via Linksys's internet FW
#use=maxgate-ugate3x00, fw=192.168.0.1:80 # via MaxGate's UGATE-3x00 FW #use=maxgate-ugate3x00, fw=192.168.0.1:80 # via MaxGate's UGATE-3x00 FW
#use=elsa-lancom-dsl10, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router #use=elsa-lancom-dsl10, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router
#use=elsa-lancom-dsl10-ch01, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router #use=elsa-lancom-dsl10-ch01, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router
#use=elsa-lancom-dsl10-ch02, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router #use=elsa-lancom-dsl10-ch02, fw=10.0.0.254:80 # via ELSA LanCom DSL/10 DSL Router
#use=alcatel-stp, fw=10.0.0.138:80 # via Alcatel Speed Touch Pro #use=alcatel-stp, fw=10.0.0.138:80 # via Alcatel Speed Touch Pro
#use=xsense-aero, fw=192.168.1.1:80 # via Xsense Aero Router #use=xsense-aero, fw=192.168.1.1:80 # via Xsense Aero Router
#use=allnet-1298, fw=192.168.1.1:80 # via AllNet 1298 DSL Router #use=allnet-1298, fw=192.168.1.1:80 # via AllNet 1298 DSL Router
#use=3com-oc-remote812, fw=192.168.0.254:80 # via 3com OfficeConnect Remote 812 #use=3com-oc-remote812, fw=192.168.0.254:80 # via 3com OfficeConnect Remote 812
#use=e-tech, fw=192.168.1.1:80 # via E-tech Router #use=e-tech, fw=192.168.1.1:80 # via E-tech Router
#use=cayman-3220h, fw=192.168.0.1:1080 # via Cayman 3220-H DSL Router #use=cayman-3220h, fw=192.168.0.1:1080 # via Cayman 3220-H DSL Router
# #
#fw-login=admin, fw-password=XXXXXX # FW login and password #fw-login=admin, fw-password=XXXXXX # FW login and password
# #
## To obtain an IP address from FW status page (using fw-login, fw-password) ## To obtain an IP address from FW status page (using fw-login, fw-password)
#use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' # found after IP Address #use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' # found after IP Address
@ -57,55 +57,55 @@ pid=@runstatedir@/ddclient.pid # record PID in file.
## get banned from their service. ## get banned from their service.
#use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address #use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address
# #
#use=ip, ip=127.0.0.1 # via static IP's #use=ip, ip=127.0.0.1 # via static IP's
#use=if, if=eth0 # via interfaces #use=if, if=eth0 # via interfaces
#use=web # via web #use=web # via web
# #
#protocol=dyndns2 # default protocol #protocol=dyndns2 # default protocol
#proxy=fasthttp.sympatico.ca:80 # default proxy #proxy=fasthttp.sympatico.ca:80 # default proxy
#server=members.dyndns.org # default server #server=members.dyndns.org # default server
#server=members.dyndns.org:8245 # default server (bypassing proxies) #server=members.dyndns.org:8245 # default server (bypassing proxies)
#login=your-login # default login #login=your-login # default login
#password=test # default password #password=test # default password
#mx=mx.for.your.host # default MX #mx=mx.for.your.host # default MX
#backupmx=yes|no # host is primary MX? #backupmx=yes|no # host is primary MX?
#wildcard=yes|no # add wildcard CNAME? #wildcard=yes|no # add wildcard CNAME?
## ##
## dyndns.org dynamic addresses ## dyndns.org dynamic addresses
## ##
## (supports variables: wildcard,mx,backupmx) ## (supports variables: wildcard,mx,backupmx)
## ##
# server=members.dyndns.org, \ # server=members.dyndns.org, \
# protocol=dyndns2 \ # protocol=dyndns2 \
# your-dynamic-host.dyndns.org # your-dynamic-host.dyndns.org
## ##
## ZoneEdit (zoneedit.com) ## ZoneEdit (zoneedit.com)
## ##
# server=dynamic.zoneedit.com, \ # server=dynamic.zoneedit.com, \
# protocol=zoneedit1, \ # protocol=zoneedit1, \
# login=your-zoneedit-login, \ # login=your-zoneedit-login, \
# password=your-zoneedit-password \ # password=your-zoneedit-password \
# your.any.domain,your-2nd.any.dom # your.any.domain,your-2nd.any.dom
## ##
## EasyDNS (easydns.com) ## EasyDNS (easydns.com)
## ##
# server=members.easydns.com, \ # server=members.easydns.com, \
# protocol=easydns, \ # protocol=easydns, \
# login=your-easydns-login, \ # login=your-easydns-login, \
# password=your-easydns-password \ # password=your-easydns-password \
# your.any.domain,your-2nd.any.domain # your.any.domain,your-2nd.any.domain
## ##
## dslreports.com dynamic-host monitoring ## dslreports.com dynamic-host monitoring
## ##
# server=members.dslreports.com \ # server=members.dslreports.com \
# protocol=dslreports1, \ # protocol=dslreports1, \
# login=dslreports-login, \ # login=dslreports-login, \
# password=dslreports-password \ # password=dslreports-password \
# dslreports-unique-id # dslreports-unique-id
## ##
@ -113,16 +113,16 @@ pid=@runstatedir@/ddclient.pid # record PID in file.
## ##
# use=web, web=members.orgdns.org/nic/ip # use=web, web=members.orgdns.org/nic/ip
# protocol=dyndns2 # protocol=dyndns2
# server=www.orgdns.org \ # server=www.orgdns.org \
# login=yourLoginName \ # login=yourLoginName \
# password=yourPassword \ # password=yourPassword \
# yourSubdomain.orgdns.org # yourSubdomain.orgdns.org
## ##
## NameCheap (namecheap.com) ## NameCheap (namecheap.com)
## ##
# protocol=namecheap, \ # protocol=namecheap, \
# server=dynamicdns.park-your-domain.com, \ # server=dynamicdns.park-your-domain.com, \
# login=example.com, \ # login=example.com, \
# password=example.com-password \ # password=example.com-password \
# subdomain.example.com # subdomain.example.com
@ -169,12 +169,12 @@ pid=@runstatedir@/ddclient.pid # record PID in file.
## ##
## CloudFlare (www.cloudflare.com) ## CloudFlare (www.cloudflare.com)
## ##
#protocol=cloudflare, \ # protocol=cloudflare, \
#zone=domain.tld, \ # zone=domain.tld, \
#ttl=1, \ # ttl=1, \
#login=your-login-email, \ # Only needed if you are using your global API key. If you are using an API token, set it to "token" (without double quotes). # login=your-login-email, \ # Only needed if you are using your global API key. If you are using an API token, set it to "token" (without double quotes).
#password=APIKey \ # This is either your global API key, or an API token. If you are using an API token, it must have the permissions "Zone - DNS - Edit" and "Zone - Zone - Read". The Zone resources must be "Include - All zones". # password=APIKey \ # This is either your global API key, or an API token. If you are using an API token, it must have the permissions "Zone - DNS - Edit" and "Zone - Zone - Read". The Zone resources must be "Include - All zones".
#domain.tld,my.domain.tld # domain.tld,my.domain.tld
## ##
## Gandi (gandi.net) ## Gandi (gandi.net)
@ -244,23 +244,23 @@ pid=@runstatedir@/ddclient.pid # record PID in file.
## ##
## nsupdate.info IPV4(https://www.nsupdate.info) ## nsupdate.info IPV4(https://www.nsupdate.info)
## ##
#use=web, web=http://ipv4.nsupdate.info/myip # use=web, web=http://ipv4.nsupdate.info/myip
#protocol=dyndns2 # protocol=dyndns2
#server=ipv4.nsupdate.info # server=ipv4.nsupdate.info
#login=domain.nsupdate.info # login=domain.nsupdate.info
#password='123' # password='123'
#domain.nsupdate.info # domain.nsupdate.info
## ##
## nsupdate.info IPV6 (https://www.nsupdate.info) ## nsupdate.info IPV6 (https://www.nsupdate.info)
## ddclient releases <= 3.8.1 do not support IPv6 ## ddclient releases <= 3.8.1 do not support IPv6
## ##
#usev6=if, if=eth0 # usev6=if, if=eth0
#protocol=dyndns2 # protocol=dyndns2
#server=ipv6.nsupdate.info # server=ipv6.nsupdate.info
#login=domain.nsupdate.info # login=domain.nsupdate.info
#password='123' # password='123'
#domain.nsupdate.info # domain.nsupdate.info
## ##
## Yandex.Mail for Domain (domain.yandex.com) ## Yandex.Mail for Domain (domain.yandex.com)
@ -314,17 +314,17 @@ pid=@runstatedir@/ddclient.pid # record PID in file.
## ##
## dnsexit (www.dnsexit.com) ## dnsexit (www.dnsexit.com)
## ##
#protocol=dnsexit, \ # protocol=dnsexit, \
#login=myusername, \ # login=myusername, \
#password=mypassword, \ # password=mypassword, \
#subdomain-1.domain.com,subdomain-2.domain.com # subdomain-1.domain.com,subdomain-2.domain.com
## ##
## dnsexit2 (API method www.dnsexit.com) ## dnsexit2 (API method www.dnsexit.com)
## ##
#protocol=dnsexit2 # protocol=dnsexit2
#password=MyAPIKey # password=MyAPIKey
#subdomain-1.domain.com,subdomain-2.domain.com # subdomain-1.domain.com,subdomain-2.domain.com
## ##
## domeneshop (www.domeneshop.no) ## domeneshop (www.domeneshop.no)
@ -360,10 +360,10 @@ pid=@runstatedir@/ddclient.pid # record PID in file.
## ##
## DigitalOcean (www.digitalocean.com) ## DigitalOcean (www.digitalocean.com)
## ##
#protocol=digitalocean, \ # protocol=digitalocean, \
#zone=example.com, \ # zone=example.com, \
#password=api-token \ # password=api-token \
#example.com,sub.example.com # example.com,sub.example.com
## ##
## Infomaniak (www.infomaniak.com) ## Infomaniak (www.infomaniak.com)

View file

@ -1838,6 +1838,7 @@ sub _read_config {
return $content; return $content;
} }
###################################################################### ######################################################################
## init_config - ## init_config -
###################################################################### ######################################################################
@ -2020,18 +2021,13 @@ sub init_config {
sub process_args { sub process_args {
my @spec = (); my @spec = ();
my $usage = ""; my $usage = "";
for (@_) { for (@_) {
if (ref $_) { if (ref $_) {
my ($key, $specifier, $arg_usage) = @$_; my ($key, $specifier, $arg_usage) = @$_;
my $value = default($key); my $value = default($key);
push @spec, $key . $specifier; push @spec, $key . $specifier;
$opt{$key} //= undef; $opt{$key} //= undef;
next unless $arg_usage; next unless $arg_usage;
$usage .= " $arg_usage"; $usage .= " $arg_usage";
if (defined($value) && $value ne '') { if (defined($value) && $value ne '') {
$usage .= " (default: "; $usage .= " (default: ";
@ -3011,7 +3007,7 @@ sub get_default_interface {
my @list = split(/\n/, $reply); my @list = split(/\n/, $reply);
@list = grep(/^default|^(?:0\.){3}0|^::\/0/, @list); # Select 'default' or '0.0.0.0' or '::/0' @list = grep(/^default|^(?:0\.){3}0|^::\/0/, @list); # Select 'default' or '0.0.0.0' or '::/0'
return undef if (scalar(@list) == 0); return undef if (scalar(@list) == 0);
debug("Default routes found for IPv%s :\n%s", $ipver, join("\n",@list)); debug("Default routes found for IPv%s:\n%s", $ipver, join("\n", @list));
# now check each interface to make sure it is global (not loopback). # now check each interface to make sure it is global (not loopback).
for my $line (@list) { for my $line (@list) {