Browse Source

Adding exceptions for SOCKS, SAM and BOB proxy/briges

pull/459/head
Mikal Villa 9 years ago
parent
commit
f1fb265119
  1. 14
      ClientContext.cpp

14
ClientContext.cpp

@ -56,7 +56,7 @@ namespace client @@ -56,7 +56,7 @@ namespace client
m_HttpProxy = new i2p::proxy::HTTPProxy(httpProxyAddr, httpProxyPort, localDestination);
m_HttpProxy->Start();
} catch (std::exception& e) {
LogPrint(eLogError, "Exception in HTTP Proxy: ", e.what());
LogPrint(eLogError, "Clients: Exception in HTTP Proxy: ", e.what());
}
}
@ -74,8 +74,12 @@ namespace client @@ -74,8 +74,12 @@ namespace client
LoadPrivateKeys (keys, socksProxyKeys);
localDestination = CreateNewLocalDestination (keys, false);
}
try {
m_SocksProxy = new i2p::proxy::SOCKSProxy(socksProxyAddr, socksProxyPort, socksOutProxyAddr, socksOutProxyPort, localDestination);
m_SocksProxy->Start();
} catch (std::exception& e) {
LogPrint(eLogError, "Clients: Exception in SOCKS Proxy: ", e.what());
}
}
// I2P tunnels
@ -87,8 +91,12 @@ namespace client @@ -87,8 +91,12 @@ namespace client
std::string samAddr; i2p::config::GetOption("sam.address", samAddr);
uint16_t samPort; i2p::config::GetOption("sam.port", samPort);
LogPrint(eLogInfo, "Clients: starting SAM bridge at ", samAddr, ":", samPort);
try {
m_SamBridge = new SAMBridge (samAddr, samPort);
m_SamBridge->Start ();
} catch (std::exception& e) {
LogPrint(eLogError, "Clients: Exception in SAM bridge: ", e.what());
}
}
// BOB
@ -97,8 +105,12 @@ namespace client @@ -97,8 +105,12 @@ namespace client
std::string bobAddr; i2p::config::GetOption("bob.address", bobAddr);
uint16_t bobPort; i2p::config::GetOption("bob.port", bobPort);
LogPrint(eLogInfo, "Clients: starting BOB command channel at ", bobAddr, ":", bobPort);
try {
m_BOBCommandChannel = new BOBCommandChannel (bobAddr, bobPort);
m_BOBCommandChannel->Start ();
} catch (std::exception& e) {
LogPrint(eLogError, "Clients: Exception in BOB bridge: ", e.what());
}
}
m_AddressBook.StartResolvers ();

Loading…
Cancel
Save