A Gnome Extension for Network Admins: tailscale-status

February 4, 2022
Tailscale is a P2P a networking solution creating direct private networks between devices using WireGuard. If you don't want to open the command line every time you want to see a device's IP, this extension might be useful for you.


The Problem

When working on various assignments and side projects I found myself using Tailscale a lot because of its brilliant design and ease of use. At some point I had tightly integrated it with some services that I decided to self host and found myself looking up the IP address of various nodes using the tailscale status command. In addition to that I utilized tailscale exit-nodes rather frequently for making VPN like connections, but would often forget that I am connected to an exit node. It would be nice to have a visual indicator for when there is an active exit-node connection as well as a quick overview of the current devices.

The Solution

Since I’m using the Gnome Desktop, I decide to write an extension that would do exactly that. Under the hood it would spawn subprocess calls to the tailscale cli and extract the necessary information. I added some additional features after some open source contributors decided to provide feedback.

Screenshot of Tailscale Status Gnome Extension

Future Work

There are two main issues with the maintainability of such an extension. First of all, it relies on the syntax of tailscale commands not changing, and while that likely won’t be the case it would be better to query the local tailscale daemon directly instead of spawning subprocess with the correct command line arguments. This is how the native client extension query information. Secondly, the extension can be re-written in TypeScript to provide a better and more robust design using types. Once time allows a rewrite will happen along with more bug fixes to make the whole feature set more robust and complete.