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

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
View File
@@ -6,6 +6,7 @@ update_xhttp_path(){
local config_dir="$script_dir/../conf"
local path_length="$(( RANDOM % 4 + 8 ))"
local uuid=$(cat /proc/sys/kernel/random/uuid)
local xhttp_path="/"$(docker run --rm teddysun/xray:latest xray uuid | tr -d '-' | cut -c 1-$path_length)
# 修改config.json的xhttp_path