修改生成uuid方式

This commit is contained in:
Kiolow 2024-10-27 14:30:08 +08:00
parent 4ac024f8a7
commit 7307383451
2 changed files with 2 additions and 6 deletions

View File

@ -1,4 +0,0 @@
#!/bin/bash
# Remove Xray
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ remove

View File

@ -4,7 +4,7 @@ script_dir=$(cd "$(dirname "$0")"; pwd) # 脚本文件绝对路径
config_dir="$script_dir/../conf"
# 生成 UUID
uuid=$(xray uuid)
uuid=$(docker run --rm teddysun/xray:latest xray uuid)
# 使用 jq 修改 JSON 文件
jq ".inbounds[0].settings.clients[0].id=\"$uuid\"" $config_dir/config.json > $config_dir/config.json_tmp