i2pd/libdotnet_client/HTTPProxy.h
Михаил Подивилов fdb0ce6703 I2P -> .NET
2019-05-11 18:25:50 +03:00

30 lines
1 KiB
C++

#ifndef HTTP_PROXY_H__
#define HTTP_PROXY_H__
namespace dotnet {
namespace proxy {
class HTTPProxy: public dotnet::client::TCPIPAcceptor
{
public:
HTTPProxy(const std::string& name, const std::string& address, int port, const std::string & outproxy, bool addresshelper, std::shared_ptr<dotnet::client::ClientDestination> localDestination);
HTTPProxy(const std::string& name, const std::string& address, int port, std::shared_ptr<dotnet::client::ClientDestination> localDestination = nullptr) :
HTTPProxy(name, address, port, "", true, localDestination) {} ;
~HTTPProxy() {};
std::string GetOutproxyURL() const { return m_OutproxyUrl; }
bool GetHelperSupport() { return m_Addresshelper; }
protected:
// Implements TCPIPAcceptor
std::shared_ptr<dotnet::client::DotNetServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket);
const char* GetName() { return m_Name.c_str (); }
private:
std::string m_Name;
std::string m_OutproxyUrl;
bool m_Addresshelper;
};
} // http
} // dotnet
#endif