Skip to content

Commit 197b1ac

Browse files
committed
feat: add option for no-logs-no-support
Signed-off-by: Derek Kaser <[email protected]>
1 parent 3fd803e commit 197b1ac

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

src/usr/local/emhttp/plugins/tailscale/include/Pages/Settings.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@
6969
</dd>
7070
</dl>
7171

72+
<dl>
73+
<dt><?= $tr->tr("settings.no_logs_no_support"); ?></dt>
74+
<dd>
75+
<select name='NO_LOGS_NO_SUPPORT' size='1' class='narrow'>
76+
<?= Utils::make_option($tailscaleConfig->NoLogsNoSupport, '1', $tr->tr("yes"));?>
77+
<?= Utils::make_option( ! $tailscaleConfig->NoLogsNoSupport, '0', $tr->tr("no"));?>
78+
</select>
79+
</dd>
80+
</dl>
81+
<blockquote class='inline_help'><?= $tr->tr("settings.context.no_logs_no_support"); ?></blockquote>
82+
7283
<dl>
7384
<dt><?= $tr->tr("settings.unraid_listen"); ?></dt>
7485
<dd>

src/usr/local/emhttp/plugins/tailscale/locales/en_US.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"reauthenticate": "Reauthenticate",
5050
"funnel": "Allow Tailscale Funnel",
5151
"hosts": "Add Peers to /etc/hosts",
52+
"no_logs_no_support": "No Logs No Support",
5253
"context": {
5354
"unraid_listen": "Configures Unraid services (SSH, WebGUI, SMB, etc.) to listen on Tailscale addresses.",
5455
"ip_forward": "Sets net.ipv4.ip_forward and net.ipv6.conf.all.forwarding to 1 in sysctl. This change occurs immediately when being enabled.",
@@ -62,7 +63,8 @@
6263
"save": "Tailscale will be restarted when changes are applied",
6364
"reauthenticate": "Force a Tailscale reauthentication.",
6465
"funnel": "Allows Tailscale funnel to be enabled via the WebGUI. If disabled, Tailscale funnel will be disabled.",
65-
"hosts": "Adds Tailscale peers to /etc/hosts for name resolution. This is useful if you want to use Tailnet DNS names, without the potential complications of enabling Tailscale DNS on the server."
66+
"hosts": "Adds Tailscale peers to /etc/hosts for name resolution. This is useful if you want to use Tailnet DNS names, without the potential complications of enabling Tailscale DNS on the server.",
67+
"no_logs_no_support": "Disables Tailscale's telemetry and opts you out of getting support from Tailscale that would require such telemetry for debugging."
6668
}
6769
},
6870
"info": {

src/usr/local/php/unraid-tailscale-utils/unraid-tailscale-utils/Config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Config
3030
public bool $AllowRoutes;
3131
public bool $AllowFunnel;
3232
public bool $AddPeersToHosts;
33+
public bool $NoLogsNoSupport;
3334

3435
public int $WgPort;
3536
public string $TaildropDir;
@@ -54,6 +55,7 @@ public function __construct()
5455
$this->AllowRoutes = boolval($saved_config["ACCEPT_ROUTES"] ?? "0");
5556
$this->AllowFunnel = boolval($saved_config["ALLOW_FUNNEL"] ?? "0");
5657
$this->AddPeersToHosts = boolval($saved_config["ADD_PEERS_TO_HOSTS"] ?? "0");
58+
$this->NoLogsNoSupport = boolval($saved_config["NO_LOGS_NO_SUPPORT"] ?? "0");
5759

5860
$this->WgPort = intval($saved_config["WG_PORT"] ?? "0");
5961

src/usr/local/php/unraid-tailscale-utils/unraid-tailscale-utils/System.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ public static function createTailscaledParamsFile(Config $config): void
368368
$custom_params .= "-port {$config->WgPort} ";
369369
}
370370

371+
if ($config->NoLogsNoSupport) {
372+
$custom_params .= "--no-logs-no-support ";
373+
}
374+
371375
file_put_contents('/usr/local/emhttp/plugins/tailscale/custom-params.sh', 'TAILSCALE_CUSTOM_PARAMS="' . $custom_params . '"');
372376
}
373377
}

0 commit comments

Comments
 (0)