重构代码,统一项目入口为install.sh
This commit is contained in:
+10
-14
@@ -7,16 +7,16 @@ create_reality_config(){
|
||||
cp "$config_dir/template/reality_config.json" "$config_dir/config.json"
|
||||
|
||||
# 生成uui, 写入到config.json文件
|
||||
bash $script_dir/update_uuid.sh
|
||||
update_uuid
|
||||
|
||||
# 生成密钥对, 修改config.json中的密钥属性
|
||||
bash $script_dir/update_key.sh
|
||||
update_key
|
||||
|
||||
# 设置端口
|
||||
bash $script_dir/update_port.sh
|
||||
update_port
|
||||
|
||||
# 设置realty_dest目标域名
|
||||
bash $script_dir/update_reality_dest.sh
|
||||
update_reality_dest
|
||||
|
||||
green "成功创建配置"
|
||||
}
|
||||
@@ -28,27 +28,27 @@ create_xhttp_reality_config(){
|
||||
cp "$config_dir/template/xhttp_reality_config.json" "$config_dir/config.json"
|
||||
|
||||
# 生成uui, 写入到config.json文件
|
||||
bash $script_dir/update_uuid.sh
|
||||
update_uuid
|
||||
|
||||
# 生成密钥对, 修改config.json中的密钥属性
|
||||
bash $script_dir/update_key.sh
|
||||
update_key
|
||||
|
||||
# 生成xhttp_path, 写入到config.json文件
|
||||
bash $script_dir/update_xhttp_path.sh
|
||||
update_xhttp_path
|
||||
|
||||
# 设置realty_dest目标域名
|
||||
bash $script_dir/update_reality_dest.sh
|
||||
update_reality_dest
|
||||
|
||||
# 设置端口
|
||||
bash $script_dir/update_port.sh
|
||||
update_port
|
||||
|
||||
green "成功创建配置"
|
||||
}
|
||||
|
||||
|
||||
|
||||
create_config(){
|
||||
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # 脚本文件绝对路径
|
||||
source "$script_dir/utils/base.sh"
|
||||
# 检查jq是否安装
|
||||
check_jq
|
||||
|
||||
@@ -73,7 +73,3 @@ create_config(){
|
||||
*) echo "无效选择,退出" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
create_config
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user