Browse Source

use outbound.nickname as tunnel name if inbound.nickname is not set

pull/988/merge
orignal 7 years ago
parent
commit
6db7c5733d
  1. 8
      libi2pd/Destination.cpp
  2. 1
      libi2pd/Destination.h

8
libi2pd/Destination.cpp

@ -59,7 +59,13 @@ namespace client
} }
} }
it = params->find (I2CP_PARAM_INBOUND_NICKNAME); it = params->find (I2CP_PARAM_INBOUND_NICKNAME);
if (it != params->end ()) m_Nickname = it->second; // otherwise we set deafult nickname in Start when we know local address if (it != params->end ()) m_Nickname = it->second;
else // try outbound
{
it = params->find (I2CP_PARAM_OUTBOUND_NICKNAME);
if (it != params->end ()) m_Nickname = it->second;
// otherwise we set deafult nickname in Start when we know local address
}
} }
} }
catch (std::exception & ex) catch (std::exception & ex)

1
libi2pd/Destination.h

@ -51,6 +51,7 @@ namespace client
const char I2CP_PARAM_TAGS_TO_SEND[] = "crypto.tagsToSend"; const char I2CP_PARAM_TAGS_TO_SEND[] = "crypto.tagsToSend";
const int DEFAULT_TAGS_TO_SEND = 40; const int DEFAULT_TAGS_TO_SEND = 40;
const char I2CP_PARAM_INBOUND_NICKNAME[] = "inbound.nickname"; const char I2CP_PARAM_INBOUND_NICKNAME[] = "inbound.nickname";
const char I2CP_PARAM_OUTBOUND_NICKNAME[] = "outbound.nickname";
// latency // latency
const char I2CP_PARAM_MIN_TUNNEL_LATENCY[] = "latency.min"; const char I2CP_PARAM_MIN_TUNNEL_LATENCY[] = "latency.min";

Loading…
Cancel
Save