initial support for out proxy via local upstream socks proxy

This commit is contained in:
Jeff Becker 2016-02-26 17:06:11 -05:00
parent dbdc7279c4
commit 1a05bcb295
No known key found for this signature in database
GPG key ID: AB950234D6EA286B
5 changed files with 417 additions and 31 deletions

View file

@ -15,14 +15,21 @@ namespace proxy
{
public:
SOCKSServer(const std::string& address, int port, const std::string& outAddress, int outPort,
SOCKSServer(const std::string& address, int port, const std::string& outAddress, uint16_t outPort,
std::shared_ptr<i2p::client::ClientDestination> localDestination = nullptr);
~SOCKSServer() {};
void SetUpstreamProxy(const std::string & addr, const uint16_t port);
protected:
// Implements TCPIPAcceptor
std::shared_ptr<i2p::client::I2PServiceHandler> CreateHandler(std::shared_ptr<boost::asio::ip::tcp::socket> socket);
const char* GetName() { return "SOCKS"; }
private:
std::string m_UpstreamProxyAddress;
uint16_t m_UpstreamProxyPort;
bool m_UseUpstreamProxy;
};
typedef SOCKSServer SOCKSProxy;