diff --git a/bin/update_port.sh b/bin/update_port.sh index 23ef1b5..f6d717a 100644 --- a/bin/update_port.sh +++ b/bin/update_port.sh @@ -74,18 +74,18 @@ find_free_port() { } # ========================================== -# 函数名: manage_port +# 函数名: prot_manage # 功能: 开放端口和关闭端口 # 参数1: allow 或 deny (操作类型) # 参数2: 端口号 # --- 使用示例 --- # 开启端口 8888 -# manage_port allow 8888 +# prot_manage allow 8888 # 关闭端口 8888 -# manage_port deny 8888 +# prot_manage deny 8888 # ========================================== -manage_port() { +prot_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" - manage_port allow "$port" + prot_manage allow "$port" echo "设置端口成功" }