mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
Adding exceptions for SOCKS, SAM and BOB proxy/briges
This commit is contained in:
parent
6c628094ce
commit
f1fb265119
@ -56,7 +56,7 @@ namespace client
|
|||||||
m_HttpProxy = new i2p::proxy::HTTPProxy(httpProxyAddr, httpProxyPort, localDestination);
|
m_HttpProxy = new i2p::proxy::HTTPProxy(httpProxyAddr, httpProxyPort, localDestination);
|
||||||
m_HttpProxy->Start();
|
m_HttpProxy->Start();
|
||||||
} catch (std::exception& e) {
|
} 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
|
|||||||
LoadPrivateKeys (keys, socksProxyKeys);
|
LoadPrivateKeys (keys, socksProxyKeys);
|
||||||
localDestination = CreateNewLocalDestination (keys, false);
|
localDestination = CreateNewLocalDestination (keys, false);
|
||||||
}
|
}
|
||||||
m_SocksProxy = new i2p::proxy::SOCKSProxy(socksProxyAddr, socksProxyPort, socksOutProxyAddr, socksOutProxyPort, localDestination);
|
try {
|
||||||
m_SocksProxy->Start();
|
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
|
// I2P tunnels
|
||||||
@ -87,8 +91,12 @@ namespace client
|
|||||||
std::string samAddr; i2p::config::GetOption("sam.address", samAddr);
|
std::string samAddr; i2p::config::GetOption("sam.address", samAddr);
|
||||||
uint16_t samPort; i2p::config::GetOption("sam.port", samPort);
|
uint16_t samPort; i2p::config::GetOption("sam.port", samPort);
|
||||||
LogPrint(eLogInfo, "Clients: starting SAM bridge at ", samAddr, ":", samPort);
|
LogPrint(eLogInfo, "Clients: starting SAM bridge at ", samAddr, ":", samPort);
|
||||||
m_SamBridge = new SAMBridge (samAddr, samPort);
|
try {
|
||||||
m_SamBridge->Start ();
|
m_SamBridge = new SAMBridge (samAddr, samPort);
|
||||||
|
m_SamBridge->Start ();
|
||||||
|
} catch (std::exception& e) {
|
||||||
|
LogPrint(eLogError, "Clients: Exception in SAM bridge: ", e.what());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BOB
|
// BOB
|
||||||
@ -97,8 +105,12 @@ namespace client
|
|||||||
std::string bobAddr; i2p::config::GetOption("bob.address", bobAddr);
|
std::string bobAddr; i2p::config::GetOption("bob.address", bobAddr);
|
||||||
uint16_t bobPort; i2p::config::GetOption("bob.port", bobPort);
|
uint16_t bobPort; i2p::config::GetOption("bob.port", bobPort);
|
||||||
LogPrint(eLogInfo, "Clients: starting BOB command channel at ", bobAddr, ":", bobPort);
|
LogPrint(eLogInfo, "Clients: starting BOB command channel at ", bobAddr, ":", bobPort);
|
||||||
m_BOBCommandChannel = new BOBCommandChannel (bobAddr, bobPort);
|
try {
|
||||||
m_BOBCommandChannel->Start ();
|
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 ();
|
m_AddressBook.StartResolvers ();
|
||||||
|
Loading…
Reference in New Issue
Block a user