There’s a bit of a simpler way. Here’s a little python script that will dump all of the Tailscale IP addresses for the current machine:
status_data = subprocess.check_output(["tailscale", "status", "--json"]).decode("utf-8")
status_data = json.loads(status_data)
for ip in status_data["TailscaleIPs"]:
As of today, here are all of the keys in the JSON response:
dict_keys(['Version', 'BackendState', 'AuthURL', 'TailscaleIPs', 'Self', 'MagicDNSSuffix', 'CertDomains', 'Peer', 'User'])
I hope this can help! I’d be curious to see what other fun things you could do with this. There is a way to do this natively from Go (which is how the hello server works), however as of today we do not currently have this exposed to other applications. I’d suggest querying
tailscale status and attaching the user information as a part of an on-server session store.