函数里的变量, 改为局部变量

This commit is contained in:
Olia Lisa
2026-01-15 14:02:40 +08:00
parent 6ef7ad5744
commit f85766154c
5 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ update_key(){
docker run --rm teddysun/xray:latest /usr/bin/xray x25519 > $config_dir/key.txt
# 获取私钥
private_key=$(grep "Private" $config_dir/key.txt | awk -F ': ' '{print $2}')
local private_key=$(grep "Private" $config_dir/key.txt | awk -F ': ' '{print $2}')
# 修改config.json密钥属性
modify_json_file "$config_dir/config.json" ".inbounds[0].streamSettings.realitySettings.privateKey" "$private_key"