Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
imajeason committed Nov 4, 2022
1 parent e7e4360 commit 37881cd
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions NaiveProxy/naive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -433,29 +433,10 @@ edit_config() {
naive_port=`egrep 'port' /etc/caddy/.autoconfig | awk -F'=' '{print $2}'`
email=`egrep 'email' /etc/caddy/.autoconfig | awk -F'=' '{print $2}'`

while :; do
echo -e "请输入 "$yellow"NaiveProxy"$none" 端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none"端口"
read -p "$(echo -e "(默认端口: ${cyan}${naive_port}$none):")" naive_port
[ -z "$naive_port" ] && naive_port=$naive_port
case $naive_port in
80)
echo
echo " ...都说了不能选择 80 端口了咯....."
error
;;
[1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5])
echo
echo
echo -e "$yellow naive_port 端口 = $cyan$naive_port$none"
echo "----------------------------------------------------------------"
echo
break
;;
*)
error
;;
esac
done

echo -e "请输入 "$yellow"NaiveProxy"$none" 端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none"端口"
read -p "$(echo -e "(默认端口: ${cyan}${naive_port}$none):")" naive_port
[ -z "$naive_port" ] && naive_port=$naive_port


echo -e "请输入 "$yellow"NaiveProxy"$none" 用户名,支持A-Za-z_0-9,不能是汉字"
Expand Down

0 comments on commit 37881cd

Please sign in to comment.