From 44942e3b707865c1b1e12719e98f1916bb767778 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:44:23 +0330 Subject: [PATCH] Fix: simplify SNI fingerprint generation using OpenSSL only --- core/scripts/hysteria2/change_sni.sh | 29 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/core/scripts/hysteria2/change_sni.sh b/core/scripts/hysteria2/change_sni.sh index 533f046..2f590ea 100644 --- a/core/scripts/hysteria2/change_sni.sh +++ b/core/scripts/hysteria2/change_sni.sh @@ -19,25 +19,26 @@ update_sni() { openssl req -new -x509 -days 36500 -key ca.key -out ca.crt -subj "/CN=$sni" >/dev/null 2>&1 chown hysteria:hysteria /etc/hysteria/ca.key /etc/hysteria/ca.crt chmod 640 /etc/hysteria/ca.key /etc/hysteria/ca.crt - fingerprint=$(openssl x509 -noout -fingerprint -sha256 -inform pem -in ca.crt | sed 's/.*=//;s/://g') + sha256=$(openssl x509 -noout -fingerprint -sha256 -inform pem -in ca.crt | sed 's/.*=//;s///g') - sha256=$(python3 - <