fix: improve VLESS link compatibility and add Reality repair script

Only encode SNI dots, keep pbk/sid raw, copy links via API, prefer xray keygen, and add repair-reality.sh for server-side fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-27 23:58:14 +08:00
parent 40d10a846f
commit 1fc3b8a89c
9 changed files with 127 additions and 28 deletions
+9 -3
View File
@@ -22,9 +22,15 @@ else
SB="sing-box"
fi
KEYPAIR="$("$SB" generate reality-keypair)"
REALITY_PRIVATE_KEY="$(echo "$KEYPAIR" | grep 'PrivateKey:' | awk '{print $2}')"
REALITY_PUBLIC_KEY="$(echo "$KEYPAIR" | grep 'PublicKey:' | awk '{print $2}')"
if command -v xray &>/dev/null; then
KEYPAIR="$(xray x25519)"
REALITY_PRIVATE_KEY="$(echo "$KEYPAIR" | awk '/Private key/ {print $3; exit} /PrivateKey/ {print $3; exit}')"
REALITY_PUBLIC_KEY="$(echo "$KEYPAIR" | awk '/Public key/ {print $3; exit} /Password/ {print $3; exit}')"
else
KEYPAIR="$("$SB" generate reality-keypair)"
REALITY_PRIVATE_KEY="$(echo "$KEYPAIR" | grep 'PrivateKey:' | awk '{print $2}')"
REALITY_PUBLIC_KEY="$(echo "$KEYPAIR" | grep 'PublicKey:' | awk '{print $2}')"
fi
REALITY_SHORT_ID="$("$SB" generate rand --hex 8)"
GENERATE_PANEL_PASSWORD=1