1 |
|
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 |
2 |
|
--- smeserver-ddclient-1.3.0.old/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/10Headers 2023-11-10 16:11:05.911271972 +0000 |
3 |
|
+++ smeserver-ddclient-1.3.0/root/etc/e-smith/templates/etc/ddclient/ddclient.conf/10Headers 2023-12-14 11:40:00.000000000 +0000 |
4 |
|
@@ -52,15 +52,16 @@ |
5 |
|
} elsif ( $method eq 'ip') { |
6 |
|
# we want to force manually |
7 |
|
$OUT.="usev4=ipv4, ipv4=$ForceIP \n"; |
8 |
|
- } elsif ( $method eq 'cmd') { |
9 |
|
- $OUT .="usev4=cmd, cmdv4='$cmd'\n"; |
10 |
|
+ } elsif ( $method eq 'cmdv4') { |
11 |
|
+ $OUT .="usev4=cmdv4, cmdv4='$cmd'\n"; |
12 |
|
} else { |
13 |
|
# fw method |
14 |
|
my $fwaddress = $ddclient{'fwaddress'}||''; |
15 |
|
+ my $fwdevice = $ddclient{'Extinterface'}||''; |
16 |
|
my $fwlogin = $ddclient{'fwlogin'}||''; |
17 |
|
my $fwpassword = $ddclient{'fwpassword'}||''; |
18 |
|
my $fwskip = $ddclient{'fwskip'}||''; |
19 |
|
- $OUT .= "usev4=$method, fwv4=$fwaddress"; |
20 |
|
+ $OUT .= "usev4=$fwdevice, fwv4=$fwaddress"; |
21 |
|
$OUT .= ", fw-login=$fwlogin " if ( $fwlogin ne '' ); |
22 |
|
$OUT .= ", fw-password=$fwpassword " if ( $fwpassword ne '' ); |
23 |
|
$OUT .= ", fwv4-skip='$fwskip' " if ( $fwskip ne '' ); |
24 |
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 |
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 |
25 |
--- 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.old/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm 2023-11-10 16:11:05.915271983 +0000 |
26 |
+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm 2023-11-18 10:41:00.000000000 +0000 |
+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/Controller/Ddclient.pm 2023-12-14 11:33:00.000000000 +0000 |
27 |
@@ -114,57 +114,167 @@ |
@@ -114,90 +114,164 @@ |
28 |
|
|
29 |
my %ddc_datas = (); |
my %ddc_datas = (); |
30 |
|
|
31 |
+sub get_devices_names { |
+sub get_devices_names { |
32 |
+ # |
+ # |
33 |
+ # Router devices from which it can get ip address |
+ # Router/Firewall devices from which it can get ip address |
34 |
+ # |
+ # |
35 |
+ my $devices = ( [ |
+ my $devices = ( [ |
36 |
+ ['2Wire 1701HG Gateway', '2wire'], |
+ [ '2Wire 1701HG Gateway' => '2wire' ], |
37 |
+ ['3com 3c886a 56k Lan Modem', '3com-3c886a'], |
+ [ '3com 3c886a 56k Lan Modem' => '3com-3c886a' ], |
38 |
+ ['3com OfficeConnect Remote 812', '3com-oc-remote812'], |
+ [ '3com OfficeConnect Remote 812' => '3com-oc-remote812' ], |
39 |
+ ['Alcatel Speed Touch 510', 'alcatel-510'], |
+ [ 'Alcatel Speed Touch 510' => 'alcatel-510' ], |
40 |
+ ['Alcatel/Thomson SpeedTouch 530', 'alcatel-530'], |
+ [ 'Alcatel/Thomson SpeedTouch 530' => 'alcatel-530' ], |
41 |
+ ['Alcatel Speed Touch Pro', 'alcatel-stp'], |
+ [ 'Alcatel Speed Touch Pro' => 'alcatel-stp' ], |
42 |
+ ['Allnet 1298', 'allnet-1298'], |
+ [ 'Allnet 1298' => 'allnet-1298' ], |
43 |
+ ['Cayman 3220-H DSL', 'cayman-3220h'], |
+ [ 'Cayman 3220-H DSL' => 'cayman-3220h' ], |
44 |
+ ['D-Link DI-524', 'dlink-524'], |
+ [ 'D-Link DI-524' => 'dlink-524' ], |
45 |
+ ['D-Link DI-604', 'dlink-604'], |
+ [ 'D-Link DI-604' => 'dlink-604' ], |
46 |
+ ['D-Link DI-614+', 'dlink-614'], |
+ [ 'dlink-614' => 'D-Link DI-614+' ], |
47 |
+ ['E-tech Router', 'e-tech'], |
+ [ 'e-tech' => 'E-tech Router' ], |
48 |
+ ['ELSA LanCom DSL/10 DSL FW', 'elsa-lancom-dsl10'], |
+ [ 'elsa-lancom-dsl10' => 'ELSA LanCom DSL/10 DSL FW' ], |
49 |
+ ['ELSA LanCom DSL/10 DSL FW (isdn ch01)', 'elsa-lancom-dsl10-ch01'], |
+ [ 'elsa-lancom-dsl10-ch01' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)' ], |
50 |
+ ['ELSA LanCom DSL/10 DSL FW (isdn ch01)', 'elsa-lancom-dsl10-ch02'], |
+ [ 'elsa-lancom-dsl10-ch02' => 'ELSA LanCom DSL/10 DSL FW (isdn ch01)' ], |
51 |
+ ['Linksys FW', 'linksys'], |
+ [ 'linksys' => 'Linksys FW' ], |
52 |
+ ['Linksys RV042 Dual Homed Router WAN Port 2', 'linksys-rv042-wan1'], |
+ [ 'linksys-rv042-wan1' => 'Linksys RV042 Dual Homed Router WAN Port 2' ], |
53 |
+ ['Linksys RV042 Dual Homed Router WAN Port 2', 'linksys-rv042-wan2'], |
+ [ 'linksys-rv042-wan2' => 'Linksys RV042 Dual Homed Router WAN Port 2' ], |
54 |
+ ['Linksys FW version 2', 'linksys-ver2'], |
+ [ 'linksys-ver2' => 'Linksys FW version 2' ], |
55 |
+ ['Linksys FW version 3', 'linksys-ver3'], |
+ [ 'linksys-ver3' => 'Linksys FW version 3' ], |
56 |
+ ['Linksys WCG200 FW', 'linksys-wcg200'], |
+ [ 'linksys-wcg200' => 'Linksys WCG200 FW' ], |
57 |
+ ['Linksys WRT854G FW', 'linksys-wrt854g'], |
+ [ 'linksys-wrt854g' => 'Linksys WRT854G FW' ], |
58 |
+ ['MaxGate UGATE-3x00 FW', 'maxgate-ugate3x00'], |
+ [ 'maxgate-ugate3x00' => 'MaxGate UGATE-3x00 FW' ], |
59 |
+ ['NetComm NB3', 'netcomm-nb3'], |
+ [ 'netcomm-nb3' => 'NetComm NB3' ], |
60 |
+ ['netgear-dg834g', 'netgear-dg834g'], |
+ [ 'netgear-dg834g' => 'netgear-dg834g' ], |
61 |
+ ['Netgear RP614 FW', 'netgear-rp614'], |
+ [ 'netgear-rp614' => 'Netgear RP614 FW' ], |
62 |
+ ['Netgear FW', 'netgear-rt3xx'], |
+ [ 'netgear-rt3xx' => 'Netgear FW' ], |
63 |
+ ['Netgear WGT624', 'netgear-wgt624'], |
+ [ 'netgear-wgt624' => 'Netgear WGT624' ], |
64 |
+ ['Netgear WPN824 FW', 'netgear-wpn824'], |
+ [ 'netgear-wpn824' => 'Netgear WPN824 FW' ], |
65 |
+ ['Netopia R910 FW', 'netopia-r910'], |
+ [ 'netopia-r910' => 'Netopia R910 FW' ], |
66 |
+ ['olitec-SX200', 'olitec-SX200'], |
+ [ 'olitec-SX200' => 'olitec-SX200' ], |
67 |
+ ['Linksys RTP300', 'rtp300'], |
+ [ 'rtp300' => 'Linksys RTP300' ], |
68 |
+ ['Siemens SpeedStream 4200', 'siemens-ss4200'], |
+ [ 'siemens-ss4200' => 'Siemens SpeedStream 4200' ], |
69 |
+ ['Sitecom DC-202 FW', 'sitecom-dc202'], |
+ [ 'sitecom-dc202' => 'Sitecom DC-202 FW' ], |
70 |
+ ['SMC Barricade FW', 'smc-barricade'], |
+ [ 'smc-barricade' => 'SMC Barricade FW' ], |
71 |
+ ['SMC Barricade FW (7004VBR model config)', 'smc-barricade-7004vbr'], |
+ [ 'smc-barricade-7004vbr' => 'SMC Barricade FW (7004VBR model config)' ], |
72 |
+ ['SMC Barricade 7401BRA FW', 'smc-barricade-7401bra'], |
+ [ 'smc-barricade-7401bra' => 'SMC Barricade 7401BRA FW' ], |
73 |
+ ['SMC Barricade FW (alternate config)', 'smc-barricade-alt'], |
+ [ 'smc-barricade-alt' => 'SMC Barricade FW (alternate config)' ], |
74 |
+ ['SOHOWare BroadGuard NBG800', 'sohoware-nbg800'], |
+ [ 'sohoware-nbg800' => 'SOHOWare BroadGuard NBG800' ], |
75 |
+ ['Sveasoft WRT54G/WRT54GS', 'sveasoft'], |
+ [ 'sveasoft' => 'Sveasoft WRT54G/WRT54GS' ], |
76 |
+ ['Thomson SpeedTouch 536v6', 'thomson-st536v6'], |
+ [ 'thomson-st536v6' => 'Thomson SpeedTouch 536v6' ], |
77 |
+ ['Thomson/Technicolor TG782', 'thomson-tg782'], |
+ [ 'thomson-tg782' => 'Thomson/Technicolor TG782' ], |
78 |
+ ['Vigor 2200 USB', 'vigor-2200usb'], |
+ [ 'vigor-2200usb' => 'Vigor 2200 USB' ], |
79 |
+ ['Watchguard Edge X FW', 'watchguard-edge-x'], |
+ [ 'watchguard-edge-x' => 'Watchguard Edge X FW' ], |
80 |
+ ['Watchguard SOHO FW', 'watchguard-soho'], |
+ [ 'watchguard-soho' => 'Watchguard SOHO FW' ], |
81 |
+ ['Westell C90-610015-06 DSL Router', 'westell-6100'], |
+ [ 'westell-6100' => 'Westell C90-610015-06 DSL Router' ], |
82 |
+ ['xsense-aero', 'Xsense Aero'] |
+ [ 'xsense-aero' => 'Xsense Aero' ] |
83 |
+ ] ); |
+ ] ); |
84 |
+ return $devices; |
+ return $devices; |
85 |
+ |
+ |
100 |
+ # Web Services from which it can get ip address |
+ # Web Services from which it can get ip address |
101 |
+ # |
+ # |
102 |
+ my $webservices = ( [ |
+ my $webservices = ( [ |
103 |
+ ['dyndns http://checkip.dyndns.org/', 'dyndns'], |
+ [ 'dyndns-http://checkip.dyndns.org/' => 'dyndns' ], |
104 |
+ ['freedns https://freedns.afraid.org/dynamic/check.php', 'freedns'], |
+ [ 'freedns-https://freedns.afraid.org/dynamic/check.php' => 'freedns' ], |
105 |
+ ['googledomains https://domains.google.com/checkip', 'googledomains'], |
+ [ 'googledomains-https://domains.google.com/checkip' => 'googledomains' ], |
106 |
+ ['he https://checkip.dns.he.net/', 'he'], |
+ [ 'he-https://checkip.dns.he.net/' => 'he' ], |
107 |
+ ['ip4only.me https://ip4only.me/api/', 'ip4only.me'], |
+ [ 'ip4only.me-https://ip4only.me/api/' => 'ip4only.me' ], |
108 |
+ ['ip6only.me https://ip6only.me/api/', 'ip6only.me'], |
+ [ 'ip6only.me-https://ip6only.me/api/' => 'ip6only.me' ], |
109 |
+ ['ipify-ipv4 https://api.ipify.org/', 'ipify-ipv4'], |
+ [ 'ipify-ipv4-https://api.ipify.org/' => 'ipify-ipv4' ], |
110 |
+ ['ipify-ipv6 https://api6.ipify.org/', 'ipify-ipv6'], |
+ [ 'ipify-ipv6-https://api6.ipify.org/' => 'ipify-ipv6' ], |
111 |
+ ['loopia https://dns.loopia.se/checkip/checkip.php', 'loopia'], |
+ [ 'loopia:-https://dns.loopia.se/checkip/checkip.php' => 'loopia' ], |
112 |
+ ['myonlineportal https://myonlineportal.net/checkip', 'myonlineportal'], |
+ [ 'myonlineportal-https://myonlineportal.net/checkip' => 'myonlineportal' ], |
113 |
+ ['noip-ipv4 http://ip1.dynupdate.no-ip.com/', 'noip-ipv4'], |
+ [ 'noip-ipv4-http://ip1.dynupdate.no-ip.com/' => 'noip-ipv4' ], |
114 |
+ ['noip-ipv6 http://ip1.dynupdate6.no-ip.com/', 'noip-ipv6'], |
+ [ 'noip-ipv6-http://ip1.dynupdate6.no-ip.com/' => 'noip-ipv6' ], |
115 |
+ ['nsupdate.info-ipv4 https://ipv4.nsupdate.info/myip', 'nsupdate.info-ipv4'], |
+ [ 'nsupdate.info-ipv4-https://ipv4.nsupdate.info/myip' => 'nsupdate.info-ipv4' ], |
116 |
+ ['nsupdate.info-ipv6 https://ipv6.nsupdate.info/myip', 'nsupdate.info-ipv6'], |
+ [ 'nsupdate.info-ipv6-https://ipv6.nsupdate.info/myip' => 'nsupdate.info-ipv6' ], |
117 |
+ ['zoneedit https://dynamic.zoneedit.com/checkip.html', 'zoneedit'] |
+ [ 'zoneedit-https://dynamic.zoneedit.com/checkip.html' => 'zoneedit' ] |
118 |
+ ] ); |
+ ] ); |
119 |
+ return $webservices |
+ return $webservices |
120 |
+ |
+ |
179 |
- [$c->l('zoneedit1') 'zoneedit1'] |
- [$c->l('zoneedit1') 'zoneedit1'] |
180 |
- ] |
- ] |
181 |
- # end of v3.11.1 labels |
- # end of v3.11.1 labels |
|
- |
|
182 |
+ my $dnsservices = ( [ |
+ my $dnsservices = ( [ |
183 |
+ ['1984 - https://kb.1984hosting.com/doku.php?id=freedns', '1984'], |
+ [ $c->l('1984') => '1984' ], |
184 |
+ ['changeip - https://changeip.com', 'changeip'], |
+ [ $c->l('changeip') => 'changeip' ], |
185 |
+ ['cloudflare - https://cloudflare.com', 'cloudflare'], |
+ [ $c->l('cloudflare') => 'cloudflare' ], |
186 |
+ ['cloudns - https://cloudns.com', 'cloudns'], |
+ [ $c->l('cloudns') => 'cloudns' ], |
187 |
+ ['digitalocean - https://digitalocean.com', 'digitalocean'], |
+ [ $c->l('digitalocean') => 'digitalocean' ], |
188 |
+ ['dinahosting - https://dinahosting.com', 'dinahosting'], |
+ [ $c->l('dinahosting') => 'dinahosting' ], |
189 |
+ ['dnsexit - https://dnsexit.com/', 'dnsexit'], |
+ [ $c->l('dnsexit') => 'dnsexit' ], |
190 |
+ ['dnsmadeeasy - https://dnsmadeeasy.com', 'dnsmadeeasy'], |
+ [ $c->l('dnsmadeeasy') => 'dnsmadeeasy' ], |
191 |
+ ['domeneshop - https://domeneshop.com', 'domeneshop'], |
+ [ $c->l('domeneshop') => 'domeneshop' ], |
192 |
+ ['dondominio - https://dondominio.com', 'dondominio'], |
+ [ $c->l('dondominio') => 'dondominio' ], |
193 |
+ ['dslreports - https://www.dslreports.com/', 'dslreports'], |
+ [ $c->l('dslreports') => 'dslreports' ], |
194 |
+ ['duckdns - https://duckdns.com', 'duckdns'], |
+ [ $c->l('duckdns') => 'duckdns' ], |
195 |
+ ['dyndns1 - https://account.dyn.com/', 'dyndns1'], |
+ [ $c->l('dyndns1') => 'dyndns1' ], |
196 |
+ ['dyndns2 - https://account.dyn.com/', 'dyndns2'], |
+ [ $c->l('dyndns2') => 'dyndns2' ], |
197 |
+ ['easydns - https://easydns.com', 'easydns'], |
+ [ $c->l('easydns') => 'easydns' ], |
198 |
+ ['enom - https://enom.com', 'enom'], |
+ [ $c->l('enom') => 'enom' ], |
199 |
+ ['freedns - http://freedns.com', 'freedns'], |
+ [ $c->l('freedns') => 'freedns' ], |
200 |
+ ['freemyip - https://freemyip.com', 'freemyip'], |
+ [ $c->l('freemyip') => 'freemyip' ], |
201 |
+ ['gandi - https://gandi.com', 'gandi'], |
+ [ $c->l('gandi') => 'gandi' ], |
202 |
+ ['godaddy - https://godaddy.com', 'godaddy'], |
+ [ $c->l('godaddy') => 'godaddy' ], |
203 |
+ ['googledomains - https://googledomains.com', 'googledomains'], |
+ [ $c->l('googledomains') => 'googledomains' ], |
204 |
+ ['hetzner - https://hetzner.com', 'hetzner'], |
+ [ $c->l('hetzner') => 'hetzner' ], |
205 |
+ ['infomaniak - https://infomaniak.com', 'infomaniak'], |
+ [ $c->l('infomaniak') => 'infomaniak' ], |
206 |
+ ['keysystems - https://keysystems.com', 'keysystems'], |
+ [ $c->l('keysystems') => 'keysystems' ], |
207 |
+ ['mythicdyn - https://www.mythic-beasts.com/support/api/dnsv2/dynamic-dns', 'mythicdyn'], |
+ [ $c->l('mythicdyn') => 'mythicdyn' ], |
208 |
+ ['namecheap - https://namecheap.com', 'namecheap'], |
+ [ $c->l('namecheap') => 'namecheap' ], |
209 |
+ ['nfsn - http://nfsn.com', 'nfsn'], |
+ [ $c->l('nfsn') => 'nfsn' ], |
210 |
+ ['njalla - https://njalla.com', 'njalla'], |
+ [ $c->l('njalla') => 'njalla' ], |
211 |
+ ['noip - https://noip.com', 'noip'], |
+ [ $c->l('noip') => 'noip' ], |
212 |
+ ['nsupdate - http://nsupdate.com', 'nsupdate'], |
+ [ $c->l('nsupdate') => 'nsupdate' ], |
213 |
+ ['ovh - https://ovh.com', 'ovh'], |
+ [ $c->l('ovh') => 'ovh' ], |
214 |
+ ['porkbun - https://porkbun.com', 'porkbun'], |
+ [ $c->l('porkbun') => 'porkbun' ], |
215 |
+ ['regfishde - regfishde', 'regfishde'], |
+ [ $c->l('regfishde') => 'regfishde' ], |
216 |
+ ['sitelutions - https://sitelutions.com', 'sitelutions'], |
+ [ $c->l('sitelutions') => 'sitelutions' ], |
217 |
+ ['woima - http://woima.com', 'woima'], |
+ [ $c->l('woima') => 'woima' ], |
218 |
+ ['yandex - https://yandex.com', 'yandex'], |
+ [ $c->l('yandex') => 'yandex' ], |
219 |
+ ['zoneedit - https://www.zoneedit.com/dynamic-dns/', 'zoneedit'] ] ); |
+ [ $c->l('zoneedit') => 'zoneedit' ] |
220 |
|
+ ] ); |
221 |
+ return $dnsservices; |
+ return $dnsservices; |
222 |
|
|
223 |
|
- |
224 |
- #[ [ $c->l('CUSTOMDNS'), 'CUSTOMDNS' ], |
- #[ [ $c->l('CUSTOMDNS'), 'CUSTOMDNS' ], |
225 |
|
- #[ $c->l('DYNDNS1'), 'DYNDNS1' ], |
226 |
|
- #[ $c->l('DYNDNS2'), 'DYNDNS2' ], |
227 |
|
- #[ $c->l('DYNDNS3'), 'DYNDNS3' ], |
228 |
|
- #[ $c->l('ZONEDIT'), 'ZONEDIT' ], |
229 |
|
- #[ $c->l('EASYDNS'), 'EASYDNS' ], |
230 |
|
- #[ $c->l('HAMMER'), 'HAMMER' ], |
231 |
|
- #[ $c->l('DSLREPORTS'), 'DSLREPORTS' ], |
232 |
|
- #[ $c->l('EURODYNDNS'), 'EURODYNDNS' ], |
233 |
|
- #[ $c->l('DTDNS'), 'DTDNS' ], |
234 |
|
- #[ $c->l('LOOPIA'), 'LOOPIA' ], |
235 |
|
- #[ $c->l('DNSPARK'), 'DNSPARK' ], |
236 |
|
- #[ $c->l('DYNHOST'), 'DYNHOST' ], |
237 |
|
- #[ $c->l('NOIP'), 'NOIP' ], |
238 |
|
- #[ $c->l('CHANGEIP'), 'CHANGEIP' ], |
239 |
|
- #[ $c->l('NAMECHEAP'), 'NAMECHEAP' ], |
240 |
|
- #[ $c->l('SPDNS'), 'SPDNS' ], |
241 |
|
- #[ $c->l('SITELUTIONS'), 'SITELUTIONS' ], |
242 |
|
- #[ $c->l('FREEDNS'), 'FREEDNS' ], |
243 |
|
- #[ $c->l('NSUPDATE'), 'NSUPDATE' ], |
244 |
|
- #[ $c->l('CLOUDFLARE'), 'CLOUDFLARE' ], |
245 |
|
- #[ $c->l('GOOGLEDOMAINS'), 'GOOGLEDOMAINS' ], |
246 |
|
- #[ $c->l('DUCKDNS'), 'DUCKDNS' ], |
247 |
|
- #[ $c->l('FREEMYIP'), 'FREEMYIP' ], |
248 |
|
- #[ $c->l('WOIMA'), 'WOIMA' ], |
249 |
|
- #[ $c->l('YANDEX'), 'YANDEX' ], |
250 |
|
- #[ $c->l('DNSMADEEASY'), 'DNSMADEEASY' ], |
251 |
|
- #[ $c->l('DONDOMINIO'), 'DONDOMINIO' ], |
252 |
|
- #[ $c->l('NEARLYFREESPEECH'), 'NFSN' ], |
253 |
|
- #[ $c->l('OVH'), 'OVH' ], |
254 |
|
- #[ $c->l('CLOUDNS'), 'CLOUDNS' ] |
255 |
|
- #] |
256 |
|
- ); |
257 |
|
- return $Labels; |
258 |
+ #my $output = `ddclient -list-protocols`; # Run ddclient command and capture the output |
+ #my $output = `ddclient -list-protocols`; # Run ddclient command and capture the output |
259 |
+ #my @protocols; |
+ #my @protocols; |
260 |
+ #foreach my $line (split /\n/, $output) { |
+ #foreach my $line (split /\n/, $output) { |
264 |
+ #push @protocols, [$custom_value, $protocol]; |
+ #push @protocols, [$custom_value, $protocol]; |
265 |
+ #} |
+ #} |
266 |
+ #return \@protocols; # Return a reference to the protocols array |
+ #return \@protocols; # Return a reference to the protocols array |
267 |
+} |
} |
|
+ |
|
|
+# Pre 3.11.1 dns services |
|
|
+ #[ [ $c->l('CUSTOMDNS'), 'CUSTOMDNS' ], |
|
|
#[ $c->l('DYNDNS1'), 'DYNDNS1' ], |
|
|
#[ $c->l('DYNDNS2'), 'DYNDNS2' ], |
|
|
#[ $c->l('DYNDNS3'), 'DYNDNS3' ], |
|
|
@@ -196,9 +306,6 @@ |
|
|
#[ $c->l('OVH'), 'OVH' ], |
|
|
#[ $c->l('CLOUDNS'), 'CLOUDNS' ] |
|
|
#] |
|
|
- ); |
|
|
- return $Labels; |
|
|
-} |
|
268 |
|
|
269 |
sub main { |
sub main { |
270 |
# |
@@ -230,13 +304,15 @@ |
271 |
@@ -231,8 +338,9 @@ |
my $emptycust = ( scalar @FreeDomains == 0 ); |
272 |
|
|
273 |
my $Labels = ( |
my $Labels = ( |
274 |
[ [ $c->l('SME external Interface'), "smeIF" ], |
- [ [ $c->l('SME external Interface'), "smeIF" ], |
275 |
- [ $c->l('SME configuration DB'), "smeCMD" ], |
- [ $c->l('SME configuration DB'), "smeCMD" ], |
276 |
+ [ $c->l('SME configuration DB'), "smeCDB" ], |
- [ $c->l('web'), "web" ], |
277 |
[ $c->l('web'), "web" ], |
- [ $c->l('Interface'), "if" ], |
278 |
+ [ $c->l('router'), "router" ], |
- [ $c->l('IP'), "ip" ], |
279 |
[ $c->l('Interface'), "if" ], |
- [ $c->l('Command'), "cmd" ] |
280 |
[ $c->l('IP'), "ip" ], |
- ] |
281 |
[ $c->l('Command'), "cmd" ] |
+ [ |
282 |
@@ -246,6 +354,8 @@ |
+ [ $c->l('SME external Interface') => "smeIF" ], |
283 |
|
+ [ $c->l('SME configuration DB') => 'smeCMD' ], |
284 |
|
+ [ $c->l('web') => 'web' ], |
285 |
|
+ [ $c->l('Router/Firewall') => 'router' ], |
286 |
|
+ [ $c->l('Interface') => 'if' ], |
287 |
|
+ [ $c->l('IP') => 'ip' ], |
288 |
|
+ [ $c->l('Command') => 'cmdv4' ] |
289 |
|
+ ] |
290 |
|
); |
291 |
|
|
292 |
|
$c->stash( |
293 |
|
@@ -246,6 +322,9 @@ |
294 |
domains => \@domains, |
domains => \@domains, |
295 |
freedomains => \@FreeDomains, |
freedomains => \@FreeDomains, |
296 |
methodlabels => $Labels, |
methodlabels => $Labels, |
297 |
|
+ dnslabels => get_dns_labels($c), |
298 |
+ devices => get_devices_names($c), |
+ devices => get_devices_names($c), |
299 |
+ webservices => get_web_services_names($c), |
+ webservices => get_web_services_names($c), |
300 |
emptydom => $emptydom, |
emptydom => $emptydom, |
301 |
emptycust => $emptycust |
emptycust => $emptycust |
302 |
); |
); |
303 |
@@ -269,6 +379,7 @@ |
@@ -260,6 +339,7 @@ |
304 |
|
# Called to update the parameters relating to the Ip address of the server |
305 |
|
# |
306 |
|
my $c = shift; |
307 |
|
+ $ddc_datas{"first"} = ''; |
308 |
|
$ddc_datas{"success"} = pushParams($c); |
309 |
|
do_display($c); |
310 |
|
} |
311 |
|
@@ -269,6 +349,7 @@ |
312 |
#Called to update/delete the ddclient for a specific inbuilt domain |
#Called to update/delete the ddclient for a specific inbuilt domain |
313 |
# |
# |
314 |
my $c = shift; |
my $c = shift; |
316 |
my $retmsg; |
my $retmsg; |
317 |
if ( $c->param("Route") eq "ddclient2" ) { #Route is hidden field |
if ( $c->param("Route") eq "ddclient2" ) { #Route is hidden field |
318 |
$retmsg = performModifyCustom($c); |
$retmsg = performModifyCustom($c); |
319 |
@@ -279,7 +390,7 @@ |
@@ -276,10 +357,11 @@ |
320 |
|
else { |
321 |
|
$retmsg = performModifyDomain($c); |
322 |
|
} |
323 |
|
+ $ddc_datas{"first"} = ''; |
324 |
if ( $retmsg eq "ok" ) { |
if ( $retmsg eq "ok" ) { |
325 |
my $dns = $c->param('dns'); |
my $dns = $c->param('dns'); |
326 |
my $domain = $c->param('domainname'); |
my $domain = $c->param('domainname'); |
329 |
$c->l( '' . $dns ) ); |
$c->l( '' . $dns ) ); |
330 |
do_display( $c, %ddc_datas ); |
do_display( $c, %ddc_datas ); |
331 |
} |
} |
332 |
@@ -296,7 +407,7 @@ |
@@ -296,7 +378,7 @@ |
333 |
# Create custom domain |
# Create custom domain |
334 |
# |
# |
335 |
my $c = shift; |
my $c = shift; |
338 |
my $modul = ''; |
my $modul = ''; |
339 |
my $trt = "NEW"; |
my $trt = "NEW"; |
340 |
|
|
341 |
@@ -305,7 +416,9 @@ |
@@ -305,18 +387,21 @@ |
342 |
title => $title, |
title => $title, |
343 |
modul => $modul, |
modul => $modul, |
344 |
ddc_datas => \%ddc_datas, |
ddc_datas => \%ddc_datas, |
349 |
); |
); |
350 |
$c->render( template => 'ddclient' ); |
$c->render( template => 'ddclient' ); |
351 |
} |
} |
352 |
@@ -316,7 +429,7 @@ |
|
353 |
|
sub do_create_custom_actual { |
354 |
|
my $c = shift; |
355 |
|
+ $ddc_datas{"first"} = ''; |
356 |
|
my $retmsg = performCreateCustom($c); |
357 |
if ( $retmsg eq "ok" ) { |
if ( $retmsg eq "ok" ) { |
358 |
my $dns = $c->param('dns'); |
my $dns = $c->param('dns'); |
359 |
my $domain = $c->param('domainname'); |
my $domain = $c->param('domainname'); |
362 |
$c->l( '' . $dns ) ); |
$c->l( '' . $dns ) ); |
363 |
do_display( $c, %ddc_datas ); |
do_display( $c, %ddc_datas ); |
364 |
} |
} |
365 |
@@ -334,7 +447,7 @@ |
@@ -334,7 +419,7 @@ |
366 |
# Display delete or modify panel for custom domain |
# Display delete or modify panel for custom domain |
367 |
# |
# |
368 |
my $c = shift; |
my $c = shift; |
371 |
my $modul = ''; |
my $modul = ''; |
372 |
my $trt = $c->param("trt"); |
my $trt = $c->param("trt"); |
373 |
|
|
374 |
@@ -349,7 +462,9 @@ |
@@ -349,7 +434,9 @@ |
375 |
title => $title, |
title => $title, |
376 |
modul => $modul, |
modul => $modul, |
377 |
ddc_datas => \%ddc_datas, |
ddc_datas => \%ddc_datas, |
382 |
); |
); |
383 |
$c->render( template => 'ddclient' ); |
$c->render( template => 'ddclient' ); |
384 |
} |
} |
385 |
@@ -360,21 +475,23 @@ |
@@ -360,21 +447,23 @@ |
386 |
# param trt = MOD or DEL |
# param trt = MOD or DEL |
387 |
# |
# |
388 |
my $c = shift; |
my $c = shift; |
409 |
); |
); |
410 |
$c->render( template => 'ddclient' ); |
$c->render( template => 'ddclient' ); |
411 |
} |
} |
412 |
@@ -386,7 +503,7 @@ |
@@ -386,10 +475,11 @@ |
413 |
# |
# |
414 |
my $c = shift; |
my $c = shift; |
415 |
my $route = $c->current_route; |
my $route = $c->current_route; |
418 |
my $modul = ''; |
my $modul = ''; |
419 |
my $retmsg = ""; |
my $retmsg = ""; |
420 |
my $domain = $c->param("Domain"); |
my $domain = $c->param("Domain"); |
421 |
@@ -400,7 +517,7 @@ |
+ $ddc_datas{"first"} = ''; |
422 |
|
|
423 |
|
#Delete it and return to front summary panel - depends on route domain or custom |
424 |
|
if ( $c->param("Route") eq "ddclient2" ) { #Route is hidden field |
425 |
|
@@ -400,7 +490,7 @@ |
426 |
} |
} |
427 |
|
|
428 |
if ( $retmsg eq "ok" ) { |
if ( $retmsg eq "ok" ) { |
431 |
$c->l( '' . $c->param("dns") ) ); |
$c->l( '' . $c->param("dns") ) ); |
432 |
} |
} |
433 |
else { $ddc_datas{"error"} = $retmsg; } |
else { $ddc_datas{"error"} = $retmsg; } |
434 |
@@ -415,7 +532,7 @@ |
@@ -415,15 +505,16 @@ |
435 |
# |
# |
436 |
my $c = shift; |
my $c = shift; |
437 |
my $route = $c->current_route; |
my $route = $c->current_route; |
440 |
my $modul = ''; |
my $modul = ''; |
441 |
my $retmsg = ""; |
my $retmsg = ""; |
442 |
my $domain = $c->param("Domain"); |
my $domain = $c->param("Domain"); |
443 |
@@ -423,7 +540,7 @@ |
+ $ddc_datas{"first"} = ''; |
444 |
|
|
445 |
#Delete it and return to front summary panel - depends on route domain or custom |
#Delete it and return to front summary panel - depends on route domain or custom |
446 |
$retmsg = performDeleteCustom( $c, $domain ); |
$retmsg = performDeleteCustom( $c, $domain ); |
447 |
if ( $retmsg eq "ok" ) { |
if ( $retmsg eq "ok" ) { |
450 |
} |
} |
451 |
else { $ddc_datas{"error"} = $retmsg; } |
else { $ddc_datas{"error"} = $retmsg; } |
452 |
do_display( $c, %ddc_datas ); |
do_display( $c, %ddc_datas ); |
453 |
@@ -616,7 +733,7 @@ |
@@ -450,7 +541,7 @@ |
454 |
|
|
455 |
|
foreach $domain ( sort @virtualDomains ) { |
456 |
|
my %properties = $domaindb->get($domain)->props; |
457 |
|
- my $test = $domaindb->get_prop( $domain, "dns" ) || ''; |
458 |
|
+ my $test = $domaindb->get($domain) || ''; |
459 |
|
my %extraprops; |
460 |
|
if ( $test ne '' ) { |
461 |
|
%extraprops = $domaindb->get($domain)->props; |
462 |
|
@@ -567,6 +658,8 @@ |
463 |
|
my $Extinterface = $ddretrieve->prop('Extinterface') || ''; |
464 |
|
my $cmd = $ddretrieve->prop('cmd') || ''; |
465 |
|
my $forceIP = $ddretrieve->prop('ForceIP') || ''; |
466 |
|
+ my $fwlogin = $ddretrieve->prop('fwlogin') || ''; |
467 |
|
+ my $fwpassword = $ddretrieve->prop('fwpassword') || ''; |
468 |
|
my $res = { |
469 |
|
"ssl" => $ssl, |
470 |
|
"DeamonUpdate" => $DeamonUpdate, |
471 |
|
@@ -574,29 +667,43 @@ |
472 |
|
"Extinterface" => $Extinterface, |
473 |
|
"cmd" => $cmd, |
474 |
|
"ForceIP" => $forceIP, |
475 |
|
- "urlcheckip" => $urlcheckip |
476 |
|
+ "urlcheckip" => $urlcheckip, |
477 |
|
+ "FWlogin" => $fwlogin, |
478 |
|
+ "FWpassword" => $fwpassword |
479 |
|
}; |
480 |
|
return $res; |
481 |
|
} |
482 |
|
|
483 |
|
sub pushParams { |
484 |
|
my $c = shift; |
485 |
|
- my $DeamonUpdate = $c->param('retrievedeamonupdate'); |
486 |
|
- my $urlcheckip = $c->param('retrieveurlcheckip'); |
487 |
|
- my $ssl = $c->param('retrievessl'); |
488 |
|
+ my $retrievedeamonupdate = $c->param('retrievedeamonupdate'); |
489 |
|
+ my $retrieverouter = $c->param('retrieverouter'); |
490 |
|
+ my $retrievewebservice = $c->param('retrievewebservice'); |
491 |
|
+ my $retrieveurlcheckip = $c->param('retrieveurlcheckip'); |
492 |
|
+ my $retrievessl = $c->param('retrievessl'); |
493 |
|
my $retrievemethod = $c->param('retrievemethod'); |
494 |
|
my $retrieveinterface = $c->param('retrieveinterface'); |
495 |
|
my $retrievecmd = $c->param('retrievecmd'); |
496 |
|
my $retrieveip = $c->param('retrieveip'); |
497 |
|
+ my $retrievefwlogin = $c->param('retrieverouterlogin'); |
498 |
|
+ my $retrievefwpassword = $c->param('retrieverouterpassword'); |
499 |
|
+ |
500 |
|
+ #print 1 / 0; #Crash |
501 |
|
|
502 |
|
my $ddclient = $db->get('ddclient'); |
503 |
|
- $ddclient->set_prop( 'urlcheckip' => $urlcheckip ); |
504 |
|
- $ddclient->set_prop( 'DeamonUpdate' => $DeamonUpdate ); |
505 |
|
- $ddclient->set_prop( 'SSL' => $ssl ); |
506 |
|
+ $ddclient->set_prop( 'urlcheckip' => $retrievewebservice || $retrieveurlcheckip ); |
507 |
|
+ $ddclient->set_prop( 'DeamonUpdate' => $retrievedeamonupdate ); |
508 |
|
+ $ddclient->set_prop( 'SSL' => $retrievessl ); |
509 |
|
$ddclient->set_prop( 'method' => $retrievemethod ); |
510 |
|
- $ddclient->set_prop( 'Extinterface' => $retrieveinterface ); |
511 |
|
+ if ($retrievemethod eq 'router') { |
512 |
|
+ $ddclient->set_prop( 'Extinterface' => $retrieverouter ); |
513 |
|
+ } else { |
514 |
|
+ $ddclient->set_prop( 'Extinterface' => $retrieveinterface ); |
515 |
|
+ } |
516 |
|
$ddclient->set_prop( 'cmd' => $retrievecmd ); |
517 |
|
$ddclient->set_prop( 'ForceIP' => $retrieveip ); |
518 |
|
+ $ddclient->set_prop( 'fwlogin' => $retrievefwlogin ); |
519 |
|
+ $ddclient->set_prop( 'fwpassword' => $retrievefwpassword ); |
520 |
|
|
521 |
|
$domaindb->reload(); |
522 |
|
|
523 |
|
@@ -616,7 +723,7 @@ |
524 |
#------------------------------------------------------------ |
#------------------------------------------------------------ |
525 |
|
|
526 |
my $domainName = $c->param('domainName'); |
my $domainName = $c->param('domainName'); |
529 |
$domainName = $1; |
$domainName = $1; |
530 |
} |
} |
531 |
else { |
else { |
532 |
@@ -624,7 +741,7 @@ |
@@ -624,7 +731,7 @@ |
533 |
} |
} |
534 |
|
|
535 |
my $domainLogin = $c->param('login'); |
my $domainLogin = $c->param('login'); |
538 |
$domainLogin = $1; |
$domainLogin = $1; |
539 |
} |
} |
540 |
else { |
else { |
541 |
@@ -632,7 +749,7 @@ |
@@ -632,7 +739,7 @@ |
542 |
} |
} |
543 |
|
|
544 |
my $domainPassword = $c->param('password'); |
my $domainPassword = $c->param('password'); |
547 |
$domainPassword = $1; |
$domainPassword = $1; |
548 |
} |
} |
549 |
else { |
else { |
550 |
@@ -646,7 +763,7 @@ |
@@ -646,7 +753,7 @@ |
551 |
|
|
552 |
my $dns = $c->param('dns'); |
my $dns = $c->param('dns'); |
553 |
if ( $dns eq 'CUSTOMDNS' ) { |
if ( $dns eq 'CUSTOMDNS' ) { |
556 |
$customDNS = $1; |
$customDNS = $1; |
557 |
} |
} |
558 |
else |
else |
559 |
@@ -685,7 +802,7 @@ |
@@ -685,7 +792,7 @@ |
560 |
# Attempt to delete domain |
# Attempt to delete domain |
561 |
#------------------------------------------------------------ |
#------------------------------------------------------------ |
562 |
|
|
565 |
$domain = $1; |
$domain = $1; |
566 |
} |
} |
567 |
else { |
else { |
568 |
@@ -726,7 +843,7 @@ |
@@ -726,7 +833,7 @@ |
569 |
#------------------------------------------------------------ |
#------------------------------------------------------------ |
570 |
|
|
571 |
my $domainName = $c->param('domainName'); |
my $domainName = $c->param('domainName'); |
574 |
$domainName = $1; |
$domainName = $1; |
575 |
} |
} |
576 |
else { |
else { |
577 |
@@ -749,7 +866,7 @@ |
@@ -749,7 +856,7 @@ |
578 |
|
|
579 |
my $domainDesc = $c->param('desc'); |
my $domainDesc = $c->param('desc'); |
580 |
my $domainLogin = $c->param('login'); |
my $domainLogin = $c->param('login'); |
583 |
$domainLogin = $1; |
$domainLogin = $1; |
584 |
} |
} |
585 |
else { |
else { |
586 |
@@ -757,7 +874,7 @@ |
@@ -757,7 +864,7 @@ |
587 |
} |
} |
588 |
|
|
589 |
my $domainPassword = $c->param('password'); |
my $domainPassword = $c->param('password'); |
592 |
$domainPassword = $1; |
$domainPassword = $1; |
593 |
} |
} |
594 |
else { |
else { |
595 |
@@ -771,7 +888,7 @@ |
@@ -771,7 +878,7 @@ |
596 |
|
|
597 |
my $dns = $c->param('dns'); |
my $dns = $c->param('dns'); |
598 |
if ( $dns eq 'CUSTOMDNS' ) { |
if ( $dns eq 'CUSTOMDNS' ) { |
601 |
$customDNS = $1; |
$customDNS = $1; |
602 |
} |
} |
603 |
else { |
else { |
604 |
@@ -809,7 +926,7 @@ |
@@ -809,7 +916,7 @@ |
605 |
#------------------------------------------------------------ |
#------------------------------------------------------------ |
606 |
|
|
607 |
my $domainName = $c->param('domainName'); |
my $domainName = $c->param('domainName'); |
610 |
$domainName = $1; |
$domainName = $1; |
611 |
} |
} |
612 |
else { |
else { |
613 |
@@ -817,7 +934,7 @@ |
@@ -817,7 +924,7 @@ |
614 |
} |
} |
615 |
|
|
616 |
my $domainLogin = $c->param('login'); |
my $domainLogin = $c->param('login'); |
619 |
$domainLogin = $1; |
$domainLogin = $1; |
620 |
} |
} |
621 |
else { |
else { |
622 |
@@ -825,7 +942,7 @@ |
@@ -825,7 +932,7 @@ |
623 |
} |
} |
624 |
|
|
625 |
my $domainPassword = $c->param('password'); |
my $domainPassword = $c->param('password'); |
628 |
$domainPassword = $1; |
$domainPassword = $1; |
629 |
} |
} |
630 |
else { |
else { |
631 |
@@ -839,7 +956,7 @@ |
@@ -839,7 +946,7 @@ |
632 |
|
|
633 |
my $dns = $c->param('dns'); |
my $dns = $c->param('dns'); |
634 |
if ( $dns eq 'CUSTOMDNS' ) { |
if ( $dns eq 'CUSTOMDNS' ) { |
637 |
$customDNS = $1; |
$customDNS = $1; |
638 |
} |
} |
639 |
else |
else |
640 |
@@ -878,7 +995,7 @@ |
@@ -878,7 +985,7 @@ |
641 |
# Attempt to delete domain |
# Attempt to delete domain |
642 |
#------------------------------------------------------------ |
#------------------------------------------------------------ |
643 |
|
|
648 |
else { |
else { |
649 |
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 |
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 |
650 |
--- 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.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Ddclient/en.pm 2023-11-10 16:11:05.916271986 +0000 |
651 |
+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Ddclient/en.pm 2023-11-15 14:48:00.000000000 +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 |
652 |
|
@@ -80,7 +80,7 @@ |
653 |
|
'CLOUDNS'=>'CLOUDNS www.cloudns.net', |
654 |
|
# End of Service descriptions |
655 |
|
|
656 |
|
-# v3.11.1 Service descriptions: |
657 |
|
+# v3.11.x Service descriptions: |
658 |
|
"1984" => "https://kb.1984hosting.com/doku.php?id=freedns", |
659 |
|
"changeip" => "https://changeip.com", |
660 |
|
"cloudflare" => "https://cloudflare.com", |
661 |
|
@@ -118,7 +118,7 @@ |
662 |
|
"woima" => "http://woima.com", |
663 |
|
"yandex" => "https://yandex.com", |
664 |
|
"zoneedit" => "https://www.zoneedit.com/dynamic-dns/", |
665 |
|
-# end of v3.11.1 Service descriptions: |
666 |
|
+# end of v3.11.x Service descriptions: |
667 |
|
|
668 |
|
'CUSTOMDNS' => 'Custom Dynamic DNS Provider', |
669 |
|
'CUSTOMDNS_LABEL' => 'Custom server Address', |
670 |
@@ -136,8 +136,8 @@ |
@@ -136,8 +136,8 @@ |
671 |
'DESCRIPTION_LABEL' => 'Domain description', |
'DESCRIPTION_LABEL' => 'Domain description', |
672 |
'SUCCESSFULLY_MODIFIED_RETRIEVE_IP' => 'You have successfully modified the retrieve IP options.', |
'SUCCESSFULLY_MODIFIED_RETRIEVE_IP' => 'You have successfully modified the retrieve IP options.', |
751 |
</span><span class=data> |
</span><span class=data> |
752 |
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 |
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 |
753 |
--- 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.old/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep 2023-11-10 16:11:05.902271946 +0000 |
754 |
+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep 2023-11-18 14:54:00.000000000 +0000 |
+++ smeserver-ddclient-1.3.0/root/usr/share/smanager/themes/default/templates/partials/_ddc_paramlist.html.ep 2023-12-14 11:36:00.000000000 +0000 |
755 |
@@ -1,4 +1,9 @@ |
@@ -1,4 +1,9 @@ |
756 |
<div id='paramlist'> |
<div id='paramlist'> |
757 |
+ <script> |
+ <script> |
762 |
<h2> |
<h2> |
763 |
%= l 'Params_for_IP_Retrieval' |
%= l 'Params_for_IP_Retrieval' |
764 |
</h2> |
</h2> |
765 |
@@ -11,7 +16,7 @@ |
@@ -7,11 +12,11 @@ |
766 |
|
<span class=label> |
767 |
|
%=l 'RETRIEVE_SSL' |
768 |
|
</span><span class=data> |
769 |
|
- % param retrievessl=>$ddc_datas->{"params"}->{"ssl"}; |
770 |
|
+ % param retrievessl=>$ddc_datas->{"params"}->{"ssl"} unless param 'retrievessl'; |
771 |
%=select_field retrievessl=>[['Yes'=>'yes'],['No'=>'no']] |
%=select_field retrievessl=>[['Yes'=>'yes'],['No'=>'no']] |
772 |
</span><br> |
</span><br> |
773 |
<span class=label> |
<span class=label> |
776 |
</span><span class=data> |
</span><span class=data> |
777 |
% param retrievedeamonupdate=>$ddc_datas->{"params"}->{"DeamonUpdate"}; |
% param retrievedeamonupdate=>$ddc_datas->{"params"}->{"DeamonUpdate"}; |
778 |
%=number_field 'retrievedeamonupdate',min=>0 |
%=number_field 'retrievedeamonupdate',min=>0 |
779 |
@@ -20,32 +25,88 @@ |
@@ -19,33 +24,112 @@ |
780 |
|
<span class=label> |
781 |
%=l 'RETRIEVE_METHOD' |
%=l 'RETRIEVE_METHOD' |
782 |
</span><span class=data> |
</span><span class=data> |
783 |
% param retrievemethod=>$ddc_datas->{"params"}->{"method"}; |
- % param retrievemethod=>$ddc_datas->{"params"}->{"method"}; |
784 |
- %=select_field retrievemethod=>$methodlabels |
- %=select_field retrievemethod=>$methodlabels |
785 |
- </span><br> |
- </span><br> |
786 |
- <span class=label> |
- <span class=label> |
787 |
|
- %=l 'RETRIEVE_IF' |
788 |
|
- </span><span class=data> |
789 |
|
- % param retrieveinterface=>$ddc_datas->{"params"}->{"Extinterface"}; |
790 |
|
- %=text_field 'retrieveinterface' |
791 |
|
- </span><br> |
792 |
|
- <span class=label> |
793 |
|
- %=l 'RETRIEVE_CMD' |
794 |
|
- </span><span class=data> |
795 |
|
- % param retrievecmd=>$ddc_datas->{"params"}->{"cmd"}; |
796 |
|
- %=text_field 'retrievecmd' |
797 |
|
- </span><br> |
798 |
|
- <span class=label> |
799 |
|
- %=l 'RETRIEVE_IP' |
800 |
|
- </span><span class=data> |
801 |
|
- % param retrieveip=>$ddc_datas->{"params"}->{"ForceIP"}; |
802 |
|
- %=text_field 'retrieveip' |
803 |
|
- </span><br> |
804 |
|
- <span class=label> |
805 |
|
- %=l 'RETRIEVE_URLCHECKIP' |
806 |
|
- </span><span class=data> |
807 |
|
- % param retrieveurlcheckip=>$ddc_datas->{"params"}->{"urlcheckip"}; |
808 |
|
- %=text_field 'retrieveurlcheckip' |
809 |
|
- </span><br> |
810 |
|
+ % param retrievemethod=>$ddc_datas->{"params"}->{"method"} unless param 'retrievemethod'; |
811 |
+ %=select_field retrievemethod=>$methodlabels,id=>"retrievemethod",onchange=>"SelectInput()" |
+ %=select_field retrievemethod=>$methodlabels,id=>"retrievemethod",onchange=>"SelectInput()" |
812 |
+ %= javascript begin |
+ %= javascript begin |
813 |
+ function SelectInput() { |
+ function SelectInput() { |
814 |
+ var method = document.querySelector("#retrievemethod"); |
+ var method = document.querySelector("#retrievemethod"); |
815 |
+ const types=['smeIF','smeCDB','web','router','if','ip','cmd','custom']; |
+ const types=['smeIF','smeCMD','web','router','if','ip','cmdv4','custom']; |
816 |
+ types.forEach((type)=>{ |
+ types.forEach((type)=>{ |
817 |
+ var service = document.querySelector(`.${type}`); |
+ var service = document.querySelector(`.${type}`); |
818 |
+ if (service != null) { |
+ if (service != null) { |
829 |
+ %# |
+ %# |
830 |
+ %# From here the one that is shown depends on the choice above |
+ %# From here the one that is shown depends on the choice above |
831 |
+ %# |
+ %# |
|
+ <div class = smeIF></div> |
|
|
+ <div class = smeIF></div> |
|
832 |
+ %# Only if "router" is chosen |
+ %# Only if "router" is chosen |
833 |
+ <div class = router> |
+ <div class = router> |
834 |
+ <span class=label> |
+ <span class=label> |
835 |
+ %=l 'Router type' |
+ %=l 'Router type' |
836 |
+ </span><span class=data> |
+ </span><span class=data> |
837 |
+ % param retrievemethod=>$ddc_datas->{"params"}->{"Extinterface"}; |
+ % param retrieverouter=>$ddc_datas->{"params"}->{"Extinterface"} unless param 'retrieverouter'; |
838 |
+ %=select_field retrievemethod=>$devices |
+ %=select_field retrieverouter=>$devices |
839 |
+ </span><br> |
+ </span><br> |
840 |
|
+ %# Need login and password for router |
841 |
|
+ <span class=label> |
842 |
|
+ %=l 'Router login' |
843 |
|
+ </span><span class=data> |
844 |
|
+ % param retrieverouterlogin=>$ddc_datas->{"params"}->{"FWLogin"} unless param 'retrieverouter'; |
845 |
|
+ %=text_field 'retrieverouterlogin' |
846 |
|
+ </span><br> |
847 |
|
+ <span class=label> |
848 |
|
+ %=l 'Router password' |
849 |
|
+ </span><span class=data> |
850 |
|
+ % param retrieverouterpassword=>$ddc_datas->{"params"}->{"FWPassword"} unless param 'retrieverouterpassword'; |
851 |
|
+ %=password_field 'retrieverouterpassword', id=>'ddcPass' |
852 |
|
+ %=label_for show=>"Show" |
853 |
|
+ %=check_box show=>1,onclick=>"showPass()",style=>"vertical-align:middle;" |
854 |
|
+ %= javascript begin |
855 |
|
+ function showPass() { |
856 |
|
+ var x = document.getElementById("ddcPass"); |
857 |
|
+ if (x.type === "password") { |
858 |
|
+ x.type = "text"; |
859 |
|
+ } else { |
860 |
|
+ x.type = "password"; |
861 |
|
+ } |
862 |
|
+ } |
863 |
|
+ % end |
864 |
|
+ </span><br> |
865 |
+ </div> |
+ </div> |
866 |
+ |
+ |
867 |
+ %# Only if "web" is chosen" |
+ %# Only if "web" is chosen" |
868 |
+ <div class = web> |
+ <div class = web> |
869 |
+ <span class=label> |
+ <span class=label> |
870 |
+ %=l 'Web service' |
+ %=l 'Web service' |
871 |
+ </span><span class=data> |
+ </span><span class=data> |
872 |
+ % param retrievemethod=>$ddc_datas->{"params"}->{"urlcheckip"}; |
+ % param retrievewebservice=>$ddc_datas->{"params"}->{"urlcheckip"} unless param 'retrievewebservice'; |
873 |
+ %=select_field retrievemethod=>$webservices |
+ %=select_field retrievewebservice=>$webservices |
874 |
+ </span><br> |
+ </span><br /> |
875 |
+ </div> |
+ </div> |
876 |
+ |
+ |
877 |
+ %# Only if "Interface" is chosen |
+ %# Only if "Interface" is chosen |
878 |
+ <div class=if> |
+ <div class=if> |
879 |
+ <span class=label Interface> |
+ <span class=label Interface> |
880 |
%=l 'RETRIEVE_IF' |
+ %=l 'RETRIEVE_IF' |
881 |
- </span><span class=data> |
+ </span><span class=data Interface> |
882 |
+ </span><span class=data Interface> |
+ % param retrieveinterface=>$ddc_datas->{"params"}->{"Extinterface"} unless param 'retrieveinterface'; |
883 |
% param retrieveinterface=>$ddc_datas->{"params"}->{"Extinterface"}; |
+ %=text_field 'retrieveinterface' |
884 |
%=text_field 'retrieveinterface' |
+ </span><br> |
|
</span><br> |
|
|
- <span class=label> |
|
885 |
+ </div> |
+ </div> |
886 |
+ |
+ |
887 |
+ %# Only if "cmd" is chosen |
+ %# Only if "cmd" is chosen |
888 |
+ <div class=cmd> |
+ <div class=cmdv4> |
889 |
+ <span class=label cmd> |
+ <span class=label cmd> |
890 |
%=l 'RETRIEVE_CMD' |
+ %=l 'RETRIEVE_CMD' |
891 |
- </span><span class=data> |
+ </span><span class=data cmd> |
892 |
+ </span><span class=data cmd> |
+ % param retrievecmd=>$ddc_datas->{"params"}->{"cmdv4"} unless param 'retrievecmd'; |
893 |
% param retrievecmd=>$ddc_datas->{"params"}->{"cmd"}; |
+ %=text_field 'retrievecmd' |
894 |
%=text_field 'retrievecmd' |
+ </span><br> |
|
</span><br> |
|
|
- <span class=label> |
|
895 |
+ </div> |
+ </div> |
896 |
+ |
+ |
897 |
+ %# Only if "ip" is chosen |
+ %# Only if "ip" is chosen |
898 |
+ <div class=ip> |
+ <div class=ip> |
899 |
+ <span class=label ip> |
+ <span class=label ip> |
900 |
%=l 'RETRIEVE_IP' |
+ %=l 'RETRIEVE_IP' |
901 |
- </span><span class=data> |
+ </span><span class=data ip> |
902 |
+ </span><span class=data ip> |
+ % param retrieveip=>$ddc_datas->{"params"}->{"ForceIP"} unless param 'retrieveip'; |
903 |
% param retrieveip=>$ddc_datas->{"params"}->{"ForceIP"}; |
+ %=text_field 'retrieveip' |
904 |
%=text_field 'retrieveip' |
+ </span><br> |
|
</span><br> |
|
|
- <span class=label> |
|
905 |
+ </div> |
+ </div> |
906 |
+ |
+ |
907 |
+ %# Only if "custom web service" |
+ %# Only if "custom web service" |
908 |
+ <div class=custom> |
+ <div class=custom> |
909 |
+ <span class=label customweb> |
+ <span class=label customweb> |
910 |
%=l 'RETRIEVE_URLCHECKIP' |
+ %=l 'RETRIEVE_URLCHECKIP' |
911 |
- </span><span class=data> |
+ </span><span class=data customweb> |
912 |
+ </span><span class=data customweb> |
+ % param retrieveurlcheckip=>$ddc_datas->{"params"}->{"urlcheckip"} unless param 'retrieveurlcheckip'; |
913 |
% param retrieveurlcheckip=>$ddc_datas->{"params"}->{"urlcheckip"}; |
+ %=text_field 'retrieveurlcheckip' |
914 |
%=text_field 'retrieveurlcheckip' |
+ </span><br> |
|
</span><br> |
|
915 |
+ </div> |
+ </div> |
916 |
|
|
917 |
%= submit_button "$btn", class => 'action' |
%= submit_button "$btn", class => 'action' |