Some modifications, tailscale scripts

This commit is contained in:
2025-04-15 23:47:59 +03:00
parent e7fc369f31
commit 933c5e3dac
20 changed files with 131 additions and 526 deletions

32
bin/tscale Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env bash
source ~/.dotfiles/nfrc.sh
which tailscale > /dev/null || {
echo Tailscale not installed
exit 1
}
[ -z "$1" ] && {
echo "No args"
exit 1
}
case "$1" in
"u"|"up")
endpoint=$2
[ -z "$endpoint" ] && {
endpoint=$(tailscale status | grep "exit node" | awk '{print $2}' | $FMENU 'Select server')
[ -z "$endpoint" ] && exit 1
}
tailscale set --exit-node="$endpoint"
tailscale up
;;
"d"|"down")
tailscale set --exit-node=
tailscale up
;;
esac