Browse Source

Use of 'server' type tunnel port as inport (#1936)

Signed-off-by: r4sas <r4sas@i2pmail.org>
pull/1938/head
R4SAS 2 years ago
parent
commit
3af1f4bc76
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 8
      ChangeLog
  2. 18
      libi2pd_client/I2PTunnel.cpp

8
ChangeLog

@ -5,9 +5,9 @@
### Added ### Added
- Allow user/password authentication method for SOCK5 proxy - Allow user/password authentication method for SOCK5 proxy
- Publish reject all congestion cap 'G' if transit is not accepted - Publish reject all congestion cap 'G' if transit is not accepted
- 'critical' log level - 'critical' log level
- Print b32 on webconsole destination page - Print b32 on webconsole destination page
- Webconsole button to drop a remote LeaseSet - Webconsole button to drop a remote LeaseSet
- limits.zombies param - minimum percentage of successfully created tunnels for routers cleanup - limits.zombies param - minimum percentage of successfully created tunnels for routers cleanup
- Recognize real routers if successfully connected or responded to tunnel build request - Recognize real routers if successfully connected or responded to tunnel build request
### Changed ### Changed
@ -26,7 +26,9 @@
- i2p.streaming.answerPings param - i2p.streaming.answerPings param
- Reload tunnels - Reload tunnels
- Address caps for unspecified ipv6 address - Address caps for unspecified ipv6 address
- Incomplete HTTP headers in I2P tunnels - Incomplete HTTP headers in I2P tunnels
- SSU2 socket network exceptions on Windows
- Use of 'server' type tunnel port as inport (#1936)
## [2.47.0] - 2023-03-11 ## [2.47.0] - 2023-03-11
### Added ### Added

18
libi2pd_client/I2PTunnel.cpp

@ -351,7 +351,7 @@ namespace client
m_InHeader.clear (); m_InHeader.clear ();
m_InHeader << line; m_InHeader << line;
break; break;
} }
} }
if (endOfHeader) if (endOfHeader)
@ -434,12 +434,12 @@ namespace client
} }
} }
else else
{ {
// insert incomplete line back // insert incomplete line back
m_InHeader.clear (); m_InHeader.clear ();
m_InHeader << line; m_InHeader << line;
break; break;
} }
} }
if (endOfHeader) if (endOfHeader)
@ -508,12 +508,12 @@ namespace client
} }
} }
else else
{ {
// insert incomplete line back // insert incomplete line back
m_InHeader.clear (); m_InHeader.clear ();
m_InHeader << line; m_InHeader << line;
break; break;
} }
} }
if (endOfHeader) if (endOfHeader)
@ -708,10 +708,10 @@ namespace client
int port, std::shared_ptr<ClientDestination> localDestination, int inport, bool gzip): int port, std::shared_ptr<ClientDestination> localDestination, int inport, bool gzip):
I2PService (localDestination), m_IsUniqueLocal(true), m_Name (name), m_Address (address), m_Port (port), m_IsAccessList (false) I2PService (localDestination), m_IsUniqueLocal(true), m_Name (name), m_Address (address), m_Port (port), m_IsAccessList (false)
{ {
if (!inport) inport = port; int inPort = (inport ? inport : port);
m_PortDestination = localDestination->GetStreamingDestination (inport); m_PortDestination = localDestination->GetStreamingDestination (inPort);
if (!m_PortDestination) // default destination if (!m_PortDestination) // default destination
m_PortDestination = localDestination->CreateStreamingDestination (inport, gzip); m_PortDestination = localDestination->CreateStreamingDestination (inPort, gzip);
} }
void I2PServerTunnel::Start () void I2PServerTunnel::Start ()

Loading…
Cancel
Save