This commit is contained in:
vincent
2024-02-28 22:00:27 +08:00
parent bd43db3a6c
commit cf61ead0ab
6 changed files with 16 additions and 19 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# 生成 UUID
uuid=$(uuidgen -r 4)
uuid=$(xray uuid)
# 使用 jq 修改 JSON 文件
jq ".inbounds[0].settings.clients[0].id=\"$uuid\"" ../conf/config.json > ../conf/config.json_tmp
@@ -10,6 +10,6 @@ jq ".inbounds[0].settings.clients[0].id=\"$uuid\"" ../conf/config.json > ../conf
mv ../conf/config.json_tmp ../conf/config.json
# 验证结果
echo "UUID 已更新为: $uuid"
echo "设置UUID成功."