mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
initial support for out proxy via local upstream socks proxy
This commit is contained in:
9
SOCKS.h
9
SOCKS.h
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user