diff --git a/sb.sh b/sb.sh index 128279e..a88177a 100644 --- a/sb.sh +++ b/sb.sh @@ -743,6 +743,19 @@ fi if [[ -f /etc/s-box/cfvmadd_local.txt ]]; then vmadd_local=$(cat /etc/s-box/cfvmadd_local.txt 2>/dev/null) vmadd_are_local=$(cat /etc/s-box/cfvmadd_local.txt 2>/dev/null) +else +if [[ "$tls" = "false" ]]; then +if [[ -f /etc/s-box/cfymjx.txt ]]; then +vm_name=$(cat /etc/s-box/cfymjx.txt 2>/dev/null) +else +vm_name=$(jq -r '.inbounds[1].tls.server_name' /etc/s-box/sb.json) +fi +vmadd_local=$server_ipcl +vmadd_are_local=$server_ip +else +vmadd_local=$vm_name +vmadd_are_local=$vm_name +fi fi if [[ -f /etc/s-box/cfvmadd_argo.txt ]]; then vmadd_argo=$(cat /etc/s-box/cfvmadd_argo.txt 2>/dev/null)