From 8a343b3e3dd62b9908d95de1d8b5fd018086d059 Mon Sep 17 00:00:00 2001 From: neru Date: Tue, 12 May 2026 18:55:44 -0300 Subject: [PATCH] fix: use alpn on clientssl as well --- src/proxy/tinymitm/proxy.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/proxy/tinymitm/proxy.cpp b/src/proxy/tinymitm/proxy.cpp index 8ebd705..a89a015 100644 --- a/src/proxy/tinymitm/proxy.cpp +++ b/src/proxy/tinymitm/proxy.cpp @@ -282,7 +282,10 @@ void TinyMITMProxy::handleClient(SOCKET clientSocket) wolfSSL_set_fd(remoteSSL.get(), (int)remoteGuard); char alpnList[] = "\x08http/1.1"; + wolfSSL_UseALPN(remoteSSL.get(), alpnList, sizeof(alpnList) - 1, 0); + wolfSSL_UseALPN(clientSSL.get(), alpnList, sizeof(alpnList) - 1, 0); + wolfSSL_UseSNI(remoteSSL.get(), WOLFSSL_SNI_HOST_NAME, host.c_str(), (unsigned short)host.size()); setNonBlocking(clientGuard);