Skip to content

Commit

Permalink
make sure server tunnel is published
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Sep 4, 2021
1 parent e8f4c42 commit 41d6c11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions libi2pd/Destination.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ namespace client
void SetLeaseSetUpdated ();

bool IsPublic () const { return m_IsPublic; };
void SetPublic (bool pub) { m_IsPublic = pub; };

protected:

Expand Down
5 changes: 5 additions & 0 deletions libi2pd_client/ClientContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down

0 comments on commit 41d6c11

Please sign in to comment.