From 67f1e07508a2a4348d95d2d8024430f5d67a78c0 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 12 May 2016 15:37:46 -0400 Subject: [PATCH] I2CP added --- ClientContext.cpp | 3 ++- ClientContext.h | 2 ++ I2CP.cpp | 13 +++++++++++++ I2CP.h | 21 +++++++++++++++++++++ build/CMakeLists.txt | 1 + filelist.mk | 2 +- 6 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 I2CP.cpp create mode 100644 I2CP.h diff --git a/ClientContext.cpp b/ClientContext.cpp index aad41ab2..df0de4e5 100644 --- a/ClientContext.cpp +++ b/ClientContext.cpp @@ -16,7 +16,7 @@ namespace client ClientContext::ClientContext (): m_SharedLocalDestination (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_SamBridge; delete m_BOBCommandChannel; + delete m_I2CPServer; } void ClientContext::Start () diff --git a/ClientContext.h b/ClientContext.h index 15ae73c2..cfbc039f 100644 --- a/ClientContext.h +++ b/ClientContext.h @@ -11,6 +11,7 @@ #include "I2PTunnel.h" #include "SAM.h" #include "BOB.h" +#include "I2CP.h" #include "AddressBook.h" namespace i2p @@ -84,6 +85,7 @@ namespace client std::map, std::unique_ptr > m_ServerTunnels; // ->tunnel SAMBridge * m_SamBridge; BOBCommandChannel * m_BOBCommandChannel; + I2CPServer * m_I2CPServer; public: // for HTTP diff --git a/I2CP.cpp b/I2CP.cpp new file mode 100644 index 00000000..77ff06e2 --- /dev/null +++ b/I2CP.cpp @@ -0,0 +1,13 @@ +#include "I2CP.h" + + +namespace i2p +{ +namespace client +{ + I2CPServer::I2CPServer (const std::string& interface, int port) + { + } +} +} + diff --git a/I2CP.h b/I2CP.h new file mode 100644 index 00000000..c5460c93 --- /dev/null +++ b/I2CP.h @@ -0,0 +1,21 @@ +#ifndef I2CP_H__ +#define I2CP_H__ + +#include +#include + +namespace i2p +{ +namespace client +{ + class I2CPServer + { + public: + + I2CPServer (const std::string& interface, int port); + }; +} +} + +#endif + diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 22029e85..7944e2ec 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -76,6 +76,7 @@ set (CLIENT_SRC "${CMAKE_SOURCE_DIR}/SOCKS.cpp" "${CMAKE_SOURCE_DIR}/HTTP.cpp" "${CMAKE_SOURCE_DIR}/HTTPProxy.cpp" + "${CMAKE_SOURCE_DIR}/I2CP.cpp" ) add_library(i2pdclient ${CLIENT_SRC}) diff --git a/filelist.mk b/filelist.mk index e2a3da36..8abf0b4b 100644 --- a/filelist.mk +++ b/filelist.mk @@ -9,7 +9,7 @@ LIB_SRC = \ LIB_CLIENT_SRC = \ 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 DAEMON_SRC = \