From 69fb40022349b4da3dacd0b4e52793e95fc5d282 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Wed, 26 Apr 2023 10:46:52 -0700 Subject: [PATCH] fix: dynamic remote access docs url (#623) --- .../plugins/dynamix.my.servers/Connect.page | 699 ++++++++++++++++++ 1 file changed, 699 insertions(+) create mode 100644 plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page diff --git a/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page new file mode 100644 index 000000000..f0f4305a8 --- /dev/null +++ b/plugin/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/Connect.page @@ -0,0 +1,699 @@ +Menu="ManagementAccess:100" +Title="Unraid Connect" +Icon="icon-u-globe" +Tag="globe" +--- + + + + + +
+
+ + $origin) { + if ( (strpos($origin, "http") === false) || (strpos($origin, "localhost") !== false) ) { + // clean up $allowedOriginsArr, only display warning if origins still remain to display + unset($allowedOriginsArr[$key]); + } + } + } +} +?> + +
+
+ _(Warning)_ . +
_(For best results, use one of these urls)_: +
+
    + +
  • + +
+
+
+
+ + +  +: _(Questions? See the documentation.)_ + + +_(Account status)_: +: + + +_(Connected to Unraid Connect Cloud)_: + +: _(Yes)_ + +: _(No)_ + + + +
+ +
+ +_(Allow Remote Access)_: + +: _(Disabled until you have signed in)_ + +: _(Disabled until connected to Unraid Connect Cloud)_ + +: _(Disabled until you Provision a myunraid.net SSL Cert)_ + +: _(Disabled until your root user account is password-protected)_ + +: + + +  +: _(Remark: to use the UPnP options please set "Use UPnP" to "Yes" in Management Access.)_ + + +  +: + +
+ +_(WAN Port)_: +:     + %u/TCP " . _("to") . " %s:%u", $myservers['remote']['wanport'], htmlspecialchars($eth0['IPADDR:0']??''), $var['PORTSSL']??443)?> + +:unraidnet_wanpanel_help: + +
+ + + _('Remote T2FA requires Remote Access to be enabled and a *.myunraid.net certificate'), + 'needRemote' => _('Remote T2FA requires Remote Access to be enabled'), + 'needRemoteAndCert' => _('Remote T2FA requires Remote Access to be enabled and a *.myunraid.net certificate'), + 'needCert' => _('Remote T2FA requires a *.myunraid.net certificate'), +]; + +if ($enableRemoteT2fa) + $remoteT2faRemark = ''; +elseif ($currentRemoteAccessValue === 'OFF' && $hasMyUnraidNetCert) + $remoteT2faRemark = $remoteT2faRemarks['needRemote']; +elseif ($currentRemoteAccessValue === 'OFF' && !$hasMyUnraidNetCert) + $remoteT2faRemark = $remoteT2faRemarks['needRemoteAndCert']; +elseif ($currentRemoteAccessValue !== 'OFF' && !$hasMyUnraidNetCert) + $remoteT2faRemark = $remoteT2faRemarks['needCert']; +else + $remoteT2faRemark = $remoteT2faRemarks['all']; + +$localT2faRemarks = [ + 'all' => _('Local T2FA requires Use SSL/TLS to be Strict and a *.myunraid.net certificate'), + 'needSSLAuto' => _('Local T2FA requires Use SSL/TLS to be Strict'), + 'needSSLAutoAndCert' => _('Local T2FA requires Use SSL/TLS to be Strict and a *.myunraid.net certificate'), + 'needCert' => _('Local T2FA requires a *.myunraid.net certificate'), +]; + +if($enableLocalT2fa) + $localT2faRemark = ''; +elseif ($var['USE_SSL'] !== 'auto' && $hasMyUnraidNetCert) + $localT2faRemark = $localT2faRemarks['needSSLAuto']; +elseif ($var['USE_SSL'] !== 'auto' && !$hasMyUnraidNetCert) + $localT2faRemark = $localT2faRemarks['needSSLAutoAndCert']; +elseif ($var['USE_SSL'] === 'auto' && !$hasMyUnraidNetCert) + $localT2faRemark = $localT2faRemarks['needCert']; +else + $localT2faRemark = $localT2faRemarks['all']; +?> + +_(Enable Transparent 2FA for Remote Access)_: +: + +:myservers_remote_t2fa_help: + +_(Enable Transparent 2FA for Local Access)_: +: + +:myservers_local_t2fa_help: + +_(Unraid API extra origins)_: +: + +:unraidnet_extraorigins_help: + + +  +: + + + +
+
+ +
+_(Flash backup)_: + +: _(Disabled until you have signed in)_ + +: _(Disabled until connected to Unraid Connect Cloud)_ + +: _(Loading)_ + +
+ + + + + + + +
+
+ +