fix: correct protocol variable check inside port validation to support interactive menu
Main / build (push) Waiting to run
Main / build (push) Waiting to run
This commit is contained in:
+2
-2
@@ -281,7 +281,7 @@ ask() {
|
||||
continue
|
||||
}
|
||||
if [[ $(is_test port_used $REPLY) && $is_ask_set != 'door_port' ]]; then
|
||||
if [[ $REPLY == 443 && $is_caddy && $is_lower =~ "reality" ]]; then
|
||||
if [[ $REPLY == 443 && $is_caddy && ${is_new_protocol,,} =~ "reality" ]]; then
|
||||
msg "\n检测到 443 端口已被 Caddy 占用。"
|
||||
msg "你可以选择启用 REALITY 回落分流功能,将非科学上网流量转发给本地 Caddy (4443 端口)。"
|
||||
msg "这需要你后续手动将 Caddyfile 中的默认 https 端口修改为 4443 并重启 Caddy。"
|
||||
@@ -937,7 +937,7 @@ add() {
|
||||
err "($is_use_port) 不是一个有效的端口. $is_err_tips"
|
||||
}
|
||||
[[ $(is_test port_used $is_use_port) && ! $is_gen ]] && {
|
||||
if [[ $is_use_port == 443 && $is_caddy && $is_lower =~ "reality" ]]; then
|
||||
if [[ $is_use_port == 443 && $is_caddy && ${is_new_protocol,,} =~ "reality" ]]; then
|
||||
msg "\n检测到 443 端口已被 Caddy 占用。"
|
||||
msg "你可以选择启用 REALITY 回落分流功能,将非科学上网流量转发给本地 Caddy (4443 端口)。"
|
||||
msg "这需要你后续手动将 Caddyfile 中的默认 https 端口修改为 4443 并重启 Caddy。"
|
||||
|
||||
Reference in New Issue
Block a user