From 8f770012535a19b0ff401f1d270caa3e0969f796 Mon Sep 17 00:00:00 2001 From: Zach Buchheit Date: Tue, 28 Oct 2025 08:54:24 -0700 Subject: [PATCH] devices: add SSHEnabled to devices SSHEnabled has been added to the devices API when `fields` is set to all Updates https://github.com/tailscale/tailscale-client-go-v2/issues/39 Signed-off-by: Zach Buchheit --- devices.go | 1 + devices_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/devices.go b/devices.go index 5fac8e5..d876897 100644 --- a/devices.go +++ b/devices.go @@ -93,6 +93,7 @@ type Device struct { UpdateAvailable bool `json:"updateAvailable"` // The below are only included in listings when querying `all` fields. + SSHEnabled bool `json:"sshEnabled"` AdvertisedRoutes []string `json:"AdvertisedRoutes"` EnabledRoutes []string `json:"enabledRoutes"` ClientConnectivity *ClientConnectivity `json:"clientConnectivity"` diff --git a/devices_test.go b/devices_test.go index 57eed07..802b841 100644 --- a/devices_test.go +++ b/devices_test.go @@ -66,6 +66,7 @@ func TestClient_Devices_Get(t *testing.T) { TailnetLockError: "test error", TailnetLockKey: "tlpub:test", UpdateAvailable: true, + SSHEnabled: false, AdvertisedRoutes: []string{"127.0.0.1", "127.0.0.2"}, EnabledRoutes: []string{"127.0.0.1"}, ClientConnectivity: &ClientConnectivity{ @@ -172,6 +173,7 @@ func TestClient_Devices_List(t *testing.T) { NodeKey: "nodekey:test", OS: "windows", UpdateAvailable: true, + SSHEnabled: false, AdvertisedRoutes: []string{"127.0.0.1", "127.0.0.2"}, EnabledRoutes: []string{"127.0.0.1"}, ClientConnectivity: &ClientConnectivity{