--- rpms/smeserver-ddclient/contribs10/smeserver-ddclient-1.3.0-Update-SM2-code-for-new-services-and-protocols.patch 2023/12/04 08:48:10 1.2 +++ rpms/smeserver-ddclient/contribs10/smeserver-ddclient-1.3.0-Update-SM2-code-for-new-services-and-protocols.patch 2023/12/18 13:53:48 1.10 @@ -1,25 +1,91 @@ +diff -urN smeserver-ddclient-1.3.0.old/createlinks smeserver-ddclient-1.3.0/createlinks +--- smeserver-ddclient-1.3.0.old/createlinks 2023-11-10 16:11:05.855271810 +0000 ++++ smeserver-ddclient-1.3.0/createlinks 2023-12-18 10:52:53.495714627 +0000 +@@ -48,3 +48,6 @@ + $event = 'post-upgrade'; + templates2events("/etc/ddclient/ddclient.conf", $event); + templates2events("/etc/ppp/ip-up.local", $event); ++ ++# and create an empty cache ++# safe_touch("/var/cache/ddclient/ddclient.cache") +diff -urN smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/10Headers smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/10Headers +--- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/10Headers 2023-11-10 16:11:05.911271972 +0000 ++++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/10Headers 2023-12-14 11:40:00.000000000 +0000 +@@ -52,15 +52,16 @@ + } elsif ( $method eq 'ip') { + # we want to force manually + $OUT.="usev4=ipv4, ipv4=$ForceIP \n"; +- } elsif ( $method eq 'cmd') { +- $OUT .="usev4=cmd, cmdv4='$cmd'\n"; ++ } elsif ( $method eq 'cmdv4') { ++ $OUT .="usev4=cmdv4, cmdv4='$cmd'\n"; + } else { + # fw method + my $fwaddress = $ddclient{'fwaddress'}||''; ++ my $fwdevice = $ddclient{'Extinterface'}||''; + my $fwlogin = $ddclient{'fwlogin'}||''; + my $fwpassword = $ddclient{'fwpassword'}||''; + my $fwskip = $ddclient{'fwskip'}||''; +- $OUT .= "usev4=$method, fwv4=$fwaddress"; ++ $OUT .= "usev4=$fwdevice, fwv4=$fwaddress"; + $OUT .= ", fw-login=$fwlogin " if ( $fwlogin ne '' ); + $OUT .= ", fw-password=$fwpassword " if ( $fwpassword ne '' ); + $OUT .= ", fwv4-skip='$fwskip' " if ( $fwskip ne '' ); +diff -urN smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts +--- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts 2023-11-10 16:11:05.913271977 +0000 ++++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/30FreeHosts 2023-12-18 13:45:00.000000000 +0000 +@@ -93,5 +93,9 @@ + } + } + } ++ my $file = '/var/cache/ddclient/ddclient.cache'; ++ # Execute the shell command to clear the file ++ system("rm -f '' > $file"); ++ + } + +diff -urN smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ddclient.service.d/50koozali.conf/20Service smeserver-ddclient-1.3.0/root/etc/e-smith/templates/usr/lib/systemd/system/ddclient.service.d/50koozali.conf/20Service +--- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/ddclient.service.d/50koozali.conf/20Service 2023-11-10 16:11:05.857271816 +0000 ++++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates/usr/lib/systemd/system/ddclient.service.d/50koozali.conf/20Service 2023-12-16 10:40:00.000000000 +0000 +@@ -1,7 +1,7 @@ + { + $debug = (($ddclient{'debug'} eq 'enabled') ? "debug" : "nodebug"); + $verbose = (($ddclient{'verbose'} eq 'enabled') ? "verbose" : "noverbose"); +-$quiet = (($ddclient{'quiet'} eq 'enabled') ? "quiet" : "noquiet"); ++$quiet = (($ddclient{'quiet'} eq 'disabled') ? "noquiet" : "quiet"); + $syslog = (($ddclient{'syslog'} eq "enabled") ? "syslog" : "nosyslog"); + $OUT .= "\n"; + $OUT .= "[Service]\n"; +diff -urN smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates.metadata/etc/ddclient/ddclient.conf smeserver-ddclient-1.3.0/root/etc/e-smith/templates.metadata/etc/ddclient/ddclient.conf +--- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates.metadata/etc/ddclient/ddclient.conf 2023-11-10 16:11:05.785271609 +0000 ++++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates.metadata/etc/ddclient/ddclient.conf 2023-12-15 11:54:47.841967164 +0000 +@@ -1,3 +1,3 @@ + UID="ddclient" + GID="ddclient" +-PERMS=0644 ++PERMS=0600 diff -urN smeserver-ddclient-1.3.0.old/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm --- smeserver-ddclient-1.3.0.old/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm 2023-11-10 16:11:05.915271983 +0000 -+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm 2023-12-01 17:16:00.000000000 +0000 -@@ -114,57 +114,168 @@ ++++ smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm 2023-12-14 11:33:00.000000000 +0000 +@@ -114,90 +114,164 @@ my %ddc_datas = (); +sub get_devices_names { + # -+ # Router devices from which it can get ip address ++ # Router/Firewall devices from which it can get ip address + # + my $devices = ( [ -+ [ '2wire' => '2Wire 1701HG Gateway' ], -+ [ '3com-3c886a' => '3com 3c886a 56k Lan Modem' ], -+ [ '3com-oc-remote812' => '3com OfficeConnect Remote 812' ], -+ [ 'alcatel-510' => 'Alcatel Speed Touch 510' ], -+ [ 'alcatel-530' => 'Alcatel/Thomson SpeedTouch 530' ], -+ [ 'alcatel-stp' => 'Alcatel Speed Touch Pro' ], -+ [ 'allnet-1298' => 'Allnet 1298' ], -+ [ 'cayman-3220h' => 'Cayman 3220-H DSL' ], -+ [ 'dlink-524' => 'D-Link DI-524' ], -+ [ 'dlink-604' => 'D-Link DI-604' ], ++ [ '2Wire 1701HG Gateway' => '2wire' ], ++ [ '3com 3c886a 56k Lan Modem' => '3com-3c886a' ], ++ [ '3com OfficeConnect Remote 812' => '3com-oc-remote812' ], ++ [ 'Alcatel Speed Touch 510' => 'alcatel-510' ], ++ [ 'Alcatel/Thomson SpeedTouch 530' => 'alcatel-530' ], ++ [ 'Alcatel Speed Touch Pro' => 'alcatel-stp' ], ++ [ 'Allnet 1298' => 'allnet-1298' ], ++ [ 'Cayman 3220-H DSL' => 'cayman-3220h' ], ++ [ 'D-Link DI-524' => 'dlink-524' ], ++ [ 'D-Link DI-604' => 'dlink-604' ], + [ 'dlink-614' => 'D-Link DI-614+' ], + [ 'e-tech' => 'E-tech Router' ], + [ 'elsa-lancom-dsl10' => 'ELSA LanCom DSL/10 DSL FW' ], @@ -56,7 +122,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r + [ 'watchguard-edge-x' => 'Watchguard Edge X FW' ], + [ 'watchguard-soho' => 'Watchguard SOHO FW' ], + [ 'westell-6100' => 'Westell C90-610015-06 DSL Router' ], -+ [ 'xsense-aero' => 'Xsense Aero'] ++ [ 'xsense-aero' => 'Xsense Aero' ] + ] ); + return $devices; + @@ -77,21 +143,21 @@ diff -urN smeserver-ddclient-1.3.0.old/r + # Web Services from which it can get ip address + # + my $webservices = ( [ -+ [ 'dyndnshttp://checkip.dyndns.org/' => 'dyndns' ], -+ [ 'freednshttps://freedns.afraid.org/dynamic/check.php' => 'freedns' ], -+ [ 'googledomainshttps://domains.google.com/checkip' => 'googledomains' ], -+ [ 'hehttps://checkip.dns.he.net/' => 'he' ], -+ [ 'ip4only.mehttps://ip4only.me/api/' => 'ip4only.me' ], -+ [ 'ip6only.mehttps://ip6only.me/api/' => 'ip6only.me' ], -+ [ 'ipify-ipv4https://api.ipify.org/' => 'ipify-ipv4' ], -+ [ 'ipify-ipv6https://api6.ipify.org/' => 'ipify-ipv6' ], -+ [ 'loopiahttps://dns.loopia.se/checkip/checkip.php' => 'loopia' ], -+ [ 'myonlineportalhttps://myonlineportal.net/checkip' => 'myonlineportal' ], -+ [ 'noip-ipv4http://ip1.dynupdate.no-ip.com/' => 'noip-ipv4' ], -+ [ 'noip-ipv6http://ip1.dynupdate6.no-ip.com/' => 'noip-ipv6' ], -+ [ 'nsupdate.info-ipv4https://ipv4.nsupdate.info/myip' => 'nsupdate.info-ipv4' ], -+ [ 'nsupdate.info-ipv6https://ipv6.nsupdate.info/myip' => 'nsupdate.info-ipv6' ], -+ [ 'zoneedithttps://dynamic.zoneedit.com/checkip.html' => 'zoneedit' ] ++ [ 'dyndns-http://checkip.dyndns.org/' => 'dyndns' ], ++ [ 'freedns-https://freedns.afraid.org/dynamic/check.php' => 'freedns' ], ++ [ 'googledomains-https://domains.google.com/checkip' => 'googledomains' ], ++ [ 'he-https://checkip.dns.he.net/' => 'he' ], ++ [ 'ip4only.me-https://ip4only.me/api/' => 'ip4only.me' ], ++ [ 'ip6only.me-https://ip6only.me/api/' => 'ip6only.me' ], ++ [ 'ipify-ipv4-https://api.ipify.org/' => 'ipify-ipv4' ], ++ [ 'ipify-ipv6-https://api6.ipify.org/' => 'ipify-ipv6' ], ++ [ 'loopia:-https://dns.loopia.se/checkip/checkip.php' => 'loopia' ], ++ [ 'myonlineportal-https://myonlineportal.net/checkip' => 'myonlineportal' ], ++ [ 'noip-ipv4-http://ip1.dynupdate.no-ip.com/' => 'noip-ipv4' ], ++ [ 'noip-ipv6-http://ip1.dynupdate6.no-ip.com/' => 'noip-ipv6' ], ++ [ 'nsupdate.info-ipv4-https://ipv4.nsupdate.info/myip' => 'nsupdate.info-ipv4' ], ++ [ 'nsupdate.info-ipv6-https://ipv6.nsupdate.info/myip' => 'nsupdate.info-ipv6' ], ++ [ 'zoneedit-https://dynamic.zoneedit.com/checkip.html' => 'zoneedit' ] + ] ); + return $webservices + @@ -114,47 +180,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r # my $c = shift; - my $Labels = ( -+ my $dnsservices = ( [ -+ [ $c->l('1984') => '1984' ], -+ [ $c->l('changeip') => 'changeip' ], -+ [ $c->l('cloudflare') => 'cloudflare' ], -+ [ $c->l('cloudns') => 'cloudns' ], -+ [ $c->l('digitalocean') => 'digitalocean' ], -+ [ $c->l('dinahosting') => 'dinahosting' ], -+ [ $c->l('dnsexit') => 'dnsexit' ], -+ [ $c->l('dnsmadeeasy') => 'dnsmadeeasy' ], -+ [ $c->l('domeneshop') => 'domeneshop' ], -+ [ $c->l('dondominio') => 'dondominio' ], -+ [ $c->l('dslreports') => 'dslreports' ], -+ [ $c->l('duckdns') => 'duckdns' ], -+ [ $c->l('dyndns1') => 'dyndns1' ], -+ [ $c->l('dyndns2') => 'dyndns2' ], -+ [ $c->l('easydns') => 'easydns' ], -+ [ $c->l('enom') => 'enom' ], -+ [ $c->l('freedns') => 'freedns' ], -+ [ $c->l('freemyip') => 'freemyip' ], -+ [ $c->l('gandi') => 'gandi' ], -+ [ $c->l('godaddy') => 'godaddy' ], -+ [ $c->l('googledomains') => 'googledomains' ], -+ [ $c->l('hetzner') => 'hetzner' ], -+ [ $c->l('infomaniak') => 'infomaniak' ], -+ [ $c->l('keysystems') => 'keysystems' ], -+ [ $c->l('mythicdyn') => 'mythicdyn' ], -+ [ $c->l('namecheap') => 'namecheap' ], -+ [ $c->l('nfsn') => 'nfsn' ], -+ [ $c->l('njalla') => 'njalla' ], -+ [ $c->l('noip') => 'noip' ], -+ [ $c->l('nsupdate') => 'nsupdate' ], -+ [ $c->l('ovh') => 'ovh' ], -+ [ $c->l('porkbun') => 'porkbun' ], -+ [ $c->l('regfishde') => 'regfishde' ], -+ [ $c->l('sitelutions') => 'sitelutions' ], -+ [ $c->l('woima') => 'woima' ], -+ [ $c->l('yandex') => 'yandex' ], -+ [ $c->l('zoneedit') => 'zoneedit' ] -+ ] ); -+ return $dnsservices; - +- - # v3.11.1 labels - [ - [$c->l('1984') '1984'], @@ -196,9 +222,82 @@ diff -urN smeserver-ddclient-1.3.0.old/r - [$c->l('zoneedit1') 'zoneedit1'] - ] - # end of v3.11.1 labels -- ++ my $dnsservices = ( [ ++ [ $c->l('1984') => '1984' ], ++ [ $c->l('changeip') => 'changeip' ], ++ [ $c->l('cloudflare') => 'cloudflare' ], ++ [ $c->l('cloudns') => 'cloudns' ], ++ [ $c->l('digitalocean') => 'digitalocean' ], ++ [ $c->l('dinahosting') => 'dinahosting' ], ++ [ $c->l('dnsexit') => 'dnsexit' ], ++ [ $c->l('dnsmadeeasy') => 'dnsmadeeasy' ], ++ [ $c->l('domeneshop') => 'domeneshop' ], ++ [ $c->l('dondominio') => 'dondominio' ], ++ [ $c->l('dslreports') => 'dslreports' ], ++ [ $c->l('duckdns') => 'duckdns' ], ++ [ $c->l('dyndns1') => 'dyndns1' ], ++ [ $c->l('dyndns2') => 'dyndns2' ], ++ [ $c->l('easydns') => 'easydns' ], ++ [ $c->l('enom') => 'enom' ], ++ [ $c->l('freedns') => 'freedns' ], ++ [ $c->l('freemyip') => 'freemyip' ], ++ [ $c->l('gandi') => 'gandi' ], ++ [ $c->l('godaddy') => 'godaddy' ], ++ [ $c->l('googledomains') => 'googledomains' ], ++ [ $c->l('hetzner') => 'hetzner' ], ++ [ $c->l('infomaniak') => 'infomaniak' ], ++ [ $c->l('keysystems') => 'keysystems' ], ++ [ $c->l('mythicdyn') => 'mythicdyn' ], ++ [ $c->l('namecheap') => 'namecheap' ], ++ [ $c->l('nfsn') => 'nfsn' ], ++ [ $c->l('njalla') => 'njalla' ], ++ [ $c->l('noip') => 'noip' ], ++ [ $c->l('nsupdate') => 'nsupdate' ], ++ [ $c->l('ovh') => 'ovh' ], ++ [ $c->l('porkbun') => 'porkbun' ], ++ [ $c->l('regfishde') => 'regfishde' ], ++ [ $c->l('sitelutions') => 'sitelutions' ], ++ [ $c->l('woima') => 'woima' ], ++ [ $c->l('yandex') => 'yandex' ], ++ [ $c->l('zoneedit') => 'zoneedit' ] ++ ] ); ++ return $dnsservices; + - - #[ [ $c->l('CUSTOMDNS'), 'CUSTOMDNS' ], +- #[ $c->l('DYNDNS1'), 'DYNDNS1' ], +- #[ $c->l('DYNDNS2'), 'DYNDNS2' ], +- #[ $c->l('DYNDNS3'), 'DYNDNS3' ], +- #[ $c->l('ZONEDIT'), 'ZONEDIT' ], +- #[ $c->l('EASYDNS'), 'EASYDNS' ], +- #[ $c->l('HAMMER'), 'HAMMER' ], +- #[ $c->l('DSLREPORTS'), 'DSLREPORTS' ], +- #[ $c->l('EURODYNDNS'), 'EURODYNDNS' ], +- #[ $c->l('DTDNS'), 'DTDNS' ], +- #[ $c->l('LOOPIA'), 'LOOPIA' ], +- #[ $c->l('DNSPARK'), 'DNSPARK' ], +- #[ $c->l('DYNHOST'), 'DYNHOST' ], +- #[ $c->l('NOIP'), 'NOIP' ], +- #[ $c->l('CHANGEIP'), 'CHANGEIP' ], +- #[ $c->l('NAMECHEAP'), 'NAMECHEAP' ], +- #[ $c->l('SPDNS'), 'SPDNS' ], +- #[ $c->l('SITELUTIONS'), 'SITELUTIONS' ], +- #[ $c->l('FREEDNS'), 'FREEDNS' ], +- #[ $c->l('NSUPDATE'), 'NSUPDATE' ], +- #[ $c->l('CLOUDFLARE'), 'CLOUDFLARE' ], +- #[ $c->l('GOOGLEDOMAINS'), 'GOOGLEDOMAINS' ], +- #[ $c->l('DUCKDNS'), 'DUCKDNS' ], +- #[ $c->l('FREEMYIP'), 'FREEMYIP' ], +- #[ $c->l('WOIMA'), 'WOIMA' ], +- #[ $c->l('YANDEX'), 'YANDEX' ], +- #[ $c->l('DNSMADEEASY'), 'DNSMADEEASY' ], +- #[ $c->l('DONDOMINIO'), 'DONDOMINIO' ], +- #[ $c->l('NEARLYFREESPEECH'), 'NFSN' ], +- #[ $c->l('OVH'), 'OVH' ], +- #[ $c->l('CLOUDNS'), 'CLOUDNS' ] +- #] +- ); +- return $Labels; + #my $output = `ddclient -list-protocols`; # Run ddclient command and capture the output + #my @protocols; + #foreach my $line (split /\n/, $output) { @@ -208,24 +307,10 @@ diff -urN smeserver-ddclient-1.3.0.old/r + #push @protocols, [$custom_value, $protocol]; + #} + #return \@protocols; # Return a reference to the protocols array -+} -+ -+# Pre 3.11.1 dns services -+ #[ [ $c->l('CUSTOMDNS'), 'CUSTOMDNS' ], - #[ $c->l('DYNDNS1'), 'DYNDNS1' ], - #[ $c->l('DYNDNS2'), 'DYNDNS2' ], - #[ $c->l('DYNDNS3'), 'DYNDNS3' ], -@@ -196,9 +307,6 @@ - #[ $c->l('OVH'), 'OVH' ], - #[ $c->l('CLOUDNS'), 'CLOUDNS' ] - #] -- ); -- return $Labels; --} + } sub main { - # -@@ -230,13 +338,15 @@ +@@ -230,13 +304,15 @@ my $emptycust = ( scalar @FreeDomains == 0 ); my $Labels = ( @@ -240,15 +325,15 @@ diff -urN smeserver-ddclient-1.3.0.old/r + [ $c->l('SME external Interface') => "smeIF" ], + [ $c->l('SME configuration DB') => 'smeCMD' ], + [ $c->l('web') => 'web' ], -+ [ $c->l('router') => 'router' ], ++ [ $c->l('Router/Firewall') => 'router' ], + [ $c->l('Interface') => 'if' ], + [ $c->l('IP') => 'ip' ], -+ [ $c->l('Command') => 'cmd' ] ++ [ $c->l('Command') => 'cmdv4' ] + ] ); $c->stash( -@@ -246,6 +356,9 @@ +@@ -246,6 +322,9 @@ domains => \@domains, freedomains => \@FreeDomains, methodlabels => $Labels, @@ -258,7 +343,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r emptydom => $emptydom, emptycust => $emptycust ); -@@ -260,6 +373,7 @@ +@@ -260,6 +339,7 @@ # Called to update the parameters relating to the Ip address of the server # my $c = shift; @@ -266,7 +351,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $ddc_datas{"success"} = pushParams($c); do_display($c); } -@@ -269,6 +383,7 @@ +@@ -269,6 +349,7 @@ #Called to update/delete the ddclient for a specific inbuilt domain # my $c = shift; @@ -274,7 +359,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r my $retmsg; if ( $c->param("Route") eq "ddclient2" ) { #Route is hidden field $retmsg = performModifyCustom($c); -@@ -276,10 +391,11 @@ +@@ -276,10 +357,11 @@ else { $retmsg = performModifyDomain($c); } @@ -287,7 +372,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $c->l( '' . $dns ) ); do_display( $c, %ddc_datas ); } -@@ -296,7 +412,7 @@ +@@ -296,7 +378,7 @@ # Create custom domain # my $c = shift; @@ -296,7 +381,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r my $modul = ''; my $trt = "NEW"; -@@ -305,18 +421,21 @@ +@@ -305,18 +387,21 @@ title => $title, modul => $modul, ddc_datas => \%ddc_datas, @@ -320,7 +405,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $c->l( '' . $dns ) ); do_display( $c, %ddc_datas ); } -@@ -334,7 +453,7 @@ +@@ -334,7 +419,7 @@ # Display delete or modify panel for custom domain # my $c = shift; @@ -329,7 +414,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r my $modul = ''; my $trt = $c->param("trt"); -@@ -349,7 +468,9 @@ +@@ -349,7 +434,9 @@ title => $title, modul => $modul, ddc_datas => \%ddc_datas, @@ -340,7 +425,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r ); $c->render( template => 'ddclient' ); } -@@ -360,21 +481,23 @@ +@@ -360,21 +447,23 @@ # param trt = MOD or DEL # my $c = shift; @@ -367,7 +452,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r ); $c->render( template => 'ddclient' ); } -@@ -386,10 +509,11 @@ +@@ -386,10 +475,11 @@ # my $c = shift; my $route = $c->current_route; @@ -380,7 +465,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r #Delete it and return to front summary panel - depends on route domain or custom if ( $c->param("Route") eq "ddclient2" ) { #Route is hidden field -@@ -400,7 +524,7 @@ +@@ -400,7 +490,7 @@ } if ( $retmsg eq "ok" ) { @@ -389,7 +474,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $c->l( '' . $c->param("dns") ) ); } else { $ddc_datas{"error"} = $retmsg; } -@@ -415,15 +539,16 @@ +@@ -415,15 +505,16 @@ # my $c = shift; my $route = $c->current_route; @@ -408,16 +493,77 @@ diff -urN smeserver-ddclient-1.3.0.old/r } else { $ddc_datas{"error"} = $retmsg; } do_display( $c, %ddc_datas ); -@@ -588,6 +713,8 @@ +@@ -450,7 +541,7 @@ + + foreach $domain ( sort @virtualDomains ) { + my %properties = $domaindb->get($domain)->props; +- my $test = $domaindb->get_prop( $domain, "dns" ) || ''; ++ my $test = $domaindb->get($domain) || ''; + my %extraprops; + if ( $test ne '' ) { + %extraprops = $domaindb->get($domain)->props; +@@ -567,6 +658,8 @@ + my $Extinterface = $ddretrieve->prop('Extinterface') || ''; + my $cmd = $ddretrieve->prop('cmd') || ''; + my $forceIP = $ddretrieve->prop('ForceIP') || ''; ++ my $fwlogin = $ddretrieve->prop('fwlogin') || ''; ++ my $fwpassword = $ddretrieve->prop('fwpassword') || ''; + my $res = { + "ssl" => $ssl, + "DeamonUpdate" => $DeamonUpdate, +@@ -574,29 +667,43 @@ + "Extinterface" => $Extinterface, + "cmd" => $cmd, + "ForceIP" => $forceIP, +- "urlcheckip" => $urlcheckip ++ "urlcheckip" => $urlcheckip, ++ "FWlogin" => $fwlogin, ++ "FWpassword" => $fwpassword + }; + return $res; + } + + sub pushParams { + my $c = shift; +- my $DeamonUpdate = $c->param('retrievedeamonupdate'); +- my $urlcheckip = $c->param('retrieveurlcheckip'); +- my $ssl = $c->param('retrievessl'); ++ my $retrievedeamonupdate = $c->param('retrievedeamonupdate'); ++ my $retrieverouter = $c->param('retrieverouter'); ++ my $retrievewebservice = $c->param('retrievewebservice'); ++ my $retrieveurlcheckip = $c->param('retrieveurlcheckip'); ++ my $retrievessl = $c->param('retrievessl'); + my $retrievemethod = $c->param('retrievemethod'); my $retrieveinterface = $c->param('retrieveinterface'); my $retrievecmd = $c->param('retrievecmd'); my $retrieveip = $c->param('retrieveip'); ++ my $retrievefwlogin = $c->param('retrieverouterlogin'); ++ my $retrievefwpassword = $c->param('retrieverouterpassword'); + + #print 1 / 0; #Crash my $ddclient = $db->get('ddclient'); - $ddclient->set_prop( 'urlcheckip' => $urlcheckip ); -@@ -616,7 +743,7 @@ +- $ddclient->set_prop( 'urlcheckip' => $urlcheckip ); +- $ddclient->set_prop( 'DeamonUpdate' => $DeamonUpdate ); +- $ddclient->set_prop( 'SSL' => $ssl ); ++ $ddclient->set_prop( 'urlcheckip' => $retrievewebservice || $retrieveurlcheckip ); ++ $ddclient->set_prop( 'DeamonUpdate' => $retrievedeamonupdate ); ++ $ddclient->set_prop( 'SSL' => $retrievessl ); + $ddclient->set_prop( 'method' => $retrievemethod ); +- $ddclient->set_prop( 'Extinterface' => $retrieveinterface ); ++ if ($retrievemethod eq 'router') { ++ $ddclient->set_prop( 'Extinterface' => $retrieverouter ); ++ } else { ++ $ddclient->set_prop( 'Extinterface' => $retrieveinterface ); ++ } + $ddclient->set_prop( 'cmd' => $retrievecmd ); + $ddclient->set_prop( 'ForceIP' => $retrieveip ); ++ $ddclient->set_prop( 'fwlogin' => $retrievefwlogin ); ++ $ddclient->set_prop( 'fwpassword' => $retrievefwpassword ); + + $domaindb->reload(); + +@@ -616,7 +723,7 @@ #------------------------------------------------------------ my $domainName = $c->param('domainName'); @@ -426,7 +572,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainName = $1; } else { -@@ -624,7 +751,7 @@ +@@ -624,7 +731,7 @@ } my $domainLogin = $c->param('login'); @@ -435,7 +581,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainLogin = $1; } else { -@@ -632,7 +759,7 @@ +@@ -632,7 +739,7 @@ } my $domainPassword = $c->param('password'); @@ -444,7 +590,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainPassword = $1; } else { -@@ -646,7 +773,7 @@ +@@ -646,7 +753,7 @@ my $dns = $c->param('dns'); if ( $dns eq 'CUSTOMDNS' ) { @@ -453,7 +599,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $customDNS = $1; } else -@@ -685,7 +812,7 @@ +@@ -685,7 +792,7 @@ # Attempt to delete domain #------------------------------------------------------------ @@ -462,7 +608,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domain = $1; } else { -@@ -726,7 +853,7 @@ +@@ -726,7 +833,7 @@ #------------------------------------------------------------ my $domainName = $c->param('domainName'); @@ -471,7 +617,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainName = $1; } else { -@@ -749,7 +876,7 @@ +@@ -749,7 +856,7 @@ my $domainDesc = $c->param('desc'); my $domainLogin = $c->param('login'); @@ -480,7 +626,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainLogin = $1; } else { -@@ -757,7 +884,7 @@ +@@ -757,7 +864,7 @@ } my $domainPassword = $c->param('password'); @@ -489,7 +635,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainPassword = $1; } else { -@@ -771,7 +898,7 @@ +@@ -771,7 +878,7 @@ my $dns = $c->param('dns'); if ( $dns eq 'CUSTOMDNS' ) { @@ -498,7 +644,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $customDNS = $1; } else { -@@ -809,7 +936,7 @@ +@@ -809,7 +916,7 @@ #------------------------------------------------------------ my $domainName = $c->param('domainName'); @@ -507,7 +653,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainName = $1; } else { -@@ -817,7 +944,7 @@ +@@ -817,7 +924,7 @@ } my $domainLogin = $c->param('login'); @@ -516,7 +662,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainLogin = $1; } else { -@@ -825,7 +952,7 @@ +@@ -825,7 +932,7 @@ } my $domainPassword = $c->param('password'); @@ -525,7 +671,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $domainPassword = $1; } else { -@@ -839,7 +966,7 @@ +@@ -839,7 +946,7 @@ my $dns = $c->param('dns'); if ( $dns eq 'CUSTOMDNS' ) { @@ -534,7 +680,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r $customDNS = $1; } else -@@ -878,7 +1005,7 @@ +@@ -878,7 +985,7 @@ # Attempt to delete domain #------------------------------------------------------------ @@ -545,26 +691,96 @@ diff -urN smeserver-ddclient-1.3.0.old/r else { diff -urN smeserver-ddclient-1.3.0.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Ddclient/en.pm smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Ddclient/en.pm --- smeserver-ddclient-1.3.0.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Ddclient/en.pm 2023-11-10 16:11:05.916271986 +0000 -+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Ddclient/en.pm 2023-12-01 16:35:00.000000000 +0000 -@@ -80,7 +80,7 @@ ++++ smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Ddclient/en.pm 2023-12-18 09:29:00.000000000 +0000 +@@ -80,46 +80,48 @@ 'CLOUDNS'=>'CLOUDNS www.cloudns.net', # End of Service descriptions -# v3.11.1 Service descriptions: -+# v3.11.x Service descriptions: - "1984" => "https://kb.1984hosting.com/doku.php?id=freedns", - "changeip" => "https://changeip.com", - "cloudflare" => "https://cloudflare.com", -@@ -118,7 +118,7 @@ - "woima" => "http://woima.com", - "yandex" => "https://yandex.com", - "zoneedit" => "https://www.zoneedit.com/dynamic-dns/", +-"1984" => "https://kb.1984hosting.com/doku.php?id=freedns", +-"changeip" => "https://changeip.com", +-"cloudflare" => "https://cloudflare.com", +-"cloudns" => "https://cloudns.com", +-"digitalocean" => "https://digitalocean.com", +-"dinahosting" => "https://dinahosting.com", +-"dnsexit" => "https://dnsexit.com/", +-"dnsmadeeasy" => "https://dnsmadeeasy.com", +-"domeneshop" => "https://domeneshop.com", +-"dondominio" => "https://dondominio.com", +-"dslreports" => "https://www.dslreports.com/", +-"duckdns" => "https://duckdns.com", +-"dyndns1" => "https://account.dyn.com/", +-"dyndns2" => "https://account.dyn.com/", +-"easydns" => "https://easydns.com", +-"enom" => "https://enom.com", +-"freedns" => "http://freedns.com", +-"freemyip" => "https://freemyip.com", +-"gandi" => "https://gandi.com", +-"godaddy" => "https://godaddy.com", +-"googledomains" => "https://googledomains.com", +-"hetzner" => "https://hetzner.com", +-"infomaniak" => "https://infomaniak.com", +-"keysystems" => "https://keysystems.com", +-"mythicdyn" => "https://www.mythic-beasts.com/support/api/dnsv2/dynamic-dns", +-"namecheap" => "https://namecheap.com", +-"nfsn" => "http://nfsn.com", +-"njalla" => "https://njalla.com", +-"noip" => "https://noip.com", +-"nsupdate" => "http://nsupdate.com", +-"ovh" => "https://ovh.com", +-"porkbun" => "https://porkbun.com", +-"regfishde" => "regfishde", +-"sitelutions" => "https://sitelutions.com", +-"woima" => "http://woima.com", +-"yandex" => "https://yandex.com", +-"zoneedit" => "https://www.zoneedit.com/dynamic-dns/", -# end of v3.11.1 Service descriptions: ++# v3.11.x Service descriptions: ++"1984" => "1984-https://kb.1984hosting.com/doku.php?id=freedns", ++"changeip" => "changeip-https://changeip.com", ++"cloudflare" => "cloudflare-https://cloudflare.com", ++"cloudns" => "cloudns-https://cloudns.com", ++"digitalocean" => "digitalocean-https://digitalocean.com", ++"dinahosting" => "dinahosting-https://dinahosting.com", ++"dnsexit" => "dnsexit-https://dnsexit.com/", ++"dnsmadeeasy" => "dnsmadeeasy-https://dnsmadeeasy.com", ++"domeneshop" => "domeneshop-https://domeneshop.com", ++"dondominio" => "dondominio-https://dondominio.com", ++"dslreports" => "dslreports-https://www.dslreports.com/", ++"duckdns" => "duckdns-https://duckdns.com", ++"dyndns1" => "dyndns1-https://account.dyn.com/", ++"dyndns2" => "dyndns2-https://account.dyn.com/", ++"easydns" => "easydns-https://easydns.com", ++"enom" => "enom-https://enom.com", ++"freedns" => "freedns-http://freedns.com", ++"freemyip" => "freemyip-https://freemyip.com", ++"gandi" => "gandi-https://gandi.com", ++"godaddy" => "godaddy-https://godaddy.com", ++"googledomains" => "googledomains-https://googledomains.com", ++"hetzner" => "hetzner-https://hetzner.com", ++"infomaniak" => "infomaniak-https://infomaniak.com", ++"keysystems" => "keysystems-https://keysystems.com", ++"mythicdyn" => "mythicdyn-https://www.mythic-beasts.com/support/api/dnsv2/dynamic-dns", ++"namecheap" => "namecheap-https://namecheap.com", ++"nfsn" => "nfsn-http://nfsn.com", ++"njalla" => "njalla-https://njalla.com", ++"noip" => "noip-https://noip.com", ++"nsupdate" => "nsupdate-http://nsupdate.com", ++"ovh" => "ovh-https://ovh.com", ++"porkbun" => "porkbun-https://porkbun.com", ++"regfishde" => "regfishde-regfishde", ++"sitelutions" => "sitelutions-https://sitelutions.com", ++"woima" => "woima-http://woima.com", ++"yandex" => "yandex-https://yandex.com", ++"zoneedit" => "zoneedit-https://www.zoneedit.com/dynamic-dns/", +# end of v3.11.x Service descriptions: ++'MODIFY_DESCRIPTION' => "You can modify the Dynamic DNS Service that you use and change the username and password", ++'CREATE_DESCRIPTION' => "You can create a domain to use for the Dynamic DNS Service that you use and set or change the username and password", 'CUSTOMDNS' => 'Custom Dynamic DNS Provider', 'CUSTOMDNS_LABEL' => 'Custom server Address', -@@ -136,8 +136,8 @@ + 'CUSTOM_PROTOCOL_LABEL' => 'Custom ddclient Protocol', +@@ -136,8 +138,8 @@ 'DESCRIPTION_LABEL' => 'Domain description', 'SUCCESSFULLY_MODIFIED_RETRIEVE_IP' => 'You have successfully modified the retrieve IP options.', 'RETRIEVE_METHOD' => 'Method to retrieve new IP:', @@ -577,19 +793,105 @@ diff -urN smeserver-ddclient-1.3.0.old/r 'web' => 'Web query', diff -urN smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_create_cust.html.ep smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_create_cust.html.ep --- smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_create_cust.html.ep 2020-06-28 09:57:52.000000000 +0100 -+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_create_cust.html.ep 2023-11-15 16:10:00.000000000 +0000 -@@ -1,6 +1,6 @@ -
++++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_create_cust.html.ep 2023-12-18 09:35:00.000000000 +0000 +@@ -1,41 +1,43 @@ +-
++

