This commit is contained in:
root
2024-02-28 07:34:02 +00:00
parent f4dd191f52
commit ed3febb297
7 changed files with 50 additions and 9 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# 生成 UUID
uuid=$(uuidgen -r 4)
# 使用 jq 修改 JSON 文件
jq ".inbounds[0].settings.clients[0].id=\"$uuid\"" ../conf/config.json > ../conf/config.json_tmp
# 替换原始文件
mv ../conf/config.json_tmp ../conf/config.json
# 验证结果
echo "UUID 已更新为: $uuid"