mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-07-29 14:19:29 +00:00
don't replace Host header if it's .b32.i2p already
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user