Эх сурвалжийг харах

add a statement that checks the v2ray command

zfl9 8 жил өмнө
parent
commit
95d9631b4c
1 өөрчлөгдсөн 3 нэмэгдсэн , 0 устгасан
  1. 3 0
      ss-tproxy

+ 3 - 0
ss-tproxy

@@ -16,11 +16,13 @@ fi
 function check_depend {
 case "$mode" in
     v2ray_global)
+        command -v v2ray &>/dev/null || { echo "Error: v2ray is not installed." 1>&2; exit 1; }
         modprobe xt_TPROXY &>/dev/null || { echo "Error: xt_TPROXY module is not installed." 1>&2; exit 1; }
         command -v ip &>/dev/null || { echo "Error: iproute2 is not installed." 1>&2; exit 1; }
         command -v dnsmasq &>/dev/null || { echo "Error: dnsmasq is not installed." 1>&2; exit 1; }
         ;;
     v2ray_gfwlist)
+        command -v v2ray &>/dev/null || { echo "Error: v2ray is not installed." 1>&2; exit 1; }
         modprobe xt_TPROXY &>/dev/null || { echo "Error: xt_TPROXY module is not installed." 1>&2; exit 1; }
         command -v ip &>/dev/null || { echo "Error: iproute2 is not installed." 1>&2; exit 1; }
         command -v dnsmasq &>/dev/null || { echo "Error: dnsmasq is not installed." 1>&2; exit 1; }
@@ -28,6 +30,7 @@ case "$mode" in
         command -v perl &>/dev/null || { echo "Error: perl is not installed." 1>&2; exit 1; }
         ;;
     v2ray_chnroute)
+        command -v v2ray &>/dev/null || { echo "Error: v2ray is not installed." 1>&2; exit 1; }
         modprobe xt_TPROXY &>/dev/null || { echo "Error: xt_TPROXY module is not installed." 1>&2; exit 1; }
         command -v ip &>/dev/null || { echo "Error: iproute2 is not installed." 1>&2; exit 1; }
         command -v dnsmasq &>/dev/null || { echo "Error: dnsmasq is not installed." 1>&2; exit 1; }