This commit is contained in:
dr|z3d 2021-09-05 02:33:56 +00:00
commit feed4c8d4b
7 changed files with 24 additions and 20 deletions

View file

@ -713,7 +713,10 @@ namespace client
std::shared_ptr<ClientDestination> localDestination = nullptr;
auto it = destinations.find (keys);
if (it != destinations.end ())
{
localDestination = it->second;
localDestination->SetPublic (true);
}
else
{
i2p::data::PrivateKeys k;
@ -725,6 +728,8 @@ namespace client
localDestination = CreateNewLocalDestination (k, true, &options);
destinations[keys] = localDestination;
}
else
localDestination->SetPublic (true);
}
if (type == I2P_TUNNELS_SECTION_TYPE_UDPSERVER)
{

View file

@ -22,6 +22,7 @@
#include "BOB.h"
#include "I2CP.h"
#include "AddressBook.h"
#include "I18N_langs.h"
namespace i2p
{
@ -102,6 +103,10 @@ namespace client
std::vector<std::shared_ptr<DatagramSessionInfo> > GetForwardInfosFor(const i2p::data::IdentHash & destination);
// i18n
std::shared_ptr<const i2p::i18n::Locale> GetLanguage () { return m_Language; };
void SetLanguage (const std::shared_ptr<const i2p::i18n::Locale> language) { m_Language = language; };
private:
void ReadTunnels ();
@ -149,6 +154,9 @@ namespace client
std::unique_ptr<boost::asio::deadline_timer> m_CleanupUDPTimer;
// i18n
std::shared_ptr<const i2p::i18n::Locale> m_Language;
public:
// for HTTP