feat(scripts): add script for Tailscale Lock signing of Mullvad nodes
This commit is contained in:
parent
3976e392e1
commit
e964443c5d
1 changed files with 26 additions and 0 deletions
26
scripts/tailscale-lock-sign-mullvad-exit-nodes.nu
Executable file
26
scripts/tailscale-lock-sign-mullvad-exit-nodes.nu
Executable file
|
@ -0,0 +1,26 @@
|
|||
#! /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"
|
Loading…
Add table
Add a link
Reference in a new issue