分析连接增加shortId

This commit is contained in:
Olia Lisa
2026-04-19 13:21:26 +08:00
parent 6f8858fdbc
commit 069308a343
+6 -3
View File
@@ -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 ""