mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-23 15:02:52 +00:00
i2cp.closeIdleTime and i2cp.newDestOnResume params for httpproxy and socksproxy
This commit is contained in:
1 parent
eee36175e6
commit
3598cfdda0
2 files changed
+18
No files matched your search
@@ -146,6 +146,8 @@ namespace config {
|
||||
("httpproxy.i2p.streaming.maxInboundSpeed", value<std::string>()->default_value("1730000000"), "Max inbound speed of HTTP proxy stream in bytes/sec")
|
||||
("httpproxy.i2p.streaming.profile", value<std::string>()->default_value("1"), "HTTP Proxy bandwidth usage profile. 1 - bulk(high), 2- interactive(low)")
|
||||
("httpproxy.i2p.streaming.maxWindowSize", value<std::string>()->default_value("512"), "HTTP Proxy stream max window size. 512 by default")
|
||||
("httpproxy.i2cp.closeIdleTime", value<uint64_t>()->default_value(0), "HTTP Proxy idle timeout in milliseconds after which destination stops building tunnels. Disabled by default(0)")
|
||||
("httpproxy.i2cp.newDestOnResume", value<bool>()->default_value(false), "HTTP Proxy generate a new local destination when resuming from idle. false by default")
|
||||
;
|
||||
|
||||
options_description socksproxy("SOCKS Proxy options");
|
||||
@@ -178,6 +180,8 @@ namespace config {
|
||||
("socksproxy.i2p.streaming.maxInboundSpeed", value<std::string>()->default_value("1730000000"), "Max inbound speed of SOCKS proxy stream in bytes/sec")
|
||||
("socksproxy.i2p.streaming.profile", value<std::string>()->default_value("1"), "SOCKS Proxy bandwidth usage profile. 1 - bulk(high), 2- interactive(low)")
|
||||
("socksproxy.i2p.streaming.maxWindowSize", value<std::string>()->default_value("512"), "SOCKS Proxy stream max window size. 512 by default")
|
||||
("socksproxy.i2cp.closeIdleTime", value<uint64_t>()->default_value(0), "SOCKS Proxy idle timeout in milliseconds after which destination stops building tunnels. Disabled by default(0)")
|
||||
("socksproxy.i2cp.newDestOnResume", value<bool>()->default_value(false), "SOCKS Proxy generate a new local destination when resuming from idle. false by default")
|
||||
;
|
||||
|
||||
options_description shareddest("Shared local destination options");
|
||||
|
||||
@@ -985,6 +985,13 @@ namespace client
|
||||
{
|
||||
m_HttpProxy = new i2p::proxy::HTTPProxy("HTTP Proxy", httpProxyAddr, httpProxyPort,
|
||||
httpOutProxyURL, httpAddresshelper, httpSendUserAgent, localDestination);
|
||||
uint64_t closeIdleTime; i2p::config::GetOption("httpproxy.i2cp.closeIdleTime", closeIdleTime);
|
||||
if (closeIdleTime)
|
||||
{
|
||||
m_HttpProxy->SetCloseIdleTime(closeIdleTime);
|
||||
bool newDestOnResume; i2p::config::GetOption("httpproxy.i2cp.newDestOnResume", newDestOnResume);
|
||||
m_HttpProxy->SetNewDestOnResume(newDestOnResume);
|
||||
}
|
||||
m_HttpProxy->Start();
|
||||
}
|
||||
catch (std::exception& e)
|
||||
@@ -1040,6 +1047,13 @@ namespace client
|
||||
{
|
||||
m_SocksProxy = new i2p::proxy::SOCKSProxy("SOCKS", socksProxyAddr, socksProxyPort,
|
||||
socksOutProxy, socksOutProxyAddr, socksOutProxyPort, localDestination);
|
||||
uint64_t closeIdleTime; i2p::config::GetOption("socksproxy.i2cp.closeIdleTime", closeIdleTime);
|
||||
if (closeIdleTime)
|
||||
{
|
||||
m_SocksProxy->SetCloseIdleTime(closeIdleTime);
|
||||
bool newDestOnResume; i2p::config::GetOption("socksproxy.i2cp.newDestOnResume", newDestOnResume);
|
||||
m_SocksProxy->SetNewDestOnResume(newDestOnResume);
|
||||
}
|
||||
m_SocksProxy->Start();
|
||||
}
|
||||
catch (std::exception& e)
|
||||
|
||||
Reference in new issue
Block a user