14 #ifndef CONNECTIONSOCKS5PROXY_H__
15 #define CONNECTIONSOCKS5PROXY_H__
18 #include "connectionbase.h"
71 const std::string& server,
int port = -1,
bool ip =
false );
87 const std::string& server,
int port = -1,
bool ip =
false );
101 virtual bool send(
const std::string& data );
107 virtual void disconnect();
110 virtual void cleanup();
113 virtual void getStatistics(
long int &totalIn,
long int &totalOut );
116 virtual void handleReceivedData(
const ConnectionBase* connection,
const std::string& data );
134 void setServer(
const std::string& host,
int port = -1,
bool ip =
false )
135 { m_server = host; m_port = port; m_ip = ip; }
142 void setProxyAuth(
const std::string& user,
const std::string& password )
143 { m_proxyUser = user; m_proxyPwd = password; }
157 S5StateAuthenticating,
161 ConnectionSOCKS5Proxy &operator=(
const ConnectionSOCKS5Proxy& );
164 ConnectionBase* m_connection;
165 const LogSink& m_logInstance;
167 Socks5State m_s5state;
169 std::string m_proxyUser;
170 std::string m_proxyPwd;
171 std::string m_proxyHandshakeBuffer;
An abstract base class for a connection.
This is an abstract base class to receive events from a ConnectionBase-derived object.
This is an implementation of a simple SOCKS5 Proxying connection (RFC 1928 + RFC 1929).
void setServer(const std::string &host, int port=-1, bool ip=false)
void setProxyAuth(const std::string &user, const std::string &password)
An implementation of log sink and source.
The namespace for the gloox library.