From 5b69f54510bce3df4b407f728acfb520224c5714 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Mon, 20 Apr 2026 22:43:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8D=95=E8=AF=8D=E6=8B=BC?= =?UTF-8?q?=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/update_port.sh | 10 +++++----- install.sh | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/update_port.sh b/bin/update_port.sh index f6d717a..36c4526 100644 --- a/bin/update_port.sh +++ b/bin/update_port.sh @@ -74,18 +74,18 @@ find_free_port() { } # ========================================== -# 函数名: prot_manage +# 函数名: port_manage # 功能: 开放端口和关闭端口 # 参数1: allow 或 deny (操作类型) # 参数2: 端口号 # --- 使用示例 --- # 开启端口 8888 -# prot_manage allow 8888 +# port_manage allow 8888 # 关闭端口 8888 -# prot_manage deny 8888 +# port_manage deny 8888 # ========================================== -prot_manage() { +port_manage() { local ACTION=$1 local PORT=$2 @@ -163,7 +163,7 @@ update_port(){ local port=$(find_free_port) modify_json_file "$config_dir/config.json" ".inbounds[0].listen_port" "$port" - prot_manage allow "$port" + port_manage allow "$port" echo "设置端口成功" } diff --git a/install.sh b/install.sh index 28a6b32..d2081b9 100644 --- a/install.sh +++ b/install.sh @@ -65,7 +65,7 @@ main(){ # 一键部署 install create_config - prot_manage allow $(get_listen_port) # 开放端口 + port_manage allow $(get_listen_port) # 开放端口 run print_share_link ;; @@ -88,13 +88,13 @@ main(){ # 修改端口 check_config_file update_port - prot_manage allow $(get_listen_port) # 开放端口 + port_manage allow $(get_listen_port) # 开放端口 restart_docker ;; 6) # 启动容器 check_config_file - prot_manage allow $(get_listen_port) # 开放端口 + port_manage allow $(get_listen_port) # 开放端口 run print_share_link ;;