|
|
@ -78,9 +78,10 @@ namespace client |
|
|
|
bool socksproxy; i2p::config::GetOption("socksproxy.enabled", socksproxy); |
|
|
|
bool socksproxy; i2p::config::GetOption("socksproxy.enabled", socksproxy); |
|
|
|
if (socksproxy) |
|
|
|
if (socksproxy) |
|
|
|
{ |
|
|
|
{ |
|
|
|
std::string socksProxyKeys; i2p::config::GetOption("socksproxy.keys", socksProxyKeys); |
|
|
|
std::string socksProxyKeys; i2p::config::GetOption("socksproxy.keys", socksProxyKeys); |
|
|
|
std::string socksProxyAddr; i2p::config::GetOption("socksproxy.address", socksProxyAddr); |
|
|
|
std::string socksProxyAddr; i2p::config::GetOption("socksproxy.address", socksProxyAddr); |
|
|
|
uint16_t socksProxyPort; i2p::config::GetOption("socksproxy.port", socksProxyPort); |
|
|
|
uint16_t socksProxyPort; i2p::config::GetOption("socksproxy.port", socksProxyPort); |
|
|
|
|
|
|
|
bool socksOutProxy; i2p::config::GetOption("socksproxy.outproxy.enabled", socksOutProxy); |
|
|
|
std::string socksOutProxyAddr; i2p::config::GetOption("socksproxy.outproxy", socksOutProxyAddr); |
|
|
|
std::string socksOutProxyAddr; i2p::config::GetOption("socksproxy.outproxy", socksOutProxyAddr); |
|
|
|
uint16_t socksOutProxyPort; i2p::config::GetOption("socksproxy.outproxyport", socksOutProxyPort); |
|
|
|
uint16_t socksOutProxyPort; i2p::config::GetOption("socksproxy.outproxyport", socksOutProxyPort); |
|
|
|
i2p::data::SigningKeyType sigType; i2p::config::GetOption("socksproxy.signaturetype", sigType); |
|
|
|
i2p::data::SigningKeyType sigType; i2p::config::GetOption("socksproxy.signaturetype", sigType); |
|
|
@ -97,11 +98,14 @@ namespace client |
|
|
|
else |
|
|
|
else |
|
|
|
LogPrint(eLogError, "Clients: failed to load SOCKS Proxy key"); |
|
|
|
LogPrint(eLogError, "Clients: failed to load SOCKS Proxy key"); |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try |
|
|
|
m_SocksProxy = new i2p::proxy::SOCKSProxy(socksProxyAddr, socksProxyPort, socksOutProxyAddr, socksOutProxyPort, localDestination); |
|
|
|
{ |
|
|
|
m_SocksProxy->Start(); |
|
|
|
m_SocksProxy = new i2p::proxy::SOCKSProxy(socksProxyAddr, socksProxyPort, socksOutProxy, socksOutProxyAddr, socksOutProxyPort, localDestination); |
|
|
|
} catch (std::exception& e) { |
|
|
|
m_SocksProxy->Start(); |
|
|
|
LogPrint(eLogError, "Clients: Exception in SOCKS Proxy: ", e.what()); |
|
|
|
} |
|
|
|
|
|
|
|
catch (std::exception& e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LogPrint(eLogError, "Clients: Exception in SOCKS Proxy: ", e.what()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|