2016-12-09 20:36:38 +00:00
|
|
|
#ifndef WEBSOCKS_H_
|
|
|
|
#define WEBSOCKS_H_
|
|
|
|
#include <string>
|
2017-01-07 13:32:50 +00:00
|
|
|
#include <memory>
|
|
|
|
#include "I2PService.h"
|
|
|
|
#include "Destination.h"
|
2016-12-09 20:36:38 +00:00
|
|
|
|
|
|
|
namespace i2p
|
|
|
|
{
|
|
|
|
namespace client
|
|
|
|
{
|
|
|
|
|
2017-01-07 13:32:50 +00:00
|
|
|
class WebSocksImpl;
|
2016-12-09 20:36:38 +00:00
|
|
|
|
2017-01-07 13:32:50 +00:00
|
|
|
/** @brief websocket socks proxy server */
|
|
|
|
class WebSocks : public i2p::client::I2PService
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
WebSocks(const std::string & addr, int port, std::shared_ptr<ClientDestination> localDestination);
|
|
|
|
~WebSocks();
|
2016-12-09 20:36:38 +00:00
|
|
|
|
2017-01-07 13:32:50 +00:00
|
|
|
void Start();
|
|
|
|
void Stop();
|
2016-12-09 20:36:38 +00:00
|
|
|
|
2017-01-07 13:32:50 +00:00
|
|
|
boost::asio::ip::tcp::endpoint GetLocalEndpoint() const;
|
|
|
|
|
|
|
|
const char * GetName() { return "WebSOCKS Proxy"; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
WebSocksImpl * m_Impl;
|
|
|
|
};
|
2016-12-09 20:36:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|