don't replace Host header if it's .b32.i2p already

This commit is contained in:
orignal
2026-07-14 19:40:43 -04:00
parent 58bdff19ac
commit 361bee9480
+10 -7
View File
@@ -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