fix: 修正函数名字
This commit is contained in:
parent
1226236e67
commit
9569a26562
@ -74,18 +74,18 @@ find_free_port() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ==========================================
|
# ==========================================
|
||||||
# 函数名: manage_port
|
# 函数名: prot_manage
|
||||||
# 功能: 开放端口和关闭端口
|
# 功能: 开放端口和关闭端口
|
||||||
# 参数1: allow 或 deny (操作类型)
|
# 参数1: allow 或 deny (操作类型)
|
||||||
# 参数2: 端口号
|
# 参数2: 端口号
|
||||||
# --- 使用示例 ---
|
# --- 使用示例 ---
|
||||||
# 开启端口 8888
|
# 开启端口 8888
|
||||||
# manage_port allow 8888
|
# prot_manage allow 8888
|
||||||
|
|
||||||
# 关闭端口 8888
|
# 关闭端口 8888
|
||||||
# manage_port deny 8888
|
# prot_manage deny 8888
|
||||||
# ==========================================
|
# ==========================================
|
||||||
manage_port() {
|
prot_manage() {
|
||||||
local ACTION=$1
|
local ACTION=$1
|
||||||
local PORT=$2
|
local PORT=$2
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ update_port(){
|
|||||||
|
|
||||||
local port=$(find_free_port)
|
local port=$(find_free_port)
|
||||||
modify_json_file "$config_dir/config.json" ".inbounds[0].listen_port" "$port"
|
modify_json_file "$config_dir/config.json" ".inbounds[0].listen_port" "$port"
|
||||||
manage_port allow "$port"
|
prot_manage allow "$port"
|
||||||
echo "设置端口成功"
|
echo "设置端口成功"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user