|
|
|
@ -41,10 +41,10 @@ namespace client
@@ -41,10 +41,10 @@ namespace client
|
|
|
|
|
std::string proxyKeys = i2p::util::config::GetArg("-proxykeys", ""); |
|
|
|
|
if (proxyKeys.length () > 0) |
|
|
|
|
localDestination = LoadLocalDestination (proxyKeys, false); |
|
|
|
|
m_HttpProxy = new i2p::proxy::HTTPProxy(i2p::util::config::GetArg("-httpproxyport", 4446), localDestination); |
|
|
|
|
m_HttpProxy = new i2p::proxy::HTTPProxy(i2p::util::config::GetArg("-httpproxyaddress", "127.0.0.1"), i2p::util::config::GetArg("-httpproxyport", 4446), localDestination); |
|
|
|
|
m_HttpProxy->Start(); |
|
|
|
|
LogPrint("HTTP Proxy started"); |
|
|
|
|
m_SocksProxy = new i2p::proxy::SOCKSProxy(i2p::util::config::GetArg("-socksproxyport", 4447), localDestination); |
|
|
|
|
m_SocksProxy = new i2p::proxy::SOCKSProxy(i2p::util::config::GetArg("-socksproxyaddress", "127.0.0.1"), i2p::util::config::GetArg("-socksproxyport", 4447), localDestination); |
|
|
|
|
m_SocksProxy->Start(); |
|
|
|
|
LogPrint("SOCKS Proxy Started"); |
|
|
|
|
|
|
|
|
@ -57,7 +57,7 @@ namespace client
@@ -57,7 +57,7 @@ namespace client
|
|
|
|
|
if (ircKeys.length () > 0) |
|
|
|
|
localDestination = LoadLocalDestination (ircKeys, false); |
|
|
|
|
auto ircPort = i2p::util::config::GetArg("-ircport", 6668); |
|
|
|
|
auto ircTunnel = new I2PClientTunnel (ircDestination, ircPort, localDestination); |
|
|
|
|
auto ircTunnel = new I2PClientTunnel (ircDestination, i2p::util::config::GetArg("-ircaddress", "127.0.0.1"), ircPort, localDestination); |
|
|
|
|
ircTunnel->Start (); |
|
|
|
|
m_ClientTunnels.insert (std::make_pair(ircPort, std::unique_ptr<I2PClientTunnel>(ircTunnel))); |
|
|
|
|
LogPrint("IRC tunnel started"); |
|
|
|
@ -78,7 +78,7 @@ namespace client
@@ -78,7 +78,7 @@ namespace client
|
|
|
|
|
int samPort = i2p::util::config::GetArg("-samport", 0); |
|
|
|
|
if (samPort) |
|
|
|
|
{ |
|
|
|
|
m_SamBridge = new SAMBridge (samPort); |
|
|
|
|
m_SamBridge = new SAMBridge (i2p::util::config::GetArg("-samaddress", "127.0.0.1"), samPort); |
|
|
|
|
m_SamBridge->Start (); |
|
|
|
|
LogPrint("SAM bridge started"); |
|
|
|
|
} |
|
|
|
@ -87,7 +87,7 @@ namespace client
@@ -87,7 +87,7 @@ namespace client
|
|
|
|
|
int bobPort = i2p::util::config::GetArg("-bobport", 0); |
|
|
|
|
if (bobPort) |
|
|
|
|
{ |
|
|
|
|
m_BOBCommandChannel = new BOBCommandChannel (bobPort); |
|
|
|
|
m_BOBCommandChannel = new BOBCommandChannel (i2p::util::config::GetArg("-bobaddress", "127.0.0.1"), bobPort); |
|
|
|
|
m_BOBCommandChannel->Start (); |
|
|
|
|
LogPrint("BOB command channel started"); |
|
|
|
|
} |
|
|
|
@ -268,12 +268,13 @@ namespace client
@@ -268,12 +268,13 @@ namespace client
|
|
|
|
|
int port = section.second.get<int> (I2P_CLIENT_TUNNEL_PORT); |
|
|
|
|
// optional params
|
|
|
|
|
std::string keys = section.second.get (I2P_CLIENT_TUNNEL_KEYS, ""); |
|
|
|
|
std::string address = section.second.get (I2P_CLIENT_TUNNEL_ADDRESS, "127.0.0.1"); |
|
|
|
|
int destinationPort = section.second.get (I2P_CLIENT_TUNNEL_DESTINATION_PORT, 0); |
|
|
|
|
|
|
|
|
|
std::shared_ptr<ClientDestination> localDestination = nullptr; |
|
|
|
|
if (keys.length () > 0) |
|
|
|
|
localDestination = LoadLocalDestination (keys, false); |
|
|
|
|
auto clientTunnel = new I2PClientTunnel (dest, port, localDestination, destinationPort); |
|
|
|
|
auto clientTunnel = new I2PClientTunnel (dest, address, port, localDestination, destinationPort); |
|
|
|
|
if (m_ClientTunnels.insert (std::make_pair (port, std::unique_ptr<I2PClientTunnel>(clientTunnel))).second) |
|
|
|
|
clientTunnel->Start (); |
|
|
|
|
else |
|
|
|
|