From 78e1fb85accc5ebf6d92e848c8456e4338e95ef8 Mon Sep 17 00:00:00 2001 From: bol-van Date: Mon, 29 Dec 2025 14:08:34 +0300 Subject: [PATCH] zapret-antidpi: use TLS_EXT_SERVER_NAME --- lua/zapret-antidpi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/zapret-antidpi.lua b/lua/zapret-antidpi.lua index f3ead90..f3d9321 100644 --- a/lua/zapret-antidpi.lua +++ b/lua/zapret-antidpi.lua @@ -317,7 +317,7 @@ function tls_client_hello_clone(ctx, desync) end local idx_sni if desync.arg.sni_snt or desync.arg.sni_del_ext or desync.arg.sni_del or desync.arg.sni_first or desync.arg.sni_last then - idx_sni = array_field_search(tdis.handshake[TLS_HANDSHAKE_TYPE_CLIENT].dis.ext, "type", 0) + idx_sni = array_field_search(tdis.handshake[TLS_HANDSHAKE_TYPE_CLIENT].dis.ext, "type", TLS_EXT_SERVER_NAME) if not idx_sni then DLOG("tls_client_hello_clone: no SNI extension. adding") table.insert(tdis.handshake[TLS_HANDSHAKE_TYPE_CLIENT].dis.ext, 1, { type = TLS_EXT_SERVER_NAME, dis = { list = {} } } )