mirror of
https://github.com/iiab/iiab.git
synced 2025-02-14 20:22:08 +00:00
Merge pull request #3803 from holta/iiab-vpn_status2
Refine iiab-vpn status table of Tailscale IPs/usernames/etc
This commit is contained in:
commit
67458abfc0
1 changed files with 7 additions and 2 deletions
|
@ -58,6 +58,11 @@ echo -e "\e[4mTo permanently log out of VPN:\e[0m\n"
|
|||
echo -e " tailscale logout\n"
|
||||
|
||||
# More useful table of IPs/usernames/etc than 'tailscale status'
|
||||
echo -e "\e[44;1mVPN peers: (rightmost column = online/offline)\e[0m\n"
|
||||
tailscale status --json | jq -r '.Self,.Peer[] | .Tags[] + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + .OS + " " + .Relay + " " + (.Online|tostring)' | sort -V | column -t
|
||||
#echo -e "\e[44;1mVPN peers: (rightmost column = online/offline)\e[0m\n"
|
||||
#tailscale status --json | jq -r '.Self,.Peer[] | .Tags[] + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + .OS + " " + .Relay + " " + (.Online|tostring)' | sort -V | column -t
|
||||
echo -e '\e[44;1mVPN peers: ("true" in 6th column means online)\e[0m\n'
|
||||
tailscale status --json | jq -r '.Self,.Peer[] | .Tags[] + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + .Relay + " " + (.Online|tostring) + " " + .OS' | sort -V | column -t | \
|
||||
while read line; do
|
||||
echo "$line" $(tailscale whois --json $(echo $line | cut -d' ' -f2) | jq -r '.Node.Hostinfo | .Distro + " " + .DistroVersion + " " + .DeviceModel');
|
||||
done
|
||||
echo
|
||||
|
|
Loading…
Reference in a new issue