From 361bee94803f0cfd9a3837acdd06a7cc457c4c4e Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 14 Jul 2026 19:40:43 -0400 Subject: [PATCH] don't replace Host header if it's .b32.i2p already --- libi2pd_client/HTTPProxy.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libi2pd_client/HTTPProxy.cpp b/libi2pd_client/HTTPProxy.cpp index 578e6d7e..e80d96de 100644 --- a/libi2pd_client/HTTPProxy.cpp +++ b/libi2pd_client/HTTPProxy.cpp @@ -506,14 +506,17 @@ namespace proxy auto addr = i2p::client::context.GetAddressBook ().GetAddress (dest_host); if (addr) { - auto b32Host = addr->ToBase32 (); - if (!b32Host.empty ()) - m_ClientRequest.UpdateHeader("Host", b32Host + ".b32.i2p"); // replace our name to .b32.i2p address - else + if (!str_rmatch(dest_host, ".b32.i2p")) { - // invaild address - HostNotFound(dest_host); - return true; + auto b32Host = addr->ToBase32 (); + if (!b32Host.empty ()) + m_ClientRequest.UpdateHeader("Host", b32Host + ".b32.i2p"); // replace our name to .b32.i2p address + else + { + // invaild address + HostNotFound(dest_host); + return true; + } } } else