This commit is contained in:
wekoq 2023-06-07 20:13:11 +03:00 committed by GitHub
commit 2ee7074686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 10 deletions

View file

@ -28,6 +28,8 @@ namespace proxy {
// Implements TCPIPAcceptor
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket);
const char* GetName() { return m_Name.c_str (); }
const std::string GetRemoteDestination() { return ""; }
int GetRemoteDestinationPort() { return 0; }
private:

View file

@ -67,6 +67,9 @@ namespace client
virtual void Stop () = 0;
virtual const char* GetName() { return "Generic I2P Service"; }
virtual const std::string GetRemoteDestination() { return ""; }
virtual int GetRemoteDestinationPort() { return -1; }
private:

View file

@ -161,6 +161,8 @@ namespace client
void Stop ();
const char* GetName() { return m_Name.c_str (); }
const std::string GetRemoteDestination() { return m_Destination; }
int GetRemoteDestinationPort() { return m_DestinationPort; }
void SetKeepAliveInterval (uint32_t keepAliveInterval);
private:

View file

@ -34,6 +34,8 @@ namespace proxy
// Implements TCPIPAcceptor
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket);
const char* GetName() { return m_Name.c_str (); }
const std::string GetRemoteDestination() { return ""; }
int GetRemoteDestinationPort() { return 0; }
private:

View file

@ -96,6 +96,7 @@ namespace client
const char * GetName () const { return m_Name.c_str(); }
std::vector<std::shared_ptr<DatagramSessionInfo> > GetSessions ();
std::shared_ptr<ClientDestination> GetLocalDestination () const { return m_LocalDest; }
const boost::asio::ip::udp::endpoint& GetEndpoint () const { return m_RemoteEndpoint; }
void SetUniqueLocal (bool isUniqueLocal = true) { m_IsUniqueLocal = isUniqueLocal; }
@ -134,6 +135,8 @@ namespace client
void Start ();
void Stop ();
const char * GetName () const { return m_Name.c_str(); }
const std::string GetRemoteDestination() { return m_RemoteDest; }
uint16_t GetRemoteDestinationPort() { return RemotePort; }
std::vector<std::shared_ptr<DatagramSessionInfo> > GetSessions ();
bool IsLocalDestination (const i2p::data::IdentHash & destination) const { return destination == m_LocalDest->GetIdentHash(); }