2015-01-03 21:18:05 +00:00
|
|
|
#ifndef SOCKS_H__
|
|
|
|
#define SOCKS_H__
|
2014-07-14 16:40:06 +00:00
|
|
|
|
2014-11-23 16:33:58 +00:00
|
|
|
#include <memory>
|
2015-01-05 19:14:53 +00:00
|
|
|
#include <set>
|
2015-01-03 05:42:53 +00:00
|
|
|
#include <boost/asio.hpp>
|
2015-01-05 19:14:53 +00:00
|
|
|
#include <mutex>
|
2015-01-07 18:09:59 +00:00
|
|
|
#include "I2PService.h"
|
2014-07-14 16:40:06 +00:00
|
|
|
|
|
|
|
namespace i2p
|
|
|
|
{
|
|
|
|
namespace proxy
|
|
|
|
{
|
2015-07-16 21:29:52 +00:00
|
|
|
class SOCKSServer: public i2p::client::TCPIPAcceptor
|
|
|
|
{
|
|
|
|
public:
|
2015-03-17 15:44:01 +00:00
|
|
|
|
2015-07-27 11:40:35 +00:00
|
|
|
SOCKSServer(const std::string& address, int port,
|
|
|
|
std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr);
|
2015-07-16 21:29:52 +00:00
|
|
|
~SOCKSServer() {};
|
2015-03-17 15:44:01 +00:00
|
|
|
|
2015-07-16 21:29:52 +00:00
|
|
|
protected:
|
|
|
|
// Implements TCPIPAcceptor
|
|
|
|
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket);
|
|
|
|
const char* GetName() { return "SOCKS"; }
|
|
|
|
};
|
2014-07-14 16:40:06 +00:00
|
|
|
|
2015-07-16 21:29:52 +00:00
|
|
|
typedef SOCKSServer SOCKSProxy;
|
2014-07-14 16:40:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|