fix: use plain SNI in share links for v2rayNG import

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-28 00:05:01 +08:00
parent 1fc3b8a89c
commit c2c8ae826d
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -17,15 +17,15 @@ done
mkdir -p "$OUT_DIR"
urlencode() {
python3 -c "import sys; print(sys.argv[1].replace('.', '%2E'))" "$1"
urlencode_sni() {
python3 -c "import sys; print(sys.argv[1])" "$1"
}
REALITY_SNI_ENC="$(urlencode "$REALITY_SERVER_NAME")"
REALITY_SNI_ENC="$(urlencode_sni "$REALITY_SERVER_NAME")"
REALITY_PBK_ENC="$REALITY_PUBLIC_KEY"
REALITY_SID_ENC="$REALITY_SHORT_ID"
HY2_PASSWORD_ENC="$(python3 -c "import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1], safe=''))" "$HY2_PASSWORD")"
DOMAIN_SNI_ENC="$(urlencode "$DOMAIN")"
DOMAIN_SNI_ENC="$(urlencode_sni "$DOMAIN")"
sed -e "s|\${VPS_IP}|${VPS_IP}|g" \
-e "s|\${DOMAIN}|${DOMAIN}|g" \