- %= l 'ddc_CUSTOM_DESCRIPTION' -+ %= l 'CUSTOM_DESCRIPTION' ++ %= l 'CREATE_DESCRIPTION'


- % my $btn = l('ddc_APPLY'); +- % my $btn = l('ddc_APPLY'); ++ % my $btn = l('APPLY'); %= form_for '/ddclient7' => (method => 'POST') => begin + +- %=l 'ddc_DOMAIN_NAME_LABEL' ++ %=l 'DOMAIN_NAME_LABEL' + + %=text_field 'domainName' +
+ +- %=l 'ddc_DESCRIPTION_LABEL' ++ %=l 'DESCRIPTION_LABEL' + + %=text_field 'desc' +
+ +- %=l 'ddc_SERVERS_LABEL' ++ %=l 'SERVERS_LABEL' + + %=select_field dns=>$dnslabels +
++ + +- %=l 'ddc_NAME_LABEL' ++ %=l 'NAME_LABEL' + + %=text_field 'login' +
+ +- %=l 'ddc_PASSWORD_LABEL' ++ %=l 'PASSWORD_LABEL' + + %=password_field 'password',id=>"ddcPass" + %=label_for show=>"Show" +@@ -52,7 +54,7 @@ + % end +
+ +- %=l 'ddc_MX' ++ %=l 'MX' + + %=text_field 'mx' +
+diff -urN smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_del.html.ep smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_del.html.ep +--- smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_del.html.ep 2023-11-10 16:11:05.900271940 +0000 ++++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_del.html.ep 2023-12-18 11:14:00.000000000 +0000 +@@ -2,7 +2,7 @@ + % my $btn = l('REMOVE'); + %= form_for '/ddclient4' => (method => 'POST') => begin +

