From 18adcb65ce84f2f7521ed0aa80a80d4f5a6b849a Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Thu, 11 Sep 2025 10:08:34 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=ACxray-core=20publickey=20=E5=AD=97=E6=AE=B5=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/print_share_link.sh | 4 ++-- bin/update_key.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/print_share_link.sh b/bin/print_share_link.sh index 66af0f7..4364d94 100644 --- a/bin/print_share_link.sh +++ b/bin/print_share_link.sh @@ -23,7 +23,7 @@ port=$(jq -r '.inbounds[0].port' $config_dir/config.json) dest=$(jq -r '.inbounds[0].streamSettings.realitySettings.dest' $config_dir/config.json) sni=$(echo $dest | awk -F ':' '{print $1}') network="tcp" -public_key=$(cat $config_dir/key.txt | grep "Public" | awk -F ': ' '{print $2}') +public_key=$(cat $config_dir/key.txt | grep "Password" | awk -F ': ' '{print $2}') # 打印配置信息 echo -e "\033[32m" # config info with green color @@ -32,7 +32,7 @@ echo "port: $port" echo "uuid: $uuid" echo "dest: $dest" echo "sni: $sni" -echo "public_key: $public_key" +echo "publicKey/password: $public_key" echo "network: $network" if [ "$ipv4" != "null" ]; then sub_ipv4="vless://$uuid@$ipv4:$port?encryption=none&security=reality&type=$network&sni=$sni&fp=chrome&pbk=$public_key&flow=xtls-rprx-vision#my_docker_vless_reality_vision" diff --git a/bin/update_key.sh b/bin/update_key.sh index 2aa1c38..b7baf1c 100644 --- a/bin/update_key.sh +++ b/bin/update_key.sh @@ -8,7 +8,7 @@ source $script_dir/utils/jq_util.sh docker run --rm teddysun/xray:latest /usr/bin/xray x25519 > $config_dir/key.txt # 获取私钥 -private_key=$(grep "Private key" $config_dir/key.txt | awk -F ': ' '{print $2}') +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"