I2CP added

This commit is contained in:
orignal 2016-05-12 15:37:46 -04:00
parent c49fdf1233
commit 67f1e07508
6 changed files with 40 additions and 2 deletions

View File

@ -16,7 +16,7 @@ namespace client
ClientContext::ClientContext (): m_SharedLocalDestination (nullptr), ClientContext::ClientContext (): m_SharedLocalDestination (nullptr),
m_HttpProxy (nullptr), m_SocksProxy (nullptr), m_SamBridge (nullptr), m_HttpProxy (nullptr), m_SocksProxy (nullptr), m_SamBridge (nullptr),
m_BOBCommandChannel (nullptr) m_BOBCommandChannel (nullptr), m_I2CPServer (nullptr)
{ {
} }
@ -26,6 +26,7 @@ namespace client
delete m_SocksProxy; delete m_SocksProxy;
delete m_SamBridge; delete m_SamBridge;
delete m_BOBCommandChannel; delete m_BOBCommandChannel;
delete m_I2CPServer;
} }
void ClientContext::Start () void ClientContext::Start ()

View File

@ -11,6 +11,7 @@
#include "I2PTunnel.h" #include "I2PTunnel.h"
#include "SAM.h" #include "SAM.h"
#include "BOB.h" #include "BOB.h"
#include "I2CP.h"
#include "AddressBook.h" #include "AddressBook.h"
namespace i2p namespace i2p
@ -84,6 +85,7 @@ namespace client
std::map<std::pair<i2p::data::IdentHash, int>, std::unique_ptr<I2PServerTunnel> > m_ServerTunnels; // <destination,port>->tunnel std::map<std::pair<i2p::data::IdentHash, int>, std::unique_ptr<I2PServerTunnel> > m_ServerTunnels; // <destination,port>->tunnel
SAMBridge * m_SamBridge; SAMBridge * m_SamBridge;
BOBCommandChannel * m_BOBCommandChannel; BOBCommandChannel * m_BOBCommandChannel;
I2CPServer * m_I2CPServer;
public: public:
// for HTTP // for HTTP

13
I2CP.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "I2CP.h"
namespace i2p
{
namespace client
{
I2CPServer::I2CPServer (const std::string& interface, int port)
{
}
}
}

21
I2CP.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef I2CP_H__
#define I2CP_H__
#include <string>
#include <boost/asio.hpp>
namespace i2p
{
namespace client
{
class I2CPServer
{
public:
I2CPServer (const std::string& interface, int port);
};
}
}
#endif

View File

@ -76,6 +76,7 @@ set (CLIENT_SRC
"${CMAKE_SOURCE_DIR}/SOCKS.cpp" "${CMAKE_SOURCE_DIR}/SOCKS.cpp"
"${CMAKE_SOURCE_DIR}/HTTP.cpp" "${CMAKE_SOURCE_DIR}/HTTP.cpp"
"${CMAKE_SOURCE_DIR}/HTTPProxy.cpp" "${CMAKE_SOURCE_DIR}/HTTPProxy.cpp"
"${CMAKE_SOURCE_DIR}/I2CP.cpp"
) )
add_library(i2pdclient ${CLIENT_SRC}) add_library(i2pdclient ${CLIENT_SRC})

View File

@ -9,7 +9,7 @@ LIB_SRC = \
LIB_CLIENT_SRC = \ LIB_CLIENT_SRC = \
AddressBook.cpp BOB.cpp ClientContext.cpp I2PTunnel.cpp I2PService.cpp \ AddressBook.cpp BOB.cpp ClientContext.cpp I2PTunnel.cpp I2PService.cpp \
SAM.cpp SOCKS.cpp HTTP.cpp HTTPProxy.cpp SAM.cpp SOCKS.cpp HTTP.cpp HTTPProxy.cpp I2CP.cpp
# also: Daemon{Linux,Win32}.cpp will be added later # also: Daemon{Linux,Win32}.cpp will be added later
DAEMON_SRC = \ DAEMON_SRC = \