+- %= $c->render_to_string(inline =>l("ddc_REMOVE_DESCRIPTION",$ddc_datas->{"Domain_details"}->{"Domain"},$ddc_datas->{"Domain_details"}->{"Description"},$c->l($ddc_datas->{"Domain_details"}->{"Publication"}))) ++ %= $c->render_to_string(inline =>l("REMOVE_DESCRIPTION",$ddc_datas->{"Domain_details"}->{"Domain"},$ddc_datas->{"Domain_details"}->{"Description"},$c->l($ddc_datas->{"Domain_details"}->{"Publication"}))) +

+ % param Domain=>$ddc_datas->{"Domain_details"}->{"Domain"}; + %= hidden_field Domain=>$ddc_datas->{"Domain_details"}->{"Domain"} +diff -urN smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_domainlist.html.ep smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_domainlist.html.ep +--- smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_domainlist.html.ep 2023-11-10 16:11:05.900271940 +0000 ++++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_domainlist.html.ep 2023-12-18 11:46:00.000000000 +0000 +@@ -36,9 +36,12 @@ + %= t td => (class => 'sme-border') => $Domain->{"Publication"} + + "><%=l 'MODIFY'%> +- +- "><%=l 'REMOVE'%> +- ++ ++ % if ($Domain->{"Publication"} ne ""){ ++ ++ "><%=l 'REMOVE'%> ++ ++ % } + + %} + diff -urN smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_modify_domain.html.ep smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_modify_domain.html.ep --- smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_modify_domain.html.ep 2023-11-10 16:11:05.901271943 +0000 -+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_modify_domain.html.ep 2023-11-18 14:56:00.000000000 +0000 -@@ -1,4 +1,9 @@ ++++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_modify_domain.html.ep 2023-12-18 11:13:00.000000000 +0000 +@@ -1,6 +1,11 @@
+

- %= l 'CUSTOM_DESCRIPTION' +- %= l 'CUSTOM_DESCRIPTION' ++ %= l 'MODIFY_DESCRIPTION'


-@@ -24,20 +29,41 @@ + % my $btn = l('APPLY'); + %= form_for '/ddclient8' => (method => 'POST') => begin +@@ -10,34 +15,60 @@ + %= hidden_field domainName => $ddc_datas->{"Domain_details"}->{"Domain"} + %= $ddc_datas->{"Domain_details"}->{"Domain"} +

++ + + %=l 'DESCRIPTION_LABEL' + + %= $ddc_datas->{"Domain_details"}->{"Description"} +

++ ++ % if ($ddc_datas->{"Domain_details"}->{"Content"} ne ""){ + + %= $ddc_datas->{"Domain_details"}->{"Content"} + + %= $ddc_datas->{"Domain_details"}->{"Content"} +

++ % } ++ + %=l 'SERVERS_LABEL' % param dns=>$ddc_datas->{"Domain_details"}->{"dns"}; @@ -648,7 +972,7 @@ diff -urN smeserver-ddclient-1.3.0.old/r diff -urN smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep --- smeserver-ddclient-1.3.0.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep 2023-11-10 16:11:05.902271946 +0000 -+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep 2023-12-01 17:12:00.000000000 +0000 ++++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep 2023-12-16 08:19:00.000000000 +0000 @@ -1,4 +1,9 @@
+