From dd80d3601bc9ec0f8eca4a7bf07c5fb178a562ef Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Sat, 22 Nov 2025 16:45:35 +0800 Subject: [PATCH] update --- bin/update_xhttp_path.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 bin/update_xhttp_path.sh diff --git a/bin/update_xhttp_path.sh b/bin/update_xhttp_path.sh new file mode 100644 index 0000000..dc25ff3 --- /dev/null +++ b/bin/update_xhttp_path.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +update_xhttp_path(){ + + script_dir=$(cd "$(dirname "$0")"; pwd) # 脚本文件绝对路径 + config_dir="$script_dir/../conf" + source $script_dir/utils/jq_util.sh + + path_length="$(( RANDOM % 4 + 8 ))" + xhttp_path="/"$(docker run --rm teddysun/xray:latest xray uuid | tr -d '-' | cut -c 1-$path_length) + + echo "设置xhttp_path成功" + + ## 修改config.json的xhttp_path + modify_json_file "$config_dir/config.json" ".inbounds[0].streamSettings.xhttpSettings.path" "$xhttp_path" + +} + +update_xhttp_path