update
This commit is contained in:
parent
3f5c3eb348
commit
d0341d1324
@ -19,6 +19,9 @@ create_reality_config(){
|
|||||||
# 设置端口
|
# 设置端口
|
||||||
bash $script_dir/update_port.sh
|
bash $script_dir/update_port.sh
|
||||||
|
|
||||||
|
# 设置realty_dest
|
||||||
|
bash $script_dir/update_reality_dest.sh www.pranichealingsrilanka.com
|
||||||
|
|
||||||
echo "初始化完成"
|
echo "初始化完成"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +44,9 @@ create_xhttp_reality_config(){
|
|||||||
# 生成xhttp_path, 写入到config.json文件
|
# 生成xhttp_path, 写入到config.json文件
|
||||||
bash $script_dir/update_xhttp_path.sh
|
bash $script_dir/update_xhttp_path.sh
|
||||||
|
|
||||||
|
# 设置realty_dest
|
||||||
|
bash $script_dir/update_reality_dest.sh www.pranichealingsrilanka.com
|
||||||
|
|
||||||
# 设置端口
|
# 设置端口
|
||||||
bash $script_dir/update_port.sh
|
bash $script_dir/update_port.sh
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,28 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
update_realty_dest(){
|
update_reality_dest(){
|
||||||
script_dir=$(cd "$(dirname "$0")"; pwd)
|
local script_dir=$(cd "$(dirname "$0")"; pwd)
|
||||||
config_dir="$script_dir/../conf"
|
local config_dir="$script_dir/../conf"
|
||||||
source $script_dir/utils/jq_util.sh
|
|
||||||
|
|
||||||
# 输入dest值
|
|
||||||
old_dest=$(jq -r '.inbounds[0].streamSettings.realitySettings.dest' "$config_dir/config.json")
|
|
||||||
local dest
|
|
||||||
read -p "请输入新的dest地址[当前地址: $old_dest]: " dest
|
|
||||||
|
|
||||||
# 如果输入dest为空
|
|
||||||
if [[ -z "$dest" ]]; then
|
|
||||||
echo "输入dest为空,退出脚本"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
domain=$(echo "$dest" | awk -F ':' '{print $1}')
|
|
||||||
|
|
||||||
|
local domain=$1
|
||||||
sed -i "s/你的reality_dest/$domain/g" "$config_dir/config.json"
|
sed -i "s/你的reality_dest/$domain/g" "$config_dir/config.json"
|
||||||
|
echo "修改realty_dest成功"
|
||||||
echo "配置文件修改realty_dest成功!"
|
|
||||||
echo "新的dest地址为: $dest"
|
|
||||||
echo "新的serverNames数组为: [\"$domain\"]"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
update_realty_dest
|
update_reality_dest $1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user