update
This commit is contained in:
+42
-1
@@ -7,6 +7,9 @@ create_reality_config(){
|
||||
# 检查jq是否安装
|
||||
check_jq
|
||||
|
||||
config_dir=$(readlink -f "$script_dir/../conf") # 配置文件绝对路径
|
||||
cp "$config_dir/template/reality_config.json" "$config_dir/config.json"
|
||||
|
||||
# 生成uui, 写入到config.json文件
|
||||
bash $script_dir/update_uuid.sh
|
||||
|
||||
@@ -19,4 +22,42 @@ create_reality_config(){
|
||||
echo "初始化完成"
|
||||
}
|
||||
|
||||
create_reality_config
|
||||
create_xhttp_reality_config(){
|
||||
script_dir=$(cd "$(dirname "$0")"; pwd) # 脚本文件绝对路径
|
||||
source "$script_dir/utils/base.sh"
|
||||
|
||||
# 检查jq是否安装
|
||||
check_jq
|
||||
|
||||
config_dir=$(readlink -f "$script_dir/../conf") # 配置文件绝对路径
|
||||
cp "$config_dir/template/reality_config.json" "$config_dir/config.json"
|
||||
|
||||
# 生成uui, 写入到config.json文件
|
||||
bash $script_dir/update_uuid.sh
|
||||
|
||||
# 生成密钥对, 修改config.json中的密钥属性
|
||||
bash $script_dir/update_key.sh
|
||||
|
||||
# 生成xhttp_path, 写入到config.json文件
|
||||
bash $script_dir/update_xhttp_path.sh
|
||||
|
||||
# 设置端口
|
||||
bash $script_dir/update_port.sh
|
||||
}
|
||||
|
||||
|
||||
create_config(){
|
||||
echo "请选择配置文件类型:"
|
||||
echo "1. 创建reality配置"
|
||||
echo "2. 创建xhttp_reality配置"
|
||||
read -p "请输入选择 (1 或 2): " choice
|
||||
case $choice in
|
||||
1) create_reality_config ;;
|
||||
2) create_xhttp_reality_config ;;
|
||||
*) echo "无效选择,退出" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
create_config
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user