From 2c46f85b7a972f4fe7758e9471db9c78a9e2211c Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 30 Jul 2026 09:36:58 -0400 Subject: [PATCH] pass port to Host: header if specified in original request --- libi2pd_client/HTTPProxy.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libi2pd_client/HTTPProxy.cpp b/libi2pd_client/HTTPProxy.cpp index e80d96de..764f599b 100644 --- a/libi2pd_client/HTTPProxy.cpp +++ b/libi2pd_client/HTTPProxy.cpp @@ -510,7 +510,11 @@ namespace proxy { auto b32Host = addr->ToBase32 (); if (!b32Host.empty ()) - m_ClientRequest.UpdateHeader("Host", b32Host + ".b32.i2p"); // replace our name to .b32.i2p address + { + b32Host += ".b32.i2p"; + if (m_RequestURL.port) b32Host += ":" + std::to_string(m_RequestURL.port); + m_ClientRequest.UpdateHeader("Host", b32Host); // replace our name to .b32.i2p address + } else { // invaild address