From 89e5b56a19c80d2e102c47216d730be4b6633089 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 15 Oct 2014 20:52:17 -0400 Subject: [PATCH] introduced ClientContext --- ClientContext.cpp | 146 ++++++++++++++++++++++++++++++++++ ClientContext.h | 54 +++++++++++++ Daemon.cpp | 13 +-- Destination.cpp | 153 ------------------------------------ Destination.h | 46 +---------- HTTPServer.cpp | 15 ++-- I2PTunnel.cpp | 3 +- SAM.cpp | 7 +- SOCKS.cpp | 5 +- Win32/i2pd.vcxproj | 2 + build/CMakeLists.txt | 3 +- build/autotools/Makefile.in | 4 +- filelist.mk | 4 +- 13 files changed, 234 insertions(+), 221 deletions(-) create mode 100644 ClientContext.cpp create mode 100644 ClientContext.h diff --git a/ClientContext.cpp b/ClientContext.cpp new file mode 100644 index 00000000..5a5b2b93 --- /dev/null +++ b/ClientContext.cpp @@ -0,0 +1,146 @@ +#include "util.h" +#include "ClientContext.h" + +namespace i2p +{ +namespace client +{ + ClientContext context; + void ClientContext::Start () + { + if (!m_SharedLocalDestination) + { + m_SharedLocalDestination = new i2p::stream::StreamingDestination (false, i2p::data::SIGNING_KEY_TYPE_DSA_SHA1); // non-public, DSA + m_Destinations[m_SharedLocalDestination->GetIdentity ().GetIdentHash ()] = m_SharedLocalDestination; + m_SharedLocalDestination->Start (); + } + } + + void ClientContext::Stop () + { + for (auto it: m_Destinations) + { + it.second->Stop (); + delete it.second; + } + m_Destinations.clear (); + m_SharedLocalDestination = 0; // deleted through m_Destination + } + + void ClientContext::LoadLocalDestinations () + { + int numDestinations = 0; + boost::filesystem::path p (i2p::util::filesystem::GetDataDir()); + boost::filesystem::directory_iterator end; + for (boost::filesystem::directory_iterator it (p); it != end; ++it) + { + if (boost::filesystem::is_regular_file (*it) && it->path ().extension () == ".dat") + { + auto fullPath = +#if BOOST_VERSION > 10500 + it->path().string(); +#else + it->path(); +#endif + auto localDestination = new i2p::stream::StreamingDestination (fullPath, true); + m_Destinations[localDestination->GetIdentHash ()] = localDestination; + numDestinations++; + } + } + if (numDestinations > 0) + LogPrint (numDestinations, " local destinations loaded"); + } + + i2p::stream::StreamingDestination * ClientContext::LoadLocalDestination (const std::string& filename, bool isPublic) + { + auto localDestination = new i2p::stream::StreamingDestination (i2p::util::filesystem::GetFullPath (filename), isPublic); + std::unique_lock l(m_DestinationsMutex); + m_Destinations[localDestination->GetIdentHash ()] = localDestination; + localDestination->Start (); + return localDestination; + } + + i2p::stream::StreamingDestination * ClientContext::CreateNewLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType) + { + auto localDestination = new i2p::stream::StreamingDestination (isPublic, sigType); + std::unique_lock l(m_DestinationsMutex); + m_Destinations[localDestination->GetIdentHash ()] = localDestination; + localDestination->Start (); + return localDestination; + } + + void ClientContext::DeleteLocalDestination (i2p::stream::StreamingDestination * destination) + { + if (!destination) return; + auto it = m_Destinations.find (destination->GetIdentHash ()); + if (it != m_Destinations.end ()) + { + auto d = it->second; + { + std::unique_lock l(m_DestinationsMutex); + m_Destinations.erase (it); + } + d->Stop (); + delete d; + } + } + + i2p::stream::StreamingDestination * ClientContext::CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic) + { + auto it = m_Destinations.find (keys.GetPublic ().GetIdentHash ()); + if (it != m_Destinations.end ()) + { + LogPrint ("Local destination ", keys.GetPublic ().GetIdentHash ().ToBase32 (), ".b32.i2p exists"); + if (!it->second->IsRunning ()) + { + it->second->Start (); + return it->second; + } + return nullptr; + } + auto localDestination = new i2p::stream::StreamingDestination (keys, isPublic); + std::unique_lock l(m_DestinationsMutex); + m_Destinations[keys.GetPublic ().GetIdentHash ()] = localDestination; + localDestination->Start (); + return localDestination; + } + + i2p::stream::StreamingDestination * ClientContext::FindLocalDestination (const i2p::data::IdentHash& destination) const + { + auto it = m_Destinations.find (destination); + if (it != m_Destinations.end ()) + return it->second; + return nullptr; + } + + i2p::stream::StreamingDestination * GetSharedLocalDestination () + { + return context.GetSharedLocalDestination (); + } + + i2p::stream::StreamingDestination * CreateNewLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType) + { + return context.CreateNewLocalDestination (isPublic, sigType); + } + + i2p::stream::StreamingDestination * CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic) + { + return context.CreateNewLocalDestination (keys, isPublic); + } + + void DeleteLocalDestination (i2p::stream::StreamingDestination * destination) + { + context.DeleteLocalDestination (destination); + } + + i2p::stream::StreamingDestination * FindLocalDestination (const i2p::data::IdentHash& destination) + { + return context.FindLocalDestination (destination); + } + + i2p::stream::StreamingDestination * LoadLocalDestination (const std::string& filename, bool isPublic) + { + return context.LoadLocalDestination (filename, isPublic); + } +} +} diff --git a/ClientContext.h b/ClientContext.h new file mode 100644 index 00000000..1e7e8873 --- /dev/null +++ b/ClientContext.h @@ -0,0 +1,54 @@ +#ifndef CLIENT_CONTEXT_H__ +#define CLIENT_CONTEXT_H__ + +#include +#include "Destination.h" + +namespace i2p +{ +namespace client +{ + class ClientContext + { + public: + + ClientContext (): m_SharedLocalDestination (nullptr) {}; + ~ClientContext () {}; + + void Start (); + void Stop (); + + i2p::stream::StreamingDestination * GetSharedLocalDestination () const { return m_SharedLocalDestination; }; + i2p::stream::StreamingDestination * CreateNewLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType); + i2p::stream::StreamingDestination * CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic); + void DeleteLocalDestination (i2p::stream::StreamingDestination * destination); + i2p::stream::StreamingDestination * FindLocalDestination (const i2p::data::IdentHash& destination) const; + i2p::stream::StreamingDestination * LoadLocalDestination (const std::string& filename, bool isPublic); + + private: + + void LoadLocalDestinations (); + + private: + + std::mutex m_DestinationsMutex; + std::map m_Destinations; + i2p::stream::StreamingDestination * m_SharedLocalDestination; + + public: + // for HTTP + const decltype(m_Destinations)& GetDestinations () const { return m_Destinations; }; + }; + + extern ClientContext context; + + i2p::stream::StreamingDestination * GetSharedLocalDestination (); + i2p::stream::StreamingDestination * CreateNewLocalDestination (bool isPublic = true, i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_DSA_SHA1); // transient + i2p::stream::StreamingDestination * CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic = true); + void DeleteLocalDestination (i2p::stream::StreamingDestination * destination); + i2p::stream::StreamingDestination * FindLocalDestination (const i2p::data::IdentHash& destination); + i2p::stream::StreamingDestination * LoadLocalDestination (const std::string& filename, bool isPublic); +} +} + +#endif diff --git a/Daemon.cpp b/Daemon.cpp index 0fcf6c39..bacbc429 100644 --- a/Daemon.cpp +++ b/Daemon.cpp @@ -17,6 +17,7 @@ #include "HTTPServer.h" #include "HTTPProxy.h" #include "SOCKS.h" +#include "ClientContext.h" #include "I2PTunnel.h" #include "SAM.h" @@ -111,8 +112,8 @@ namespace i2p LogPrint("Transports started"); i2p::tunnel::tunnels.Start(); LogPrint("Tunnels started"); - i2p::stream::StartStreaming(); - LogPrint("Streaming started"); + i2p::client::context.Start (); + LogPrint("Client started"); d.httpProxy = new i2p::proxy::HTTPProxy(i2p::util::config::GetArg("-httpproxyport", 4446)); d.httpProxy->Start(); @@ -126,7 +127,7 @@ namespace i2p i2p::stream::StreamingDestination * localDestination = nullptr; std::string ircKeys = i2p::util::config::GetArg("-irckeys", ""); if (ircKeys.length () > 0) - localDestination = i2p::stream::LoadLocalDestination (ircKeys, false); + localDestination = i2p::client::LoadLocalDestination (ircKeys, false); d.ircTunnel = new i2p::stream::I2PClientTunnel (d.socksProxy->GetService (), ircDestination, i2p::util::config::GetArg("-ircport", 6668), localDestination); d.ircTunnel->Start (); @@ -135,7 +136,7 @@ namespace i2p std::string eepKeys = i2p::util::config::GetArg("-eepkeys", ""); if (eepKeys.length () > 0) // eepkeys file is presented { - auto localDestination = i2p::stream::LoadLocalDestination (eepKeys, true); + auto localDestination = i2p::client::LoadLocalDestination (eepKeys, true); d.serverTunnel = new i2p::stream::I2PServerTunnel (d.socksProxy->GetService (), i2p::util::config::GetArg("-eephost", "127.0.0.1"), i2p::util::config::GetArg("-eepport", 80), localDestination); @@ -160,8 +161,8 @@ namespace i2p LogPrint("HTTP Proxy stoped"); d.socksProxy->Stop(); LogPrint("SOCKS Proxy stoped"); - i2p::stream::StopStreaming(); - LogPrint("Streaming stoped"); + i2p::client::context.Stop(); + LogPrint("Client stoped"); i2p::tunnel::tunnels.Stop(); LogPrint("Tunnels stoped"); i2p::transports.Stop(); diff --git a/Destination.cpp b/Destination.cpp index 878834b7..13431b33 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -353,158 +353,5 @@ namespace stream } return nullptr; } - - StreamingDestinations destinations; - void StreamingDestinations::Start () - { - if (!m_SharedLocalDestination) - { - m_SharedLocalDestination = new StreamingDestination (false, i2p::data::SIGNING_KEY_TYPE_DSA_SHA1); // non-public, DSA - m_Destinations[m_SharedLocalDestination->GetIdentity ().GetIdentHash ()] = m_SharedLocalDestination; - m_SharedLocalDestination->Start (); - } - } - - void StreamingDestinations::Stop () - { - for (auto it: m_Destinations) - { - it.second->Stop (); - delete it.second; - } - m_Destinations.clear (); - m_SharedLocalDestination = 0; // deleted through m_Destination - } - - void StreamingDestinations::LoadLocalDestinations () - { - int numDestinations = 0; - boost::filesystem::path p (i2p::util::filesystem::GetDataDir()); - boost::filesystem::directory_iterator end; - for (boost::filesystem::directory_iterator it (p); it != end; ++it) - { - if (boost::filesystem::is_regular_file (*it) && it->path ().extension () == ".dat") - { - auto fullPath = -#if BOOST_VERSION > 10500 - it->path().string(); -#else - it->path(); -#endif - auto localDestination = new StreamingDestination (fullPath, true); - m_Destinations[localDestination->GetIdentHash ()] = localDestination; - numDestinations++; - } - } - if (numDestinations > 0) - LogPrint (numDestinations, " local destinations loaded"); - } - - StreamingDestination * StreamingDestinations::LoadLocalDestination (const std::string& filename, bool isPublic) - { - auto localDestination = new StreamingDestination (i2p::util::filesystem::GetFullPath (filename), isPublic); - std::unique_lock l(m_DestinationsMutex); - m_Destinations[localDestination->GetIdentHash ()] = localDestination; - localDestination->Start (); - return localDestination; - } - - StreamingDestination * StreamingDestinations::CreateNewLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType) - { - auto localDestination = new StreamingDestination (isPublic, sigType); - std::unique_lock l(m_DestinationsMutex); - m_Destinations[localDestination->GetIdentHash ()] = localDestination; - localDestination->Start (); - return localDestination; - } - - void StreamingDestinations::DeleteLocalDestination (StreamingDestination * destination) - { - if (!destination) return; - auto it = m_Destinations.find (destination->GetIdentHash ()); - if (it != m_Destinations.end ()) - { - auto d = it->second; - { - std::unique_lock l(m_DestinationsMutex); - m_Destinations.erase (it); - } - d->Stop (); - delete d; - } - } - - StreamingDestination * StreamingDestinations::CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic) - { - auto it = m_Destinations.find (keys.GetPublic ().GetIdentHash ()); - if (it != m_Destinations.end ()) - { - LogPrint ("Local destination ", keys.GetPublic ().GetIdentHash ().ToBase32 (), ".b32.i2p exists"); - if (!it->second->IsRunning ()) - { - it->second->Start (); - return it->second; - } - return nullptr; - } - auto localDestination = new StreamingDestination (keys, isPublic); - std::unique_lock l(m_DestinationsMutex); - m_Destinations[keys.GetPublic ().GetIdentHash ()] = localDestination; - localDestination->Start (); - return localDestination; - } - - StreamingDestination * StreamingDestinations::FindLocalDestination (const i2p::data::IdentHash& destination) const - { - auto it = m_Destinations.find (destination); - if (it != m_Destinations.end ()) - return it->second; - return nullptr; - } - - void StartStreaming () - { - destinations.Start (); - } - - void StopStreaming () - { - destinations.Stop (); - } - - StreamingDestination * GetSharedLocalDestination () - { - return destinations.GetSharedLocalDestination (); - } - - StreamingDestination * CreateNewLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType) - { - return destinations.CreateNewLocalDestination (isPublic, sigType); - } - - StreamingDestination * CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic) - { - return destinations.CreateNewLocalDestination (keys, isPublic); - } - - void DeleteLocalDestination (StreamingDestination * destination) - { - destinations.DeleteLocalDestination (destination); - } - - StreamingDestination * FindLocalDestination (const i2p::data::IdentHash& destination) - { - return destinations.FindLocalDestination (destination); - } - - StreamingDestination * LoadLocalDestination (const std::string& filename, bool isPublic) - { - return destinations.LoadLocalDestination (filename, isPublic); - } - - const StreamingDestinations& GetLocalDestinations () - { - return destinations; - } } } diff --git a/Destination.h b/Destination.h index 7c5cad39..809856a5 100644 --- a/Destination.h +++ b/Destination.h @@ -88,51 +88,7 @@ namespace stream // for HTTP only int GetNumRemoteLeaseSets () const { return m_RemoteLeaseSets.size (); }; const decltype(m_Streams)& GetStreams () const { return m_Streams; }; - }; - - class StreamingDestinations - { - public: - - StreamingDestinations (): m_SharedLocalDestination (nullptr) {}; - ~StreamingDestinations () {}; - - void Start (); - void Stop (); - - StreamingDestination * GetSharedLocalDestination () const { return m_SharedLocalDestination; }; - StreamingDestination * CreateNewLocalDestination (bool isPublic, i2p::data::SigningKeyType sigType); - StreamingDestination * CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic); - void DeleteLocalDestination (StreamingDestination * destination); - StreamingDestination * FindLocalDestination (const i2p::data::IdentHash& destination) const; - StreamingDestination * LoadLocalDestination (const std::string& filename, bool isPublic); - - private: - - void LoadLocalDestinations (); - - private: - - std::mutex m_DestinationsMutex; - std::map m_Destinations; - StreamingDestination * m_SharedLocalDestination; - - public: - // for HTTP - const decltype(m_Destinations)& GetDestinations () const { return m_Destinations; }; - }; - - - void StartStreaming (); - void StopStreaming (); - StreamingDestination * GetSharedLocalDestination (); - StreamingDestination * CreateNewLocalDestination (bool isPublic = true, i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_DSA_SHA1); // transient - StreamingDestination * CreateNewLocalDestination (const i2p::data::PrivateKeys& keys, bool isPublic = true); - void DeleteLocalDestination (StreamingDestination * destination); - StreamingDestination * FindLocalDestination (const i2p::data::IdentHash& destination); - StreamingDestination * LoadLocalDestination (const std::string& filename, bool isPublic); - // for HTTP - const StreamingDestinations& GetLocalDestinations (); + }; } } diff --git a/HTTPServer.cpp b/HTTPServer.cpp index 5be57604..d20d195a 100644 --- a/HTTPServer.cpp +++ b/HTTPServer.cpp @@ -10,6 +10,7 @@ #include "Streaming.h" #include "Destination.h" #include "RouterContext.h" +#include "ClientContext.h" #include "HTTPServer.h" // For image and info @@ -516,7 +517,7 @@ namespace util if (m_Stream) { m_Stream->Close (); - i2p::stream::GetSharedLocalDestination ()->DeleteStream (m_Stream); + i2p::client::GetSharedLocalDestination ()->DeleteStream (m_Stream); m_Stream = nullptr; } m_Socket->close (); @@ -779,7 +780,7 @@ namespace util void HTTPConnection::ShowLocalDestinations (std::stringstream& s) { - for (auto& it: i2p::stream::GetLocalDestinations ().GetDestinations ()) + for (auto& it: i2p::client::context.GetDestinations ()) { std::string b32 = it.first.ToBase32 (); s << "LeaseSets: " << dest->GetNumRemoteLeaseSets () << "
"; @@ -855,12 +856,12 @@ namespace util void HTTPConnection::SendToDestination (const i2p::data::IdentHash& destination, const char * buf, size_t len) { - auto leaseSet = i2p::stream::GetSharedLocalDestination ()->FindLeaseSet (destination); + auto leaseSet = i2p::client::context.GetSharedLocalDestination ()->FindLeaseSet (destination); if (!leaseSet || !leaseSet->HasNonExpiredLeases ()) { - i2p::data::netdb.RequestDestination (destination, true, i2p::stream::GetSharedLocalDestination ()->GetTunnelPool ()); + i2p::data::netdb.RequestDestination (destination, true, i2p::client::GetSharedLocalDestination ()->GetTunnelPool ()); std::this_thread::sleep_for (std::chrono::seconds(10)); // wait for 10 seconds - leaseSet = i2p::stream::GetSharedLocalDestination ()->FindLeaseSet (destination); + leaseSet = i2p::client::GetSharedLocalDestination ()->FindLeaseSet (destination); if (!leaseSet || !leaseSet->HasNonExpiredLeases ()) // still no LeaseSet { SendReply (leaseSet ? "" + itoopieImage + "
Leases expired" : "" + itoopieImage + "LeaseSet not found", 504); @@ -868,7 +869,7 @@ namespace util } } if (!m_Stream) - m_Stream = i2p::stream::GetSharedLocalDestination ()->CreateNewOutgoingStream (*leaseSet); + m_Stream = i2p::client::GetSharedLocalDestination ()->CreateNewOutgoingStream (*leaseSet); if (m_Stream) { m_Stream->Send ((uint8_t *)buf, len); diff --git a/I2PTunnel.cpp b/I2PTunnel.cpp index d8b59a33..c728b61b 100644 --- a/I2PTunnel.cpp +++ b/I2PTunnel.cpp @@ -3,6 +3,7 @@ #include "Log.h" #include "NetDb.h" #include "Destination.h" +#include "ClientContext.h" #include "I2PTunnel.h" namespace i2p @@ -146,7 +147,7 @@ namespace stream I2PClientTunnel::I2PClientTunnel (boost::asio::io_service& service, const std::string& destination, int port, StreamingDestination * localDestination): I2PTunnel (service, localDestination ? localDestination : - CreateNewLocalDestination (false, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256)), + i2p::client::CreateNewLocalDestination (false, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256)), m_Acceptor (service, boost::asio::ip::tcp::endpoint (boost::asio::ip::tcp::v4(), port)), m_Timer (service), m_Destination (destination), m_DestinationIdentHash (nullptr), m_RemoteLeaseSet (nullptr) diff --git a/SAM.cpp b/SAM.cpp index 017eee3e..216cbcb6 100644 --- a/SAM.cpp +++ b/SAM.cpp @@ -6,6 +6,7 @@ #include "Log.h" #include "NetDb.h" #include "Destination.h" +#include "ClientContext.h" #include "SAM.h" namespace i2p @@ -331,7 +332,7 @@ namespace stream void SAMSocket::ProcessDestGenerate () { LogPrint ("SAM dest generate"); - auto localDestination = CreateNewLocalDestination (); + auto localDestination = i2p::client::CreateNewLocalDestination (); if (localDestination) { uint8_t buf[1024]; @@ -573,10 +574,10 @@ namespace stream i2p::data::PrivateKeys keys; keys.FromBuffer (buf, l); delete[] buf; - localDestination = CreateNewLocalDestination (keys); + localDestination = i2p::client::CreateNewLocalDestination (keys); } else // transient - localDestination = CreateNewLocalDestination (); + localDestination = i2p::client::CreateNewLocalDestination (); if (localDestination) { SAMSession session; diff --git a/SOCKS.cpp b/SOCKS.cpp index 3ec9ab98..02115c88 100644 --- a/SOCKS.cpp +++ b/SOCKS.cpp @@ -2,6 +2,7 @@ #include "Identity.h" #include "NetDb.h" #include "Destination.h" +#include "ClientContext.h" #include #include #include @@ -159,7 +160,7 @@ namespace proxy LogPrint("--- sock4a find lease set"); m_ls = i2p::data::netdb.FindLeaseSet(m_dest); if (!m_ls || m_ls->HasNonExpiredLeases()) { - i2p::data::netdb.RequestDestination (m_dest, true, i2p::stream::GetSharedLocalDestination ()->GetTunnelPool ()); + i2p::data::netdb.RequestDestination (m_dest, true, i2p::client::GetSharedLocalDestination ()->GetTunnelPool ()); m_ls_timer.expires_from_now(boost::posix_time::seconds(socks_leaseset_timeout)); m_ls_timer.async_wait(boost::bind(&SOCKS4AHandler::LeaseSetTimeout, this, boost::asio::placeholders::error)); } else { @@ -223,7 +224,7 @@ namespace proxy void SOCKS4AHandler::SentConnectionSuccess(const boost::system::error_code & ecode) { LogPrint("--- socks4a making connection"); - m_stream = i2p::stream::GetSharedLocalDestination ()->CreateNewOutgoingStream(*m_ls); + m_stream = i2p::client::GetSharedLocalDestination ()->CreateNewOutgoingStream(*m_ls); m_state = OKAY; LogPrint("--- socks4a state is ", m_state); AsyncSockRead(); diff --git a/Win32/i2pd.vcxproj b/Win32/i2pd.vcxproj index eb5abb12..c071c131 100644 --- a/Win32/i2pd.vcxproj +++ b/Win32/i2pd.vcxproj @@ -46,6 +46,7 @@ + @@ -89,6 +90,7 @@ + diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 3ad94ab3..55b5e6e5 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -42,7 +42,8 @@ set (SOURCES "${CMAKE_SOURCE_DIR}/base64.cpp" "${CMAKE_SOURCE_DIR}/i2p.cpp" "${CMAKE_SOURCE_DIR}/util.cpp" - "${CMAKE_SOURCE_DIR}/SAM.cpp" + "${CMAKE_SOURCE_DIR}/SAM.cpp" + "${CMAKE_SOURCE_DIR}/ClientContext.cpp" ) file (GLOB HEADERS "${CMAKE_SOURCE_DIR}/*.h") diff --git a/build/autotools/Makefile.in b/build/autotools/Makefile.in index 5071e1be..16b2cc2b 100644 --- a/build/autotools/Makefile.in +++ b/build/autotools/Makefile.in @@ -325,6 +325,7 @@ i2p_SOURCES = AddressBook.cpp CryptoConst.cpp Daemon.cpp \ Transports.cpp Tunnel.cpp TunnelEndpoint.cpp \ TunnelGateway.cpp TunnelPool.cpp UPnP.cpp aes.cpp \ base64.cpp i2p.cpp util.cpp SAM.cpp Destination.cpp \ + ClientContext.cpp \ \ AddressBook.h CryptoConst.h Daemon.h ElGamal.h \ Garlic.h HTTPProxy.h HTTPServer.h I2NPProtocol.h \ @@ -335,7 +336,7 @@ i2p_SOURCES = AddressBook.cpp CryptoConst.cpp Daemon.cpp \ TransitTunnel.h Transports.h Tunnel.h TunnelBase.h \ TunnelConfig.h TunnelEndpoint.h TunnelGateway.h \ TunnelPool.h UPnP.h aes.h base64.h config.h hmac.h \ - util.h version.h Destination.h + util.h version.h Destination.h ClientContext.h AM_LDFLAGS = @BOOST_DATE_TIME_LIB@ @BOOST_FILESYSTEM_LIB@ \ @BOOST_PROGRAM_OPTIONS_LIB@ @BOOST_REGEX_LIB@ \ @@ -483,6 +484,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i2p.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAM.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClientContext.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/filelist.mk b/filelist.mk index f8d3279c..1c413f7d 100644 --- a/filelist.mk +++ b/filelist.mk @@ -5,7 +5,7 @@ CPP_FILES := CryptoConst.cpp base64.cpp NTCPSession.cpp RouterInfo.cpp Transport TransitTunnel.cpp I2NPProtocol.cpp Log.cpp Garlic.cpp HTTPServer.cpp Streaming.cpp \ Destination.cpp Identity.cpp SSU.cpp util.cpp Reseed.cpp DaemonLinux.cpp SSUData.cpp \ aes.cpp SOCKS.cpp UPnP.cpp TunnelPool.cpp HTTPProxy.cpp AddressBook.cpp Daemon.cpp \ - I2PTunnel.cpp SAM.cpp i2p.cpp + I2PTunnel.cpp SAM.cpp ClientContext.cpp i2p.cpp H_FILES := CryptoConst.h base64.h NTCPSession.h RouterInfo.h Transports.h \ @@ -13,7 +13,7 @@ H_FILES := CryptoConst.h base64.h NTCPSession.h RouterInfo.h Transports.h \ TransitTunnel.h I2NPProtocol.h Log.h Garlic.h HTTPServer.h Streaming.h Destination.h \ Identity.h SSU.h util.h Reseed.h DaemonLinux.h SSUData.h i2p.h aes.h SOCKS.h \ UPnP.h TunnelPool.h HTTPProxy.h AddressBook.h Daemon.h I2PTunnel.h version.h \ - Signature.h SAM.h + Signature.h SAM.h ClientContext.h OBJECTS = $(addprefix obj/, $(notdir $(CPP_FILES:.cpp=.o)))