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