|
|
@ -31,7 +31,7 @@ namespace client |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
I2PTunnelConnection::I2PTunnelConnection (I2PService * owner, std::shared_ptr<boost::asio::ip::tcp::socket> socket, |
|
|
|
I2PTunnelConnection::I2PTunnelConnection (I2PService * owner, std::shared_ptr<boost::asio::ip::tcp::socket> socket, |
|
|
|
std::shared_ptr<const i2p::data::LeaseSet> leaseSet, int port): |
|
|
|
std::shared_ptr<const i2p::data::LeaseSet> leaseSet, uint16_t port): |
|
|
|
I2PServiceHandler(owner), m_Socket (socket), m_RemoteEndpoint (socket->remote_endpoint ()), |
|
|
|
I2PServiceHandler(owner), m_Socket (socket), m_RemoteEndpoint (socket->remote_endpoint ()), |
|
|
|
m_IsQuiet (true) |
|
|
|
m_IsQuiet (true) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -581,7 +581,7 @@ namespace client |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
|
I2PClientTunnelHandler (I2PClientTunnel * parent, std::shared_ptr<const Address> address, |
|
|
|
I2PClientTunnelHandler (I2PClientTunnel * parent, std::shared_ptr<const Address> address, |
|
|
|
int destinationPort, std::shared_ptr<boost::asio::ip::tcp::socket> socket): |
|
|
|
uint16_t destinationPort, std::shared_ptr<boost::asio::ip::tcp::socket> socket): |
|
|
|
I2PServiceHandler(parent), m_Address(address), |
|
|
|
I2PServiceHandler(parent), m_Address(address), |
|
|
|
m_DestinationPort (destinationPort), m_Socket(socket) {}; |
|
|
|
m_DestinationPort (destinationPort), m_Socket(socket) {}; |
|
|
|
void Handle(); |
|
|
|
void Handle(); |
|
|
@ -589,7 +589,7 @@ namespace client |
|
|
|
private: |
|
|
|
private: |
|
|
|
void HandleStreamRequestComplete (std::shared_ptr<i2p::stream::Stream> stream); |
|
|
|
void HandleStreamRequestComplete (std::shared_ptr<i2p::stream::Stream> stream); |
|
|
|
std::shared_ptr<const Address> m_Address; |
|
|
|
std::shared_ptr<const Address> m_Address; |
|
|
|
int m_DestinationPort; |
|
|
|
uint16_t m_DestinationPort; |
|
|
|
std::shared_ptr<boost::asio::ip::tcp::socket> m_Socket; |
|
|
|
std::shared_ptr<boost::asio::ip::tcp::socket> m_Socket; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -630,7 +630,7 @@ namespace client |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
I2PClientTunnel::I2PClientTunnel (const std::string& name, const std::string& destination, |
|
|
|
I2PClientTunnel::I2PClientTunnel (const std::string& name, const std::string& destination, |
|
|
|
const std::string& address, int port, std::shared_ptr<ClientDestination> localDestination, int destinationPort): |
|
|
|
const std::string& address, uint16_t port, std::shared_ptr<ClientDestination> localDestination, uint16_t destinationPort): |
|
|
|
TCPIPAcceptor (address, port, localDestination), m_Name (name), m_Destination (destination), |
|
|
|
TCPIPAcceptor (address, port, localDestination), m_Name (name), m_Destination (destination), |
|
|
|
m_DestinationPort (destinationPort), m_KeepAliveInterval (0) |
|
|
|
m_DestinationPort (destinationPort), m_KeepAliveInterval (0) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -705,10 +705,10 @@ namespace client |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
I2PServerTunnel::I2PServerTunnel (const std::string& name, const std::string& address, |
|
|
|
I2PServerTunnel::I2PServerTunnel (const std::string& name, const std::string& address, |
|
|
|
int port, std::shared_ptr<ClientDestination> localDestination, int inport, bool gzip): |
|
|
|
uint16_t port, std::shared_ptr<ClientDestination> localDestination, uint16_t inport, bool gzip): |
|
|
|
I2PService (localDestination), m_IsUniqueLocal(true), m_Name (name), m_Address (address), m_Port (port), m_IsAccessList (false) |
|
|
|
I2PService (localDestination), m_IsUniqueLocal(true), m_Name (name), m_Address (address), m_Port (port), m_IsAccessList (false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int inPort = (inport ? inport : port); |
|
|
|
uint16_t inPort = (inport ? inport : port); |
|
|
|
m_PortDestination = localDestination->GetStreamingDestination (inPort); |
|
|
|
m_PortDestination = localDestination->GetStreamingDestination (inPort); |
|
|
|
if (!m_PortDestination) // default destination
|
|
|
|
if (!m_PortDestination) // default destination
|
|
|
|
m_PortDestination = localDestination->CreateStreamingDestination (inPort, gzip); |
|
|
|
m_PortDestination = localDestination->CreateStreamingDestination (inPort, gzip); |
|
|
@ -870,8 +870,8 @@ namespace client |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
I2PServerTunnelHTTP::I2PServerTunnelHTTP (const std::string& name, const std::string& address, |
|
|
|
I2PServerTunnelHTTP::I2PServerTunnelHTTP (const std::string& name, const std::string& address, |
|
|
|
int port, std::shared_ptr<ClientDestination> localDestination, |
|
|
|
uint16_t port, std::shared_ptr<ClientDestination> localDestination, |
|
|
|
const std::string& host, int inport, bool gzip): |
|
|
|
const std::string& host, uint16_t inport, bool gzip): |
|
|
|
I2PServerTunnel (name, address, port, localDestination, inport, gzip), |
|
|
|
I2PServerTunnel (name, address, port, localDestination, inport, gzip), |
|
|
|
m_Host (host) |
|
|
|
m_Host (host) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -883,8 +883,8 @@ namespace client |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
I2PServerTunnelIRC::I2PServerTunnelIRC (const std::string& name, const std::string& address, |
|
|
|
I2PServerTunnelIRC::I2PServerTunnelIRC (const std::string& name, const std::string& address, |
|
|
|
int port, std::shared_ptr<ClientDestination> localDestination, |
|
|
|
uint16_t port, std::shared_ptr<ClientDestination> localDestination, |
|
|
|
const std::string& webircpass, int inport, bool gzip): |
|
|
|
const std::string& webircpass, uint16_t inport, bool gzip): |
|
|
|
I2PServerTunnel (name, address, port, localDestination, inport, gzip), |
|
|
|
I2PServerTunnel (name, address, port, localDestination, inport, gzip), |
|
|
|
m_WebircPass (webircpass) |
|
|
|
m_WebircPass (webircpass) |
|
|
|
{ |
|
|
|
{ |
|
|
|