feat(tailscale): add Tailscale control center widget#1875
Open
Gdetrane wants to merge 1 commit intoAvengeMedia:masterfrom
Open
feat(tailscale): add Tailscale control center widget#1875Gdetrane wants to merge 1 commit intoAvengeMedia:masterfrom
Gdetrane wants to merge 1 commit intoAvengeMedia:masterfrom
Conversation
Tailscale is a rapidly growing mesh VPN with a vibrant community, now shipping by default in distros like Bazzite and other Fedora variants. Existing desktop integrations (e.g., GNOME extensions) are limited. This adds a native DMS widget for quickly searching, filtering, and copying IPs or FQDNs of any node in the tailnet, without opening the web admin panel or using the CLI. Go backend: - New tailscale service polling the local API socket at /var/run/tailscale/tailscaled.sock via HTTP over Unix socket - Parses /localapi/v0/status into lean state structs with peer sorting, user resolution, and relative time formatting - IPC methods: tailscale.subscribe (streaming), tailscale.getStatus, tailscale.refresh - Eager initialization with background retry when tailscaled is not running at startup, graceful recovery on daemon restart - 18 unit tests covering parsing, manager lifecycle, and handlers QML frontend: - TailscaleService singleton with ref counting and subscription management following CupsService pattern - TailscaleWidget PluginComponent with control center tile and expandable detail view - Filter chips (My Online / Online / All) with device counts - Searchable device list with fuzzy match on hostname, DNS, and IP - Copy-to-clipboard buttons for Tailscale IPs and DNS names - Self device highlighted with accent tint and "This device" badge - Expandable cards showing DNS name, tags, owner, relay info - Mobile device hostname resolution (localhost -> DNS name) - All strings use I18n.tr() with translator context Handles all daemon lifecycle states: - Tailscale running at startup: widget shows immediately - Tailscale started after DMS: widget appears within 30s - Tailscale stopped while running: widget shows "Disconnected" - Tailscale restarted: widget recovers automatically within 30s Manually tested on: - Desktop (RTX 2070S), CachyOS (Arch), niri - ThinkPad X390, CachyOS (Arch), niri
Collaborator
|
Hi there, thanks for the PR. I think this is better suited as an optional plug-in rather a native DMS feature as it's best fit for a select number of users. I will refer to @bbedward for a final accessment. |
Contributor
Author
Contributor
Author
|
@Purian23 Hi, thanks for jumping in, that's fair. I thought this could be a nice built-in feature, given Tailscale's growth and it being included in some distros, but I totally see your point. I'm still new to this repo, but I imagine this would require keeping the core Go logic and moving the QML logic to a plugin package, right? Any feedback is welcome |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Native Tailscale integration as a builtin control center plugin — search, filter,
and copy IPs or FQDNs of any node in the tailnet without opening the web admin
panel or using the CLI.
Motivation
Tailscale is a rapidly growing mesh VPN with a vibrant community, now shipping by
default in distros like Bazzite and other Fedora variants. Existing desktop
integrations (e.g., GNOME extensions) are limited and unreliable. This widget
provides quick, native access to tailnet device information directly from the DMS
control center.
Changes
Go backend (core/internal/server/tailscale/)
Unix socket, no CLI shelling or external dependencies
peer sorting (online first, alphabetical), user ID resolution, mobile hostname
fixup (localhost to DNS-derived name), and relative time formatting
tailscale.getStatus (one-shot), tailscale.refresh (manual poll)
tailscaled is not running at startup; polls keep running through daemon
stop/restart cycles for automatic recovery
handler routing, and edge cases
QML frontend
following the CupsService pattern
online peer count) and expandable detail view
DankFilterChips
Integration
Daemon lifecycle handling
Test plan
Tested on: