diff options
| author | sinanmohd <sinan@sinanmohd.com> | 2026-02-08 22:56:12 +0530 |
|---|---|---|
| committer | sinanmohd <sinan@sinanmohd.com> | 2026-02-08 22:56:12 +0530 |
| commit | 7542b49a5f093ad0d22f3cd964cdbc7ce338aa94 (patch) | |
| tree | 39cf94ee897caf4914751c2de7bdfbe36133379c /home/wayland/pkgs/wayland-scripts/src/bin/vpn | |
| parent | 142a0ef7616c870e06850d266137a9799e09f8ea (diff) | |
feat(home/wayland/wayland-scripts): init new cmds
Diffstat (limited to 'home/wayland/pkgs/wayland-scripts/src/bin/vpn')
| -rwxr-xr-x | home/wayland/pkgs/wayland-scripts/src/bin/vpn | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/home/wayland/pkgs/wayland-scripts/src/bin/vpn b/home/wayland/pkgs/wayland-scripts/src/bin/vpn new file mode 100755 index 0000000..db0353a --- /dev/null +++ b/home/wayland/pkgs/wayland-scripts/src/bin/vpn @@ -0,0 +1,19 @@ +#!/bin/sh + +exit_node="${1:-kay}" + +note() +{ + command -v notify-send > /dev/null && + notify-send " vpn" "$1" + printf "%s\n" "$1" +} + +if tailscale exit-node list | grep -q "selected"; then + tailscale set --exit-node= && + note "Connection was dropped" + +else + tailscale set --exit-node="$exit_node" && + note "Traffic routed through $exit_node" +fi |
