From 7c88eeba86a575597d15a130cf583b44d801e370 Mon Sep 17 00:00:00 2001 From: Derek Kaser Date: Wed, 17 May 2023 16:26:39 -0400 Subject: [PATCH] cmd/tailscale: allow Tailscale to work with Unraid web interface (#8062) Updates tailscale/tailscale#8026 Signed-off-by: Derek Kaser --- cmd/tailscale/cli/web.go | 4 ++++ cmd/tailscale/cli/web.html | 30 ++++++++++++++++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/cmd/tailscale/cli/web.go b/cmd/tailscale/cli/web.go index 82105a6a3..38ee25b96 100644 --- a/cmd/tailscale/cli/web.go +++ b/cmd/tailscale/cli/web.go @@ -61,6 +61,8 @@ type tmplData struct { TUNMode bool IsSynology bool DSMVersion int // 6 or 7, if IsSynology=true + IsUnraid bool + UnraidToken string IPNVersion string } @@ -441,6 +443,8 @@ func webHandler(w http.ResponseWriter, r *http.Request) { TUNMode: st.TUN, IsSynology: distro.Get() == distro.Synology || envknob.Bool("TS_FAKE_SYNOLOGY"), DSMVersion: distro.DSMVersion(), + IsUnraid: distro.Get() == distro.Unraid, + UnraidToken: os.Getenv("UNRAID_CSRF_TOKEN"), IPNVersion: versionShort, } exitNodeRouteV4 := netip.MustParsePrefix("0.0.0.0/0") diff --git a/cmd/tailscale/cli/web.html b/cmd/tailscale/cli/web.html index b1ad8746b..b990bdd77 100644 --- a/cmd/tailscale/cli/web.html +++ b/cmd/tailscale/cli/web.html @@ -116,10 +116,12 @@ Open Source Licenses