_(IPv4 address assignment)_:
:
- =mk_option(_var($eth0,"USE_DHCP:$i"), 'yes', _('Automatic'))?>
- =mk_option(_var($eth0,"USE_DHCP:$i"), 'no', _('Static'))?>
- =mk_option(_var($eth0,"USE_DHCP:$i"), '', _('None'))?>
+ =mk_option(_var($eth0, "USE_DHCP:$i"), 'yes', _('Automatic'))?>
+ =mk_option(_var($eth0, "USE_DHCP:$i"), 'no', _('Static'))?>
+ =mk_option(_var($eth0, "USE_DHCP:$i"), '', _('None'))?>
-
>=$enable?>
+
>=$enable?>
:eth_ipv4_address_assignment_help:
_(IPv4 address)_:
-:
" class="narrow" pattern="=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/
+: " class="narrow" pattern="=$validIP4?>" title="_(IPv4 address A.B.C.D)_">/
$prefix) echo mk_option(_var($eth0,"NETMASK:$i"), $mask, $prefix, _var($eth0,"NETMASK:$i")=='' && $prefix=='24'?'selected':'');?>
@@ -838,19 +861,19 @@ _(IPv4 default gateway)_:
_(IPv6 address assignment)_:
:
- =mk_option(_var($eth0,"USE_DHCP6:$i"), 'yes', _('Automatic'))?>
- =mk_option(_var($eth0,"USE_DHCP6:$i"), 'no', _('Static'))?>
+ =mk_option(_var($eth0, "USE_DHCP6:$i"), 'yes', _('Automatic'))?>
+ =mk_option(_var($eth0, "USE_DHCP6:$i"), 'no', _('Static'))?>
0):?>
- =mk_option(_var($eth0,"USE_DHCP6:$i"), '', _('None'))?>
+ =mk_option(_var($eth0, "USE_DHCP6:$i"), '', _('None'))?>
-
>=$enable?>
+
>=$enable?>
:eth_ipv6_address_assignment_help:
_(IPv6 address)_:
-:
" pattern="=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/
" class="slim">
+:
" pattern="=$validIP6?>" title="_(IPv6 address nnnn:xxxx::yyyy)_">/
" class="slim">
:eth_ipv6_address_help:
@@ -866,8 +889,8 @@ _(IPv6 default gateway)_:
_(IPv6 privacy extensions)_:
:
- =mk_option(_var($eth0,"PRIVACY6:$i"), "0", _("Disabled"))?>
- =mk_option(_var($eth0,"PRIVACY6:$i"), "2", _("Enabled"))?>
+ =mk_option(_var($eth0, "PRIVACY6:$i"), "0", _("Disabled"))?>
+ =mk_option(_var($eth0, "PRIVACY6:$i"), "2", _("Enabled"))?>
:eth_ipv6_privacy_extensions_help:
@@ -879,34 +902,41 @@ _(IPv6 privacy extensions)_:
-:
+:
+
+
+
-
-=sprintf(_('Stop **%s** to make changes, see'),$service).' (
'._('Settings').' )'?>
+
+
+
+
=sprintf(_('Stop **%s** to make changes, see'), $service).' ('._('Settings').' )'?>
-
+
+
+:
+
+
@@ -114,6 +121,9 @@ _(Select language file)_:
-:
+:
+
+
+
diff --git a/emhttp/plugins/dynamix/ManagementAccess.page b/emhttp/plugins/dynamix/ManagementAccess.page
index e343cd7af..a2eae391c 100644
--- a/emhttp/plugins/dynamix/ManagementAccess.page
+++ b/emhttp/plugins/dynamix/ManagementAccess.page
@@ -4,7 +4,7 @@ Title="Management Access"
Icon="icon-key"
Tag="expeditedssl"
---
-
-
-function find_tasks() {
- global $site;
- $tasks = [];
- foreach ($site as $page) {
- if (empty($page['Menu'])) continue;
- $menu = strtok($page['Menu'], ' ');
- switch ($menu[0]) {
- case '$': $menu = get_ini_key($menu,strtok(' ')); break;
- case '/': $menu = get_file_key($menu,strtok(' ')); break;
+/dev/null|sed -n 's/ *commonName *= //p'");
- $cert2Issuer = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Issuer: //p'");
- $cert2Expires = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Not After : //p'");
- $isWildcardCert = preg_match('/.*\.myunraid\.net$/', $cert2Subject);
- $subject2URL = $cert2Subject;
- $dnsValid = false;
- $dnsRebindingProtection = false;
- if ($isWildcardCert) {
- exec("openssl x509 -checkend 2592000 -noout -in $cert2File 2>/dev/null", $arrout, $retval_expired);
- if (!$addr) {
- // if eth0 doesn't have an IP address, then show noip.hash.myunraid.net as a placeholder url
- $subject2URL = str_replace("*", 'noip', $subject2URL);
- $dnsValid = false;
- $dnsRebindingProtection = false;
- } elseif (strpos($addr, ":") === false) {
- // eth0 is IPv4
- $subject2URL = str_replace("*", str_replace(".", "-", $addr), $subject2URL);
- $rebindtest_ip = exec("host -4 -t A rebindtest4.myunraid.net 2>/dev/null|awk '{print \$4}'");
- $dnsRebindingProtection = ($rebindtest_ip != "192.168.42.42");
- if (!$dnsRebindingProtection) {
- $cert_ip = exec("host -4 -t A $subject2URL 2>/dev/null|awk '{print \$4}'");
- $dnsValid = $cert_ip==$addr;
- }
- } else {
- // eth0 is IPv6
- $subject2URL = str_replace("*", str_replace(":", "-", $addr), $subject2URL);
- $rebindtest_ip = exec("host -6 -t AAAA rebindtest6.myunraid.net 2>/dev/null|awk '{print \$4}'");
- // more: restore this after TTL expires
- // $dnsRebindingProtection = ($rebindtest_ip != "fd42::42");
- $dnsRebindingProtection = ($rebindtest_ip != "fd42::42") && ($rebindtest_ip != "fd42::");
- if (!$dnsRebindingProtection) {
- $cert_ip = exec("host -6 -t AAAA $subject2URL 2>/dev/null|awk '{print \$4}'");
- $dnsValid = $cert_ip==$addr;
- }
+ $cert2Subject = exec("/usr/bin/openssl x509 -in $cert2File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'");
+ $cert2Issuer = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Issuer: //p'");
+ $cert2Expires = exec("/usr/bin/openssl x509 -in $cert2File -noout -text | sed -n -e 's/^.*Not After : //p'");
+ $isWildcardCert = preg_match('/.*\.myunraid\.net$/', $cert2Subject);
+ $subject2URL = $cert2Subject;
+ $dnsValid = false;
+ $dnsRebindingProtection = false;
+ if ($isWildcardCert) {
+ exec("openssl x509 -checkend 2592000 -noout -in $cert2File 2>/dev/null", $arrout, $retval_expired);
+ if (!$addr) {
+ // if eth0 doesn't have an IP address, then show noip.hash.myunraid.net as a placeholder url
+ $subject2URL = str_replace("*", 'noip', $subject2URL);
+ $dnsValid = false;
+ $dnsRebindingProtection = false;
+ } elseif (strpos($addr, ":") === false) {
+ // eth0 is IPv4
+ $subject2URL = str_replace("*", str_replace(".", "-", $addr), $subject2URL);
+ $rebindtest_ip = exec("host -4 -t A rebindtest4.myunraid.net 2>/dev/null|awk '{print \$4}'");
+ $dnsRebindingProtection = ($rebindtest_ip != "192.168.42.42");
+ if (!$dnsRebindingProtection) {
+ $cert_ip = exec("host -4 -t A $subject2URL 2>/dev/null|awk '{print \$4}'");
+ $dnsValid = $cert_ip == $addr;
+ }
+ } else {
+ // eth0 is IPv6
+ $subject2URL = str_replace("*", str_replace(":", "-", $addr), $subject2URL);
+ $rebindtest_ip = exec("host -6 -t AAAA rebindtest6.myunraid.net 2>/dev/null|awk '{print \$4}'");
+ // more: restore this after TTL expires
+ // $dnsRebindingProtection = ($rebindtest_ip != "fd42::42");
+ $dnsRebindingProtection = ($rebindtest_ip != "fd42::42") && ($rebindtest_ip != "fd42::");
+ if (!$dnsRebindingProtection) {
+ $cert_ip = exec("host -6 -t AAAA $subject2URL 2>/dev/null|awk '{print \$4}'");
+ $dnsValid = $cert_ip == $addr;
+ }
+ }
}
- }
}
// Tailscale LE cert
$cert3File = "/boot/config/ssl/certs/ts_bundle.pem";
$cert3Present = file_exists("$cert3File");
if ($cert3Present) {
- $cert3Subject = exec("/usr/bin/openssl x509 -in $cert3File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'");
- $cert3Issuer = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Issuer: //p'");
- $cert3Expires = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Not After : //p'");
+ $cert3Subject = exec("/usr/bin/openssl x509 -in $cert3File -noout -subject -nameopt multiline 2>/dev/null|sed -n 's/ *commonName *= //p'");
+ $cert3Issuer = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Issuer: //p'");
+ $cert3Expires = exec("/usr/bin/openssl x509 -in $cert3File -noout -text | sed -n -e 's/^.*Not After : //p'");
}
// Note: this disables FQDN6 urls since they are not supported by myunraid.net DNS currently
-if (!empty($nginx['NGINX_LANFQDN6'])) unset($nginx['NGINX_LANFQDN6']);
+if (!empty($nginx['NGINX_LANFQDN6'])) {
+ unset($nginx['NGINX_LANFQDN6']);
+}
-$http_port = _var($var,'PORT','80') != '80' ? ":{$var['PORT']}" : '';
-$https_port = _var($var,'PORTSSL','443') != '443' ? ":{$var['PORTSSL']}" : '';
-$http_ip_url = 'http://'._var($nginx,'NGINX_LANIP').$http_port.'/';
-$https_ip_url = 'https://'._var($nginx,'NGINX_LANIP').$https_port.'/';
+$http_port = _var($var, 'PORT', '80') != '80' ? ":{$var['PORT']}" : '';
+$https_port = _var($var, 'PORTSSL', '443') != '443' ? ":{$var['PORTSSL']}" : '';
+$http_ip_url = 'http://'._var($nginx, 'NGINX_LANIP').$http_port.'/';
+$https_ip_url = 'https://'._var($nginx, 'NGINX_LANIP').$https_port.'/';
// bare IPv6 addresses need to be surrounded in brackets
-$http_ip6_url = 'http://'.'['._var($nginx,'NGINX_LANIP6').']'.$http_port.'/';
-$https_ip6_url = 'https://'.'['._var($nginx,'NGINX_LANIP6').']'.$https_port.'/';
-$http_mdns_url = 'http://'._var($nginx,'NGINX_LANMDNS').$http_port.'/';
-$https_mdns_url = 'https://'._var($nginx,'NGINX_LANMDNS').$https_port.'/';
-$https_fqdn_url = 'https://'._var($nginx,'NGINX_LANFQDN').$https_port.'/';
-$https_fqdn6_url = 'https://'._var($nginx,'NGINX_LANFQDN6').$https_port.'/';
+$http_ip6_url = 'http://'.'['._var($nginx, 'NGINX_LANIP6').']'.$http_port.'/';
+$https_ip6_url = 'https://'.'['._var($nginx, 'NGINX_LANIP6').']'.$https_port.'/';
+$http_mdns_url = 'http://'._var($nginx, 'NGINX_LANMDNS').$http_port.'/';
+$https_mdns_url = 'https://'._var($nginx, 'NGINX_LANMDNS').$https_port.'/';
+$https_fqdn_url = 'https://'._var($nginx, 'NGINX_LANFQDN').$https_port.'/';
+$https_fqdn6_url = 'https://'._var($nginx, 'NGINX_LANFQDN6').$https_port.'/';
$urls = [];
// push an array of five values into the $urls array:
@@ -150,94 +166,138 @@ $urls = [];
// 5 - self-signed certificate, or false
// define LAN access urls and redirects that change based on USE_SSL setting
-switch(_var($var,'USE_SSL','no')) {
-case 'no':
- if (!empty($nginx['NGINX_LANIP'])) $urls[] = ['LAN', $http_ip_url, null, null, false];
- if (!empty($nginx['NGINX_LANIP6'])) $urls[] = ['LAN', $http_ip6_url, null, null, false];
- if (!empty($nginx['NGINX_LANMDNS'])) $urls[] = ['LAN', $http_mdns_url, null, null, false];
- break;
-case 'yes':
- if (!empty($nginx['NGINX_LANIP'])) $urls[] = ['LAN', $http_ip_url, $https_ip_url, null, false];
- if (!empty($nginx['NGINX_LANIP'])) $urls[] = ['LAN', $https_ip_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
- if (!empty($nginx['NGINX_LANIP6'])) $urls[] = ['LAN', $http_ip6_url, $https_ip6_url, null, false];
- if (!empty($nginx['NGINX_LANIP6'])) $urls[] = ['LAN', $https_ip6_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
- if (!empty($nginx['NGINX_LANMDNS'])) $urls[] = ['LAN', $http_mdns_url, $https_mdns_url, null, false];
- if (!empty($nginx['NGINX_LANMDNS'])) $urls[] = ['LAN', $https_mdns_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
- break;
-case 'auto': // aka strict
- if (!empty($nginx['NGINX_LANIP']) && !empty($nginx['NGINX_LANFQDN'])) $urls[] = ['LAN', $http_ip_url, $https_fqdn_url, null, false];
- if (!empty($nginx['NGINX_LANIP6']) && !empty($nginx['NGINX_LANFQDN6'])) $urls[] = ['LAN', $http_ip6_url, $https_fqdn6_url, null, false];
- if (!empty($nginx['NGINX_LANMDNS']) && !empty($nginx['NGINX_LANFQDN'])) $urls[] = ['LAN', $http_mdns_url, $https_fqdn_url, null, false];
- break;
+switch (_var($var, 'USE_SSL', 'no')) {
+ case 'no':
+ if (!empty($nginx['NGINX_LANIP'])) {
+ $urls[] = ['LAN', $http_ip_url, null, null, false];
+ }
+ if (!empty($nginx['NGINX_LANIP6'])) {
+ $urls[] = ['LAN', $http_ip6_url, null, null, false];
+ }
+ if (!empty($nginx['NGINX_LANMDNS'])) {
+ $urls[] = ['LAN', $http_mdns_url, null, null, false];
+ }
+ break;
+ case 'yes':
+ if (!empty($nginx['NGINX_LANIP'])) {
+ $urls[] = ['LAN', $http_ip_url, $https_ip_url, null, false];
+ }
+ if (!empty($nginx['NGINX_LANIP'])) {
+ $urls[] = ['LAN', $https_ip_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
+ }
+ if (!empty($nginx['NGINX_LANIP6'])) {
+ $urls[] = ['LAN', $http_ip6_url, $https_ip6_url, null, false];
+ }
+ if (!empty($nginx['NGINX_LANIP6'])) {
+ $urls[] = ['LAN', $https_ip6_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
+ }
+ if (!empty($nginx['NGINX_LANMDNS'])) {
+ $urls[] = ['LAN', $http_mdns_url, $https_mdns_url, null, false];
+ }
+ if (!empty($nginx['NGINX_LANMDNS'])) {
+ $urls[] = ['LAN', $https_mdns_url, null, "{$var['NAME']}_unraid_bundle.pem", $cert1SelfSigned];
+ }
+ break;
+ case 'auto': // aka strict
+ if (!empty($nginx['NGINX_LANIP']) && !empty($nginx['NGINX_LANFQDN'])) {
+ $urls[] = ['LAN', $http_ip_url, $https_fqdn_url, null, false];
+ }
+ if (!empty($nginx['NGINX_LANIP6']) && !empty($nginx['NGINX_LANFQDN6'])) {
+ $urls[] = ['LAN', $http_ip6_url, $https_fqdn6_url, null, false];
+ }
+ if (!empty($nginx['NGINX_LANMDNS']) && !empty($nginx['NGINX_LANFQDN'])) {
+ $urls[] = ['LAN', $http_mdns_url, $https_fqdn_url, null, false];
+ }
+ break;
}
// define FQDN urls for each interface
// when multiple FQDN urls are available for a given interface, make sure they are sorted
asort($nginx);
foreach ($nginx as $key => $host) {
- if (!$host) continue;
- // Only process keys that include 'FQDN'
- if (strpos($key, 'FQDN') === false) continue;
- // Extract the interface from the key, e.g., 'NGINX_LANFQDN' -> 'LAN', 'NGINX_WANFQDN' -> 'WAN', NGINX_WG0FQDN -> WG, NGINX_TAILSCALE1FQDN -> TAILSCALE
- // Note: this specifically excludes FQDN6 urls since they are not supported by myunraid.net DNS currently
- if (preg_match('/^NGINX_([A-Z]+)(\d*)FQDN$/', $key, $matches)) {
- $interface = $matches[1]; // Interface type (LAN, WAN, WG, TAILSCALE, etc.)
- // ignore the WAN interface because we don't have access to the WANPORT here
- if ($interface == "WAN") continue;
- $pem = null;
- if (str_ends_with($host, '.myunraid.net')) $pem = 'certificate_bundle.pem';
- elseif (str_ends_with($host, '.ts.net')) $pem = 'ts_bundle.pem';
- $url = 'https://'.$host.$https_port."/";
- $urls[] = [$interface, $url, null, $pem, false];
- }
+ if (!$host) {
+ continue;
+ }
+ // Only process keys that include 'FQDN'
+ if (strpos($key, 'FQDN') === false) {
+ continue;
+ }
+ // Extract the interface from the key, e.g., 'NGINX_LANFQDN' -> 'LAN', 'NGINX_WANFQDN' -> 'WAN', NGINX_WG0FQDN -> WG, NGINX_TAILSCALE1FQDN -> TAILSCALE
+ // Note: this specifically excludes FQDN6 urls since they are not supported by myunraid.net DNS currently
+ if (preg_match('/^NGINX_([A-Z]+)(\d*)FQDN$/', $key, $matches)) {
+ $interface = $matches[1]; // Interface type (LAN, WAN, WG, TAILSCALE, etc.)
+ // ignore the WAN interface because we don't have access to the WANPORT here
+ if ($interface == "WAN") {
+ continue;
+ }
+ $pem = null;
+ if (str_ends_with($host, '.myunraid.net')) {
+ $pem = 'certificate_bundle.pem';
+ } elseif (str_ends_with($host, '.ts.net')) {
+ $pem = 'ts_bundle.pem';
+ }
+ $url = 'https://'.$host.$https_port."/";
+ $urls[] = [$interface, $url, null, $pem, false];
+ }
}
// determine whether there are urls for a given list of interfaces
-function has_urls(array $interfaces) {
- global $urls;
- foreach($urls as $url) {
- if (in_array($url[0], $interfaces)) return true;
- }
- return false;
+function has_urls(array $interfaces)
+{
+ global $urls;
+ foreach ($urls as $url) {
+ if (in_array($url[0], $interfaces)) {
+ return true;
+ }
+ }
+ return false;
}
// show all urls for a given list of interface
-function show_urls(array $interfaces) {
- global $urls;
- // 0 - type of url ['LAN','WLAN','WAN','WG','TAILSCALE']
- // 1 - the url
- // 3 - the url it redirects to, or null
- // 4 - the certificate file used, or null
- // 5 - self-signed certificate, or false
- $output = "";
- $linestart = " ";
- $lineend = " \n";
- $first = true;
- foreach($urls as $url) {
- if (in_array($url[0], $interfaces)) {
- $msg = "$url[1] ";
- if ($url[2]) $msg .= " "._("redirects to")." $url[2] ";
- if ($url[3]) $msg .= " "._("uses")." ".$url[3];
- if ($url[4]) $msg .= " "._("is a self-signed certificate, ignore the browser's warning and proceed to the GUI")." ";
- // 2nd+ urls need leading $linestart
- $output .= ($first ? "" : $linestart).$msg.$lineend;
- $first = false;
+function show_urls(array $interfaces)
+{
+ global $urls;
+ // 0 - type of url ['LAN','WLAN','WAN','WG','TAILSCALE']
+ // 1 - the url
+ // 3 - the url it redirects to, or null
+ // 4 - the certificate file used, or null
+ // 5 - self-signed certificate, or false
+ $output = "";
+ $linestart = " ";
+ $lineend = " \n";
+ $first = true;
+ foreach ($urls as $url) {
+ if (in_array($url[0], $interfaces)) {
+ $msg = "$url[1] ";
+ if ($url[2]) {
+ $msg .= " "._("redirects to")." $url[2] ";
+ }
+ if ($url[3]) {
+ $msg .= " "._("uses")." ".$url[3];
+ }
+ $msg .= " ";
+ if ($url[4]) {
+ $msg .= " "._("is a self-signed certificate, ignore the browser's warning and proceed to the GUI")." ";
+ }
+ // 2nd+ urls need leading $linestart
+ $output .= ($first ? "" : $linestart).$msg.$lineend;
+ $first = false;
+ }
}
- }
- if ($first) {
- $output = "none";
- } else {
- // strip final trailing $lineend as it will be added by markdown
- $output = substr($output, 0, strlen($lineend)*-1);
- }
- echo $output;
+ if ($first) {
+ $output = "none";
+ } else {
+ // strip final trailing $lineend as it will be added by markdown
+ $output = substr($output, 0, strlen($lineend) * -1);
+ }
+ echo $output;
}
-$cert_time_format = $display['date'].($display['date']!='%c' ? ', '.str_replace(['%M','%R'],['%M:%S','%R:%S'],$display['time']):'');
+$cert_time_format = $display['date'].($display['date'] != '%c' ? ', '.str_replace(['%M','%R'], ['%M:%S','%R:%S'], $display['time']) : '');
$provisionlabel = $isWildcardCert ? _('Renew') : _('Provision');
-$disabled_provision = $keyfile===false || ($isWildcardCert && $retval_expired===0) || !$addr ? 'disabled' : '';
+$disabled_provision = $keyfile === false || ($isWildcardCert && $retval_expired === 0) || !$addr ? 'disabled' : '';
$disabled_provision_msg = !$addr ? _('Ensure the primary network card eth0 has an IP address.') : '';
-$disabled_delete = $cert2Present && $var['USE_SSL']!='auto' ? '' : 'disabled';
+$disabled_delete = $cert2Present && $var['USE_SSL'] != 'auto' ? '' : 'disabled';
$disabled_auto = $isWildcardCert && !$dnsRebindingProtection && $dnsValid ? '' : 'disabled';
// Get ports in use
@@ -246,14 +306,20 @@ exec("lsof -Pni|awk '/LISTEN/ && \$9!~/127.0.0.1/ && \$9!~/\\[::1\\]/{print \$9}
$bind = false; //= $var['BIND_MGT']=='yes'; - not used in 6.10
$list = ['*'];
-if ($addr) array_push($list, $addr);
+if ($addr) {
+ array_push($list, $addr);
+}
foreach ($output as $line) {
- [$ip, $port] = my_explode($line[0]=='[' ? ']:' : ':',$line);
- if ($ip[0]=='[') $ip = substr($ip,1); // ipv6 address
- if (!in_array($port,$portsInUse) && (!$bind || in_array($ip,$list))) $portsInUse[] = $port;
+ [$ip, $port] = my_explode($line[0] == '[' ? ']:' : ':', $line);
+ if ($ip[0] == '[') {
+ $ip = substr($ip, 1);
+ } // ipv6 address
+ if (!in_array($port, $portsInUse) && (!$bind || in_array($ip, $list))) {
+ $portsInUse[] = $port;
+ }
}
-sort($portsInUse,SORT_NUMERIC);
+sort($portsInUse, SORT_NUMERIC);
?>
_(Local access URLs)_:
-: show_urls(['LAN','WLAN']); ?>
+:
:mgmt_local_access_urls_help:
_(WireGuard URLs)_:
-: show_urls(['WG']); ?>
+:
:mgmt_wg_access_urls_help:
@@ -424,7 +494,7 @@ _(WireGuard URLs)_:
_(Tailscale URLs)_:
-: show_urls(['TAILSCALE']); ?>
+:
:mgmt_tailscale_access_urls_help:
@@ -439,11 +509,9 @@ _(Self-signed or user-provided certificate)_:
_(Certificate URL)_:
: ="$cert1URL "?>
-
_(Certificate URL)_:
: =$cert1URL?>
-
_(Certificate URL)_:
: _(Certificate not valid for)_ =$cert1URL?>
@@ -456,7 +524,7 @@ _(Certificate issuer)_:
_(Certificate expiration)_:
-: =_(my_date($cert_time_format, strtotime($cert1Expires)),0)?>
+: =_(my_date($cert_time_format, strtotime($cert1Expires)), 0)?>
_(Self-signed certificate file)_:
@@ -464,8 +532,9 @@ _(Self-signed certificate file)_:
-
diff --git a/emhttp/plugins/dynamix/NetworkRules.page b/emhttp/plugins/dynamix/NetworkRules.page
index 0bd8bcd62..aa5c1b257 100644
--- a/emhttp/plugins/dynamix/NetworkRules.page
+++ b/emhttp/plugins/dynamix/NetworkRules.page
@@ -71,7 +71,10 @@ _(Interface)_ =$eth?>:
-:
+:
+
+
+
:eth_network_rules_help:
diff --git a/emhttp/plugins/dynamix/NewConfig.page b/emhttp/plugins/dynamix/NewConfig.page
index e4d3651ef..0f3205335 100644
--- a/emhttp/plugins/dynamix/NewConfig.page
+++ b/emhttp/plugins/dynamix/NewConfig.page
@@ -58,23 +58,34 @@ effect of making it ***impossible*** to rebuild an existing failed drive - you h
:end
-
+
-_(Preserve current assignments)_:
-
-_(All)_
-=mk_option_check(0,'array',_('Array slots'))?>
-=mk_option_check(0,'cache',_('Pool slots'))?>
-
-
-
-
-_(Array has been **Reset**)_ (_(please configure)_)
-
-_(Array must be **Stopped** to change)_
-
-_(Yes, I want to do this)_
-
+_(Preserve current assignments)_:
+:
+ _(All)_
+ =mk_option_check(0,'array',_('Array slots'))?>
+ =mk_option_check(0,'cache',_('Pool slots'))?>
+
+
+
+:
+
+ _(Array has been **Reset**)_ (_(please configure)_)
+
+ _(Array must be **Stopped** to change)_
+
+
+
+ _(Yes, I want to do this)_
+
+
+
+
+
+:
+
+
+
diff --git a/emhttp/plugins/dynamix/NotificationAgents.page b/emhttp/plugins/dynamix/NotificationAgents.page
index dfb7e2bec..2ec66f7e4 100644
--- a/emhttp/plugins/dynamix/NotificationAgents.page
+++ b/emhttp/plugins/dynamix/NotificationAgents.page
@@ -126,7 +126,7 @@ foreach ($xml_files as $xml_file) {
}
}
foreach (explode(PHP_EOL,(String) $xml->Script) as $line) if (trim($line)) $script .= trim($line)."{1}";
- echo ' '.str_replace('_',' ',$name).''.(is_file($enabledAgent) ? ''._("Enabled").' ' : ''._("Disabled").' ').' ';
+ echo ' '.str_replace('_',' ',$name).''.(is_file($enabledAgent) ? ''._("Enabled").' ' : ''._("Disabled").' ').' ';
echo '';
echo ' ';
echo ' ';
diff --git a/emhttp/plugins/dynamix/Notifications.page b/emhttp/plugins/dynamix/Notifications.page
index 22e485de7..a31c737b5 100644
--- a/emhttp/plugins/dynamix/Notifications.page
+++ b/emhttp/plugins/dynamix/Notifications.page
@@ -111,8 +111,9 @@ $(function(){
+
_(Notifications display)_:
-:
+:
=mk_option($notify['display'], "0", _("Detailed"))?>
=mk_option($notify['display'], "1", _("Summarized"))?>
@@ -120,7 +121,7 @@ _(Notifications display)_:
:notifications_display_help:
_(Display position)_:
-:
+:
=mk_option($notify['position'], "top-left", _("top-left"))?>
=mk_option($notify['position'], "top-right", _("top-right"))?>
=mk_option($notify['position'], "bottom-left", _("bottom-left"))?>
@@ -131,12 +132,13 @@ _(Display position)_:
:notifications_display_position_help:
_(Auto-close)_ (_(seconds)_):
-: _(a value of zero means no automatic closure)_
+:
+ _(a value of zero means no automatic closure)_
:notifications_auto_close_help:
_(Date format)_:
-:
+:
=mk_option($notify['date'], "d-m-Y", _("DD-MM-YYYY"))?>
=mk_option($notify['date'], "m-d-Y", _("MM-DD-YYYY"))?>
=mk_option($notify['date'], "Y-m-d", _("YYYY-MM-DD"))?>
@@ -145,7 +147,7 @@ _(Date format)_:
:notifications_date_format_help:
_(Time format)_:
-:
+:
=mk_option($notify['time'], "h:i A", _("12 hours"))?>
=mk_option($notify['time'], "H:i", _("24 hours"))?>
@@ -153,7 +155,7 @@ _(Time format)_:
:notifications_time_format_help:
_(Store notifications to flash)_:
-:
+:
=mk_option($notify['path'], "/tmp/notifications", _("No"))?>
=mk_option($notify['path'], "/boot/config/plugins/dynamix/notifications", _("Yes"))?>
@@ -161,7 +163,7 @@ _(Store notifications to flash)_:
:notifications_store_flash_help:
_(System notifications)_:
-:
+:
=mk_option($notify['system'], "", _("Disabled"))?>
=mk_option($notify['system'], "*/1 * * * *", _("Enabled"))?>
@@ -169,7 +171,7 @@ _(System notifications)_:
:notifications_system_help:
_(Unraid OS update notification)_:
-:
+:
=mk_option($notify['unraidos'], "", _("Never check"))?>
=mk_option($notify['unraidos'], "11 */6 * * *", _("Check four times a day"))?>
=mk_option($notify['unraidos'], "11 0,12 * * *", _("Check twice a day"))?>
@@ -181,7 +183,7 @@ _(Unraid OS update notification)_:
:notifications_os_update_help:
_(Plugins update notification)_:
-:
+:
=mk_option($notify['version'], "", _("Never check"))?>
=mk_option($notify['version'], "10 */6 * * *", _("Check four times a day"))?>
=mk_option($notify['version'], "10 0,12 * * *", _("Check twice a day"))?>
@@ -193,7 +195,7 @@ _(Plugins update notification)_:
:notifications_plugins_update_help:
_(Docker update notification)_:
-:
+:
=mk_option($notify['docker_update'], "", _("Never check"))?>
=mk_option($notify['docker_update'], "10 */6 * * *", _("Check four times a day"))?>
=mk_option($notify['docker_update'], "10 0,12 * * *", _("Check twice a day"))?>
@@ -205,7 +207,7 @@ _(Docker update notification)_:
:notifications_docker_update_help:
_(Language update notification)_:
-:
+:
=mk_option($notify['language_update'], "", _("Never check"))?>
=mk_option($notify['language_update'], "10 */6 * * *", _("Check four times a day"))?>
=mk_option($notify['language_update'], "10 0,12 * * *", _("Check twice a day"))?>
@@ -215,7 +217,7 @@ _(Language update notification)_:
_(Array status notification)_:
-:
+:
=mk_option($notify['status'], "", _("Never send"))?>
=mk_option($notify['status'], "20 * * * *", _("Send every hour"))?>
=mk_option($notify['status'], "20 */2 * * *", _("Send every two hours"))?>
@@ -230,57 +232,140 @@ _(Array status notification)_:
:notifications_array_status_help:
-: _(Unraid OS update)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Unraid OS update)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
+
-: _(Plugins update)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Plugins update)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
+
-: _(Docker update)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Docker update)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
+
-: _(Language update)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Language update)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
+
-: _(Array status)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Array status)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
+
+
:notifications_agent_selection_help:
_(Notification entity)_:
-: _(Notices)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Notices)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
+
-: _(Warnings)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Warnings)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
+
-: _(Alerts)_
- >_(Browser)_
- >_(Email)_
- >_(Agents)_
+:
+ _(Alerts)_
+
+
+ >_(Browser)_
+
+
+ >_(Email)_
+
+
+ >_(Agents)_
+
+
:notifications_classification_help:
-:
+:
+
+
+
diff --git a/emhttp/plugins/dynamix/NotificationsArchive.page b/emhttp/plugins/dynamix/NotificationsArchive.page
index 06cf7fb56..0ca457c94 100644
--- a/emhttp/plugins/dynamix/NotificationsArchive.page
+++ b/emhttp/plugins/dynamix/NotificationsArchive.page
@@ -101,8 +101,24 @@ $(function(){
// Adjust the width of thead cells when window resizes
-
-_(Time)_ _(Event)_ _(Subject)_ _(Description)_ _(Importance)_
-
-
+
+
+
+
+
+ _(Time)_
+ _(Event)_
+ _(Subject)_
+ _(Description)_
+ _(Importance)_
+
+
+
+
+
+
+
+
+
+
diff --git a/emhttp/plugins/dynamix/OpenDevices.page b/emhttp/plugins/dynamix/OpenDevices.page
index f187aeb49..a341465b1 100644
--- a/emhttp/plugins/dynamix/OpenDevices.page
+++ b/emhttp/plugins/dynamix/OpenDevices.page
@@ -25,15 +25,30 @@ $('=$tabX?>').bind({click:function() {$('i.toggle').show('slow');}});
-
-_(Device)_ _(Identification)_ =$power?>_(Temp)_ _(Reads)_ _(Writes)_ _(Errors)_ _(FS)_ _(Size)_ _(Used)_ _(Free)_
-
-
-foreach ($devs as $dev):
- echo " ";
-endforeach;
-?>
-
-
+
+
+
+
+ _(Device)_
+ _(Identification)_
+ =$power?>_(Temp)_
+ _(Reads)_
+ _(Writes)_
+ _(Errors)_
+ _(FS)_
+ _(Size)_
+ _(Used)_
+ _(Free)_
+
+
+
+
+ foreach ($devs as $dev):
+ echo " ";
+ endforeach;
+ ?>
+
+
+
:open_devices_help:
diff --git a/emhttp/plugins/dynamix/OutgoingProxy.page b/emhttp/plugins/dynamix/OutgoingProxy.page
index bae4eac28..e48cb584a 100644
--- a/emhttp/plugins/dynamix/OutgoingProxy.page
+++ b/emhttp/plugins/dynamix/OutgoingProxy.page
@@ -63,9 +63,11 @@ $proxy_3_url = $url_array['full_url'];
-_(Enable Outgoing Proxy)_
+_(Enable Outgoing Proxy)_
+:
+
_(Select Proxy)_:
-:
+:
=mk_option($cfg['proxy_active'], "0", "_(None)_");?>
=mk_option($cfg['proxy_active'], "1", htmlspecialchars($cfg['proxy_name_1']), "disabled");?>
@@ -88,16 +90,20 @@ _(Select Proxy)_:
> For a more comprehensive solution you might consider setting up _(VPN tunnel access for System)_ .
:end
-_(Outgoing Proxy)_ 1
+
+_(Outgoing Proxy)_ 1
+:
+
_(Name)_:
-:
+:
+
:outgoing_proxy_name_plug:
> Outgoing Proxy name for this Proxy.
:end
_(URL)_:
-:
+:
:outgoing_proxy_url_plug:
> Outgoing Proxy URL for this Proxy. The URL can be entered with or without credentials. The credentials will be parsed from the URL.
@@ -106,29 +112,33 @@ _(URL)_:
:end
_(User)_:
-:
+:
:outgoing_proxy_user_plug:
> Outgoing Proxy User Name for this Proxy.
:end
_(Password)_:
-:
+:
:outgoing_proxy_password_plug:
> Outgoing Proxy Password for this Proxy.
:end
+
+
+
+
+
+_(Outgoing Proxy)_ 3
+:
+
_(Name)_:
-:
+:
:outgoing_proxy_name_plug:
> Outgoing Proxy name for this Proxy.
:end
_(URL)_:
-:
+:
:outgoing_proxy_url_plug:
> Outgoing Proxy URL for this Proxy. The URL can be entered with or without credentials. The credentials will be parsed from the URL.
@@ -168,21 +183,26 @@ _(URL)_:
:end
_(User)_:
-:
+:
:outgoing_proxy_user_plug:
> Outgoing Proxy User Name for this Proxy.
:end
_(Password)_:
-:
+:
:outgoing_proxy_password_plug:
> Outgoing Proxy Password for this Proxy.
:end
+
+
-:
+:
+
+
+
-
-_(Protocol)_ _(Route)_ _(Gateway)_ _(Metric)_ _(Delete)_
-
-
+
+
+
+
+ _(Protocol)_
+ _(Route)_
+ _(Gateway)_
+ _(Metric)_
+ _(Delete)_
+
+
+
+
+
@@ -63,11 +77,16 @@ _(Enter route + gateway + metric)_:
:
"?>
- *_(optional metric (lowest is preferred))_*
+
+ *_(optional metric (lowest is preferred))_*
+
:eth_routing_table_help:
-:
+:
+
+
+
diff --git a/emhttp/plugins/dynamix/SMBActiveDirectory.page b/emhttp/plugins/dynamix/SMBActiveDirectory.page
index 1952ae5bf..8f6d4d164 100644
--- a/emhttp/plugins/dynamix/SMBActiveDirectory.page
+++ b/emhttp/plugins/dynamix/SMBActiveDirectory.page
@@ -48,5 +48,8 @@ _(AD initial group)_:
:
-:
+:
+
+
+
\ No newline at end of file
diff --git a/emhttp/plugins/dynamix/SMBExtras.page b/emhttp/plugins/dynamix/SMBExtras.page
index ffeeaefc9..483b78a16 100644
--- a/emhttp/plugins/dynamix/SMBExtras.page
+++ b/emhttp/plugins/dynamix/SMBExtras.page
@@ -36,7 +36,11 @@ _(Samba extra configuration)_:
: " maxlength="2048" name="text" disabled>=htmlspecialchars($text)?>
-: *_(Array must be **Stopped** to change)_*
+:
+
+
+
+*_(Array must be **Stopped** to change)_*
:smb_extra_button_help:
diff --git a/emhttp/plugins/dynamix/SMBWorkGroup.page b/emhttp/plugins/dynamix/SMBWorkGroup.page
index 7d0ceaf94..279fb27d1 100644
--- a/emhttp/plugins/dynamix/SMBWorkGroup.page
+++ b/emhttp/plugins/dynamix/SMBWorkGroup.page
@@ -32,5 +32,9 @@ _(Local master)_:
-: *_(Array must be **Stopped** to change)_*
+:
+
+
+
+*_(Array must be **Stopped** to change)_*
diff --git a/emhttp/plugins/dynamix/SMBsettings.page b/emhttp/plugins/dynamix/SMBsettings.page
index 8f1587237..f7e4a6f8e 100644
--- a/emhttp/plugins/dynamix/SMBsettings.page
+++ b/emhttp/plugins/dynamix/SMBsettings.page
@@ -71,7 +71,11 @@ _(WSD options [experimental])_:
:smb_wsd_options_help:
-: *_(Array must be **Stopped** to change)_*
+:
+
+
+
+*_(Array must be **Stopped** to change)_*
-
+
+
+:
:syslinux_cfg_help:
@@ -194,25 +194,38 @@ _(Syslinux configuration)_:
$label = ($i) ? array_shift($area):$title;
$start = in_array($menu,$area);
if ($start) unset($area[array_search($menu,$area)]);
-?>=htmlspecialchars($label)?>
- title="_(Set default boot menu)_" onchange="changeMenu(this.form,this.id,true)">
-
+?>
+
+
+ title="_(Set default boot menu)_" onchange="changeMenu(this.form,this.id,true)">
+ =htmlspecialchars($label)?>
+
+
+
+
_(Syslinux configuration)_:
-: " maxlength="2048">=htmlspecialchars($current)?>
+: " maxlength="2048">=htmlspecialchars($current)?>
_(Server boot mode)_:
: =is_dir('/sys/firmware/efi') ? 'UEFI' : 'Legacy'?>
-_(Permit UEFI boot mode)_
>
-: *_(Boot system in UEFI mode)_. _(Please check your system settings to support UEFI boot mode)_.*
+_(Boot system in UEFI mode)_:
+:
+ >
+ _(Permit UEFI boot mode)_
+
+ *_(Please check your system settings to support UEFI boot mode)_.*
-:
+:
+
+
+
:syslinux_button_help:
diff --git a/emhttp/plugins/dynamix/SyslogSettings.page b/emhttp/plugins/dynamix/SyslogSettings.page
index 0914c7088..16b613a9c 100644
--- a/emhttp/plugins/dynamix/SyslogSettings.page
+++ b/emhttp/plugins/dynamix/SyslogSettings.page
@@ -181,5 +181,8 @@ _(Copy syslog to flash on shutdown)_:
:syslog_shutdown_flash_help:
-:
+:
+
+
+
diff --git a/emhttp/plugins/dynamix/TrimSettings.page b/emhttp/plugins/dynamix/TrimSettings.page
index 8cb8807af..ec77ca257 100644
--- a/emhttp/plugins/dynamix/TrimSettings.page
+++ b/emhttp/plugins/dynamix/TrimSettings.page
@@ -123,5 +123,9 @@ _(Time of the day)_:
:end
-:
+:
+
+
+
+
diff --git a/emhttp/plugins/dynamix/UserAdd.page b/emhttp/plugins/dynamix/UserAdd.page
index e32f64c22..3e542e540 100644
--- a/emhttp/plugins/dynamix/UserAdd.page
+++ b/emhttp/plugins/dynamix/UserAdd.page
@@ -156,21 +156,28 @@ _(Description)_:
:user_add_description_help:
_(Custom image)_:
-:
=$void?> _(Drag-n-drop a PNG file or click the image at the left)_
+:
+ =$void?>
+ _(Drag-n-drop a PNG file or click the image at the left)_
+
+
:user_add_custom_image_help:
_(Password)_:
-
-:
+:
+
:user_password_help:
_(Retype password)_:
-
-:
+:
+
-:
+:
+
+
+
diff --git a/emhttp/plugins/dynamix/UserEdit.page b/emhttp/plugins/dynamix/UserEdit.page
index ad044a999..498976d20 100644
--- a/emhttp/plugins/dynamix/UserEdit.page
+++ b/emhttp/plugins/dynamix/UserEdit.page
@@ -169,6 +169,7 @@ $(function(){
)">
+
_(User name)_:
: =htmlspecialchars($name)?>
@@ -178,13 +179,16 @@ _(Description)_:
:user_edit_description_help:
_(Custom image)_:
-:
+:
+
=$icon?>
=$void?>
- _(Drag-n-drop a PNG file or click the image at the left)_
+
+
+ _(Drag-n-drop a PNG file or click the image at the left)_
:user_edit_custom_image_help:
@@ -193,35 +197,46 @@ _(Custom image)_:
_(Delete)_
-:
+:
+
+
+
+
_(Password)_:
-
-:
+:
+
:user_password_help:
_(Retype password)_:
-
-:
+:
+
-:
+:
+
+
+
+
_(SSH authorized keys)_:
: " maxlength="16384" name="text" style="resize:none;white-space:normal;font-family:bitstream;width:65.5%">=htmlspecialchars($text)?>
-:
+:
+
+
+
@@ -318,6 +333,9 @@ echo "";
?>
-:
+:
+
+
+
diff --git a/emhttp/plugins/dynamix/UserList.page b/emhttp/plugins/dynamix/UserList.page
index 963e6ee6a..806a3235b 100644
--- a/emhttp/plugins/dynamix/UserList.page
+++ b/emhttp/plugins/dynamix/UserList.page
@@ -13,26 +13,48 @@ Tag="users"
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
-?>
-
ksort($users);
?>
-
_(Management Access)_
-$img = "/boot/config/plugins/dynamix/users/root.png"?>
-
-
-
_(Shares Access)_
-
-
-$img = "/boot/config/plugins/dynamix/users/{$user['name']}.png"?>
-
-
-
-
-_(No users are defined)_. _(Click **Add User** to create a user for remote shares access)_
+
+
+ _(Management Access)_
+
+
+
+ $img = "/boot/config/plugins/dynamix/users/root.png"?>
+
+
+
+
+ _(Shares Access)_
+
+
+
+
_(No users are defined)_. _(Click **Add User** to create a user for remote shares access)_
+
+
+
+
+ $img = "/boot/config/plugins/dynamix/users/{$user['name']}.png"?>
+
+
+
-
-
-
+
+
diff --git a/emhttp/plugins/dynamix/WG0.page b/emhttp/plugins/dynamix/WG0.page
index e21ac8820..23d2e3b58 100644
--- a/emhttp/plugins/dynamix/WG0.page
+++ b/emhttp/plugins/dynamix/WG0.page
@@ -503,6 +503,7 @@ function clearTunnel(vtun) {
}
function addTunnel() {
+ console.log('addTunnel');
$.post('/webGui/include/update.wireguard.php',{'#cmd':'addtunnel','#name':'=$tower?>'},function(){refresh();});
}
@@ -1048,20 +1049,20 @@ function getPublicIP(ip,wg,protocol) {
var ext_ipv6 = ips[3];
if ((protocol==''||protocol=='46') && ext_ipv4 && ip) {
if (!wgx_ipv4) {
- if (!wgx_ipv6) $('#endpoint4-'+wg).html("
_(Remark)_: _(The Local endpoint does not resolve to an IPv4 address)_. _(In most cases, this should be your public WAN IPv4)_: "+ext_ipv4+" \n").show();
+ if (!wgx_ipv6) $('#endpoint4-'+wg).html("
_(Remark)_: _(The Local endpoint does not resolve to an IPv4 address)_. _(In most cases, this should be your public WAN IPv4)_: "+ext_ipv4+" \n").show();
} else if (wgx_ipv4 != ext_ipv4) {
- $('#endpoint4-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv4+". _(In most cases, this should be your public WAN IPv4 instead)_: "+ext_ipv4+" \n").show();
+ $('#endpoint4-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv4+". _(In most cases, this should be your public WAN IPv4 instead)_: "+ext_ipv4+" \n").show();
} else if (endpoints.includes(wgx_ipv4) && isPublic(wgx_ipv4)) {
- $('#endpoint4-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv4+". _(Your Unraid Server is reachable from the internet)_ \n").show();
+ $('#endpoint4-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv4+". _(Your Unraid Server is reachable from the internet)_ \n").show();
}
}
if ((protocol=='6'||protocol=='46') && ext_ipv6 && ip) {
if (!wgx_ipv6) {
- if (!wgx_ipv4) $('#endpoint6-'+wg).html("
_(Remark)_: _(The Local endpoint does not resolve to an IPv6 address)_. _(In most cases, this should be your public WAN IPv6)_: "+ext_ipv6+" \n").show();
+ if (!wgx_ipv4) $('#endpoint6-'+wg).html("
_(Remark)_: _(The Local endpoint does not resolve to an IPv6 address)_. _(In most cases, this should be your public WAN IPv6)_: "+ext_ipv6+" \n").show();
} else if (wgx_ipv6 != ext_ipv6) {
- $('#endpoint6-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv6+". _(In most cases, this should be your public WAN IPv6 instead)_: "+ext_ipv6+" \n").show();
+ $('#endpoint6-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv6+". _(In most cases, this should be your public WAN IPv6 instead)_: "+ext_ipv6+" \n").show();
} else if (endpoints.includes(wgx_ipv6)) {
- $('#endpoint6-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv6+". _(Your Unraid Server is reachable from the internet)_ \n").show();
+ $('#endpoint6-'+wg).html("
_(Remark)_: _(The Local endpoint resolves to)_ "+wgx_ipv6+". _(Your Unraid Server is reachable from the internet)_ \n").show();
}
}
@@ -1111,14 +1112,16 @@ statistics.on('message', function(data) {
$(function(){
var form = $(document.wg0);
- var ctrl = "
";
- ctrl += "
_(Autostart)_ >";
- ctrl += "
";
- ctrl += "
";
+ var ctrl = "
";
+ ctrl += "_(Autostart)_ > ";
+ ctrl += " ";
+ ctrl += " ";
+ ctrl += " ";
+ ctrl += " ";
statistics.start();
getPublicIP($('#endpoint-wg0').val(),'wg0',$('#protocol-wg0').val());
- $('div.content').prepend('
>
');
- $('div.title').eq(0).find('span.left').append(ctrl);
+ $('div.content').prepend('
');
+ $('div.title').eq(0).find('.right').append(ctrl);
$.post('/webGui/include/update.wireguard.php',{'#cmd':'upnp','#gw':"=$$ethX['GATEWAY:0']?>",'#link':"=$link?>"},function(url){
if (url) {
$('div.upnp').show();
@@ -1265,30 +1268,40 @@ $(function(){
+
_(Local name)_:
-:
" pattern="=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
-
-
-
+:
+ " pattern="=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
+
+
+
+
+
+
:wg_local_name_help:
-
':'>'?>
+
_(Local private key)_:
-:
-
+:
+
+
+
:wg_generate_keypair_help:
_(Local public key)_:
-:
+:
+
+
+
:wg_generate_keypair_help:
_(Network protocol)_:
-:
+:
=mk_option(_var($wg0,'PROT:0'), "", "_(IPv4 only)_")?>
=mk_option(_var($wg0,'PROT:0'), "6", "_(IPv6 only)_")?>
=mk_option(_var($wg0,'PROT:0'), "46", "_(IPv4 + IPv6)_")?>
@@ -1296,74 +1309,94 @@ _(Network protocol)_:
_(Local tunnel network pool)_:
-
-: /
-
+:
+
+
+ /
+
+
_(Local tunnel network pool IPv6)_:
-
-: /
-
+:
+
+
+ /
+
+
:wg_local_tunnel_network_pool_help:
_(Local tunnel address)_:
-:
+:
:wg_local_tunnel_address_help:
_(Local tunnel address IPv6)_:
-:
+:
:wg_local_tunnel_address_help:
_(Local endpoint)_:
-:
:
-
-
-
+:
+
+ :
+
+
+
+
+
+
:wg_local_endpoint_help:
_(Local server uses NAT)_:
-:
+:
=mk_option(_var($wg0,'NAT:0'), "", _("Yes"))?>
=mk_option(_var($wg0,'NAT:0'), "no", _("No"))?>
-
-
_(Remark)_: _(configure your router with a static route of)_ **=_var($wg0,'Network:0')?>** _(to)_ **=$server?>** _(Remark)_: _(docker containers on custom networks need static routing)_ **=_var($wg0,'Network:0')?>** _(to)_ **=$server?>**
+
+
_(Remark)_: _(configure your router with a static route of)_ **=_var($wg0,'Network:0')?>** _(to)_ **=$server?>**
+
_(Remark)_: _(docker containers on custom networks need static routing)_ **=_var($wg0,'Network:0')?>** _(to)_ **=$server?>**
:wg_local_server_uses_nat_help:
_(Local gateway uses UPnP)_:
-:
+:
=mk_option(_var($wg0,'UPNP:0'), "", _("Yes"))?>
=mk_option(_var($wg0,'UPNP:0'), "no", _("No"))?>
-
+
:wg_local_gateway_uses_upnp_help:
_(Local tunnel firewall)_:
-:
- _(Rule)_:
- =mk_option(_var($wg0,'RULE:0'), "", _("Deny"))?>
- =mk_option(_var($wg0,'RULE:0'), "1", _("Allow"))?>
-
+:
+
+
+ _(Rule)_:
+
+ =mk_option(_var($wg0,'RULE:0'), "", _("Deny"))?>
+ =mk_option(_var($wg0,'RULE:0'), "1", _("Allow"))?>
+
+
+
:wg_local_tunnel_firewall_help:
_(MTU size)_:
-:
_(bytes)_
+:
+
+ _(bytes)_
+
:wg_mtu_size_help:
@@ -1387,16 +1420,22 @@ _(DNS servers)_:
_(Peer name)_:
-:
" onchange="quickValidate(this);" pattern="=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
-
-
" style="cursor:pointer" onclick="WGconfig(this,'peer-=$tower?>-wg0-=$i?>','/peers')" title="_(View Peer Config)_">
- " style="cursor:pointer" onclick="openClose($(document.wg0),null,'div.key=$i?>')" title="_(Toggle keys)_">
-
+:
+ " onchange="quickValidate(this);" pattern="=$validname?>" title="_(Use only letters A-Z, digits or space,dash,underscore)_" placeholder="(_(optional)_)">
+
+ " style="cursor:pointer" onclick="WGconfig(this,'peer-=$tower?>-wg0-=$i?>','/peers')" title="_(View Peer Config)_">
+ " style="cursor:pointer" onclick="openClose($(document.wg0),null,'div.key=$i?>')" title="_(Toggle keys)_">
+
+
+
+
+
+
:wg_peer_name_help:
_(Peer type of access)_:
-:
+:
=mk_option(_var($wg0,"TYPE:$i"), "0", _("Remote access to server"))?>
=mk_option(_var($wg0,"TYPE:$i"), "1", _("Remote access to LAN"))?>
=mk_option(_var($wg0,"TYPE:$i"), "2", _("Server to server access"))?>
@@ -1406,7 +1445,7 @@ _(Peer type of access)_:
=mk_option(_var($wg0,"TYPE:$i"), "6", _("Remote tunneled access"))?>
=mk_option(_var($wg0,"TYPE:$i"), "7", _("VPN tunneled access for system"),count($peer_wg0)==1?'':'disabled')?>
=mk_option(_var($wg0,"TYPE:$i"), "8", _("VPN tunneled access for docker"),count($peer_wg0)==1?'':'disabled')?>
-
+
@@ -1415,19 +1454,23 @@ _(Peer type of access)_:
':'>'?>
_(Peer private key)_:
-:
" onchange="highlight($(document.wg0),this,=$i?>)" placeholder="(_(optional)_)">
-
+:
" onchange="highlight($(document.wg0),this,=$i?>)" placeholder="(_(optional)_)">
+
+
+
:wg_generate_keypair_help:
_(Peer public key)_:
-:
" onchange="highlight($(document.wg0),this,=$i?>)" placeholder="(_(mandatory)_)" required>
+:
" onchange="highlight($(document.wg0),this,=$i?>)" placeholder="(_(mandatory)_)" required>
:wg_generate_keypair_help:
_(Peer preshared key)_:
-:
" onchange="highlight($(document.wg0),this,=$i?>)" placeholder="(_(optional)_)">
-
+:
" onchange="highlight($(document.wg0),this,=$i?>)" placeholder="(_(optional)_)">
+
+
+
:wg_peer_preshared_key_help:
@@ -1435,64 +1478,89 @@ _(Peer preshared key)_:
_(Peer tunnel address)_:
-: " onchange="if(verifyInSubnet(this)){setAllow($(document.wg0),this.value,=$i?>)}" pattern="=$validIP4?>" title="_(IPv4 address)_">
- >
-
+: " onchange="if(verifyInSubnet(this)){setAllow($(document.wg0),this.value,=$i?>)}" pattern="=$validIP4?>" title="_(IPv4 address)_">
+
+ >
+
_(Peer tunnel address IPv6)_:
-: " onchange="if(verifyInSubnet6(this)){setAllow6($(document.wg0),this.value,=$i?>)}" pattern="=$validIP6?>" title="_(IPv6 address)_">
- >
-
+: " onchange="if(verifyInSubnet6(this)){setAllow6($(document.wg0),this.value,=$i?>)}" pattern="=$validIP6?>" title="_(IPv6 address)_">
+
+ >
+
:wg_peer_tunnel_address_help:
_(Peer endpoint)_:
-
-:
" pattern="=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" =($vpn_wg0||(int)_var($wg0,"TYPE:$i",0)==2||(int)_var($wg0,"TYPE:$i",0)==3)?'placeholder="(_(mandatory)_)" required':'placeholder="(_(not used)_)"'?>>:
- " onchange="quickValidate(this);"=isset($wg0["Endpoint:$i"])?" placeholder=\"".(_var($wg0,'ListenPort:0')?:_var($netport,'wg0'))."\"":""?>>
-
>
+:
+
+ " pattern="=$validText?>" title="_(IP address or FQDN)_" onchange="toLC(this);quickValidate(this);" =($vpn_wg0||(int)_var($wg0,"TYPE:$i",0)==2||(int)_var($wg0,"TYPE:$i",0)==3)?'placeholder="(_(mandatory)_)" required':'placeholder="(_(not used)_)"'?>>
+ :
+ " onchange="quickValidate(this);"=isset($wg0["Endpoint:$i"])?" placeholder=\"".(_var($wg0,'ListenPort:0')?:_var($netport,'wg0'))."\"":""?>>
+
+
+ >
+
:wg_peer_endpoint_help:
_(Peer allowed IPs)_:
-:
" onchange="quickValidate(this);" pattern="=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required>
+:
" onchange="quickValidate(this);" pattern="=$validList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_, _(CIDR optional)_" placeholder="(_(mandatory)_)" required>
:wg_peer_allowed_ips_help:
_(Peer DNS server)_:
-:
" onchange="quickValidate(this);" pattern="=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" =(int)_var($wg0,"TYPE:$i",0)!=6?'placeholder="(_(optional)_)"':'placeholder="(_(mandatory)_)" required'?>>
+:
" onchange="quickValidate(this);" pattern="=$validDNSServerList?>" title="_(Comma separated list of IPv4 and IPv6 IP addresses)_" =(int)_var($wg0,"TYPE:$i",0)!=6?'placeholder="(_(optional)_)"':'placeholder="(_(mandatory)_)" required'?>>
:wg_peer_dns_server_help:
_(Persistent keepalive)_:
-:
" onchange="quickValidate(this);" placeholder="(_(disabled)_)">_(seconds)_
+:
+ " onchange="quickValidate(this);" placeholder="(_(disabled)_)">
+ _(seconds)_
+
:wg_persistent_keepalive_help:
+
+_(Data received)_:
+:
0 B
+
+_(Data sent)_:
+:
0 B
+
+_(Last handshake)_:
+:
_(unknown)_
-_(Data received)_: 0 B _(Data sent)_: 0 B _(Last handshake)_: _(unknown)_
-:
- >
+:
+
+
+
+ >
+
-"WireGuard" and the "WireGuard" logo are registered trademarks of Jason A. Donenfeld