From 4b03c28c41e3281d98b81548973a56fcff08ad81 Mon Sep 17 00:00:00 2001 From: Andrey Petelin Date: Fri, 29 May 2026 15:58:02 +0500 Subject: [PATCH] fix: initialize scheme before checking security and clear fingerprint for hysteria2 (hy2) schemes --- podkop/files/usr/lib/sing_box_config_facade.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/podkop/files/usr/lib/sing_box_config_facade.sh b/podkop/files/usr/lib/sing_box_config_facade.sh index 6887e20..7641673 100644 --- a/podkop/files/usr/lib/sing_box_config_facade.sh +++ b/podkop/files/usr/lib/sing_box_config_facade.sh @@ -178,8 +178,9 @@ _add_outbound_security() { local security scheme security=$(url_get_query_param "$url" "security") + scheme="$(url_get_scheme "$url")" + if [ -z "$security" ]; then - scheme="$(url_get_scheme "$url")" if [ "$scheme" = "hysteria2" ] || [ "$scheme" = "hy2" ]; then security="tls" fi @@ -195,6 +196,10 @@ _add_outbound_security() { public_key=$(url_get_query_param "$url" "pbk") short_id=$(url_get_query_param "$url" "sid") + if [ "$scheme" = "hysteria2" ] || [ "$scheme" = "hy2" ]; then + fingerprint="" + fi + config=$( sing_box_cm_set_tls_for_outbound \ "$config" \