修改单词拼写错误
This commit is contained in:
+5
-5
@@ -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 "设置端口成功"
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user