Update menu.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent 1b8ffba0ff
commit 4a7c7bddb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      menu.sh

@ -781,7 +781,7 @@ uninstall() {
ip4_info; [[ $L = C && -n "$COUNTRY4" ]] && COUNTRY4=$(translate "$COUNTRY4")
ip6_info; [[ $L = C && -n "$COUNTRY6" ]] && COUNTRY6=$(translate "$COUNTRY6")
info " $(text 45)\n IPv4: $WAN4 $COUNTRY4 $ASNORG4\n IPv6: $WAN6 $COUNTRY6 $ASNORG6 "
}
}
# 同步脚本至最新版本
ver() {
@ -1070,7 +1070,7 @@ input_port() {
i=5
PORT=40000
ss -nltp | grep -q ":$PORT"[[:space:]] && reading " $(text_eval 103) " PORT || reading " $(text 104) " PORT
until grep -wqP "\d+" <<< $PORT && [[ "$PORT" -ge 1000 && "$PORT" -le 65535 ]] && [[ ! $(ss -nltp) =~ :"$PORT"[[:space:]] ]]; do
until grep -qE "^[1-9][0-9]{3,4}$" <<< $PORT && [[ "$PORT" -ge 1000 && "$PORT" -le 65535 ]] && [[ ! $(ss -nltp) =~ :"$PORT"[[:space:]] ]]; do
(( i-- )) || true
[[ $i = 0 ]] && error " $(text 29) "
if grep -qE "^[1-9][0-9]{3,4}$" <<< $PORT; then
@ -1494,7 +1494,7 @@ EOF
info " $(text_eval 149)\n $(text_eval 162) "
[[ -n "$QUOTA" ]] && info " $(text 63): $QUOTA "
echo -e "\n==============================================================\n"
hint " $(text 43)\n " && help
hint " $(text 43) \n" && help
else
[[ $ANEMONE = 1 ]] && iptables_solution
@ -1918,7 +1918,7 @@ menu() {
# 输入必须是数字且少于等于最大可选项
MAX_CHOOSE=14
if grep -wqP "\d+" <<< $CHOOSE1 && [ $CHOOSE1 -le $MAX_CHOOSE ]; then
if grep -qE "^[0-9]{1,2}$" <<< $CHOOSE1 && [ $CHOOSE1 -le $MAX_CHOOSE ]; then
ACTION$CHOOSE1
else
warning " $(text 51) [0-$MAX_CHOOSE] " && sleep 1 && menu

Loading…
Cancel
Save