除 UI 端口之外,其余端口采用 TCP + UDP 端口检测方式检测
This commit is contained in:
@@ -50,24 +50,24 @@ checkport() {
|
|||||||
local conflict_port=""
|
local conflict_port=""
|
||||||
local conflict_info=""
|
local conflict_info=""
|
||||||
|
|
||||||
conflict_info=$(check_port_with_info "$mix_port" tcp)
|
conflict_info=$(check_port_with_info "$mix_port")
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
conflict_found=1
|
conflict_found=1
|
||||||
conflict_port="$mix_port"
|
conflict_port="$mix_port"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$conflict_found" -eq 0 ]; then
|
if [ "$conflict_found" -eq 0 ]; then
|
||||||
conflict_info=$(check_port_with_info "$redir_port" tcp)
|
conflict_info=$(check_port_with_info "$redir_port")
|
||||||
[ $? -ne 0 ] && conflict_found=1 && conflict_port="$redir_port"
|
[ $? -ne 0 ] && conflict_found=1 && conflict_port="$redir_port"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$conflict_found" -eq 0 ]; then
|
if [ "$conflict_found" -eq 0 ]; then
|
||||||
conflict_info=$(check_port_with_info "$((redir_port + 1))" all)
|
conflict_info=$(check_port_with_info "$((redir_port + 1))")
|
||||||
[ $? -ne 0 ] && conflict_found=1 && conflict_port="$((redir_port + 1))"
|
[ $? -ne 0 ] && conflict_found=1 && conflict_port="$((redir_port + 1))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$conflict_found" -eq 0 ]; then
|
if [ "$conflict_found" -eq 0 ]; then
|
||||||
conflict_info=$(check_port_with_info "$dns_port" all)
|
conflict_info=$(check_port_with_info "$dns_port")
|
||||||
[ $? -ne 0 ] && conflict_found=1 && conflict_port="$dns_port"
|
[ $? -ne 0 ] && conflict_found=1 && conflict_port="$dns_port"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ set_adv_config() {
|
|||||||
;;
|
;;
|
||||||
1)
|
1)
|
||||||
xport=mix_port
|
xport=mix_port
|
||||||
inputport tcp
|
inputport
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@@ -471,7 +471,7 @@ set_adv_config() {
|
|||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
xport=redir_port
|
xport=redir_port
|
||||||
inputport tcp
|
inputport
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@@ -480,7 +480,7 @@ set_adv_config() {
|
|||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
xport=dns_port
|
xport=dns_port
|
||||||
inputport all
|
inputport
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user