mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
set server tunnel inport in ClientContext from port (#1936)
Signed-off-by: r4sas <r4sas@i2pmail.org>
This commit is contained in:
parent
03cc6e0524
commit
a0795d8534
@ -723,7 +723,7 @@ namespace client
|
|||||||
uint16_t port = section.second.get<uint16_t> (I2P_SERVER_TUNNEL_PORT);
|
uint16_t port = section.second.get<uint16_t> (I2P_SERVER_TUNNEL_PORT);
|
||||||
std::string keys = section.second.get<std::string> (I2P_SERVER_TUNNEL_KEYS);
|
std::string keys = section.second.get<std::string> (I2P_SERVER_TUNNEL_KEYS);
|
||||||
// optional params
|
// optional params
|
||||||
uint16_t inPort = section.second.get<uint16_t> (I2P_SERVER_TUNNEL_INPORT, 0);
|
uint16_t inPort = section.second.get<uint16_t> (I2P_SERVER_TUNNEL_INPORT, port);
|
||||||
std::string accessList = section.second.get<std::string> (I2P_SERVER_TUNNEL_ACCESS_LIST, "");
|
std::string accessList = section.second.get<std::string> (I2P_SERVER_TUNNEL_ACCESS_LIST, "");
|
||||||
if(accessList == "")
|
if(accessList == "")
|
||||||
accessList = section.second.get<std::string> (I2P_SERVER_TUNNEL_WHITE_LIST, "");
|
accessList = section.second.get<std::string> (I2P_SERVER_TUNNEL_WHITE_LIST, "");
|
||||||
|
@ -708,10 +708,9 @@ namespace client
|
|||||||
uint16_t port, std::shared_ptr<ClientDestination> localDestination, uint16_t inport, bool gzip):
|
uint16_t port, std::shared_ptr<ClientDestination> localDestination, uint16_t 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)
|
||||||
{
|
{
|
||||||
uint16_t 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…
Reference in New Issue
Block a user