From 069308a3439aad2e9140db93c529aa509e3a7df8 Mon Sep 17 00:00:00 2001 From: Olia Lisa Date: Sun, 19 Apr 2026 13:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=9E=90=E8=BF=9E=E6=8E=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0shortId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/print_share_link.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/print_share_link.sh b/bin/print_share_link.sh index f72c5f3..0719f81 100644 --- a/bin/print_share_link.sh +++ b/bin/print_share_link.sh @@ -13,6 +13,7 @@ print_reality_share_link(){ local sni=$(echo $dest | awk -F ':' '{print $1}') local network="tcp" local public_key=$(cat $config_dir/key.txt | grep "Password" | awk -F ': ' '{print $2}') + local short_id=$(jq -r '.inbounds[0].streamSettings.realitySettings.shortIds[0]' $config_dir/config.json) # 打印配置信息 echo -e "\033[32m" # config info with green color @@ -23,8 +24,9 @@ print_reality_share_link(){ echo "sni: $sni" echo "publicKey/password: $public_key" echo "network: $network" + echo "short_id: $short_id" - local sub_ipv4="vless://$uuid@$ipv4:$port?encryption=none&security=reality&type=$network&sni=$sni&fp=chrome&pbk=$public_key&flow=xtls-rprx-vision#我的最新vless机场" + local sub_ipv4="vless://$uuid@$ipv4:$port?encryption=none&security=reality&type=$network&sni=$sni&fp=chrome&pbk=$public_key&sid=$short_id&flow=xtls-rprx-vision#我的最新vless机场" echo "" echo "分享连接: $sub_ipv4" echo "" @@ -45,7 +47,7 @@ print_xhttp_reality_share_link(){ local network=$(jq -r '.inbounds[0].streamSettings.network' $config_dir/config.json) local xhttp_path=$(jq -r ".inbounds[0].streamSettings.xhttpSettings.path" $config_dir/config.json) local public_key=$(cat $config_dir/key.txt | grep "Password" | awk -F ': ' '{print $2}') - + local short_id=$(jq -r '.inbounds[0].streamSettings.realitySettings.shortIds[0]' $config_dir/config.json) # 打印配置信息 echo -e "\033[32m" # config info with green color @@ -57,8 +59,9 @@ print_xhttp_reality_share_link(){ echo "publicKey/password: $public_key" echo "network: $network" echo "xhttp_path: $xhttp_path" + echo "short_id: $short_id" - local sub_ipv4="vless://$uuid@$ipv4:$port?encryption=none&security=reality&type=$network&sni=$sni&fp=chrome&pbk=$public_key&path=$xhttp_path&mode=auto#${ipv4}-my_xray_xhttp_reality" + local sub_ipv4="vless://$uuid@$ipv4:$port?encryption=none&security=reality&type=$network&sni=$sni&fp=chrome&pbk=$public_key&path=$xhttp_path&mode=auto&sid=$short_id#${ipv4}-my_xray_xhttp_reality" echo "" echo "ipv4 分享连接: $sub_ipv4" echo ""