File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ install_gost() {
123123 read -r -p " 请输入你要使用的密码:" PASS
124124 read -r -p " 请输入HTTP/2需要侦听的端口号(443):" PORT
125125
126- if [[ -z " ${PORT// } " ]] || ! [[ " ${PORT} " =~ ^[0-9]+$ ]] || ! [ " $PORT " -ge 1 ] && [ " $PORT " -le 655535 ] ; then
126+ if [[ -z " ${PORT// } " ]] || ! [[ " ${PORT} " =~ ^[0-9]+$ ]] || ! { [ " $PORT " -ge 1 ] && [ " $PORT " -le 65535 ] ; } ; then
127127 echo -e " ${COLOR_ERROR} 非法端口,使用默认端口 443 !${COLOR_NONE} "
128128 PORT=443
129129 fi
@@ -177,7 +177,7 @@ install_shadowsocks(){
177177
178178 BIND_IP=0.0.0.0
179179
180- if [[ -z " ${PORT// } " ]] || ! [[ " ${PORT} " =~ ^[0-9]+$ ]] || ! ( [ " $PORT " -ge 1 ] && [ " $PORT " -le 65535 ]) ; then
180+ if [[ -z " ${PORT// } " ]] || ! [[ " ${PORT} " =~ ^[0-9]+$ ]] || ! { [ " $PORT " -ge 1 ] && [ " $PORT " -le 65535 ]; } ; then
181181 echo -e " ${COLOR_ERROR} 非法端口,使用默认端口 1984 !${COLOR_NONE} "
182182 PORT=1984
183183 fi
You can’t perform that action at this time.
0 commit comments