Skip to content

Instantly share code, notes, and snippets.

@felschr
Last active May 28, 2025 22:01
Show Gist options
  • Save felschr/fb18163924bbe748a6226b891ef44427 to your computer and use it in GitHub Desktop.
Save felschr/fb18163924bbe748a6226b891ef44427 to your computer and use it in GitHub Desktop.
Tailnet Lock: Sign Mullvad exit nodes
#! /usr/bin/env nu
let $status = tailscale lock status --json | from json
let $nodes = $status | get FilteredPeers
let $nodes_mullvad = $nodes | where Name =~ ".mullvad.ts.net"
let count_total = $nodes | length
let count_mullvad = $nodes_mullvad | length
print $"unsigned nodes: ($count_total) total, ($count_mullvad) Mullvad"
if ($nodes_mullvad | length) == 0 {
print "no Mullvad nodes need to be signed"
return
}
print "signing Mullvad nodes..."
$nodes_mullvad | each { |node|
print $"signing ($node.Name)"
tailscale lock sign $node.NodeKey
sleep 0.1sec
}
print "all Mullvad nodes successfully signed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment