aboutsummaryrefslogtreecommitdiff
path: root/bin/xray.sh
diff options
context:
space:
mode:
authorryo <ryo@nopwd.lol>2024-10-30 20:10:03 +0000
committerryo <ryo@nopwd.lol>2024-10-30 20:10:03 +0000
commitcc6d6fcfc6e8403e87dae9f092e61f0edf8e3cc6 (patch)
treef7f751a92c30b5ef7cf8770004c30479c516fdca /bin/xray.sh
Initial commit
Diffstat (limited to 'bin/xray.sh')
-rwxr-xr-xbin/xray.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/xray.sh b/bin/xray.sh
new file mode 100755
index 0000000..faf4c0b
--- /dev/null
+++ b/bin/xray.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env dash
+
+if [ -n "$(pgrep xray)" ]; then
+ pkill xray
+ notify-send "Proxy disabled"
+else
+ xray -c $HOME/.config/xray/config.json &
+ notify-send "Proxy enabled"
+fi