i2p: log connection was refused due to arbitrary port

This commit is contained in:
brunoerg
2024-02-06 14:06:52 -03:00
parent 4de84557d6
commit 5b358cdd1a
2 changed files with 6 additions and 13 deletions

View File

@@ -217,6 +217,7 @@ bool Session::Connect(const CService& to, Connection& conn, bool& proxy_error)
// Refuse connecting to arbitrary ports. We don't specify any destination port to the SAM proxy
// when connecting (SAM 3.1 does not use ports) and it forces/defaults it to I2P_SAM31_PORT.
if (to.GetPort() != I2P_SAM31_PORT) {
Log("Error connecting to %s, connection refused due to arbitrary port %s", to.ToStringAddrPort(), to.GetPort());
proxy_error = false;
return false;
}