mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
read all sections from tunnels.cfg
This commit is contained in:
parent
d2d7b3b348
commit
97ec65cccd
@ -289,10 +289,10 @@ namespace client
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int numClientTunnels = vm.count (I2P_CLIENT_TUNNEL_NAME);
|
if (vm.count (I2P_CLIENT_TUNNEL_NAME) > 0)
|
||||||
if (numClientTunnels > 0)
|
|
||||||
{
|
{
|
||||||
//auto names = vm[I2P_CLIENT_TUNNEL_NAME].as<std::vector<std::string> >();
|
auto names = vm[I2P_CLIENT_TUNNEL_NAME].as<std::vector<std::string> >();
|
||||||
|
int numClientTunnels = names.size ();
|
||||||
auto ports = vm[I2P_CLIENT_TUNNEL_PORT].as<std::vector<int> >();
|
auto ports = vm[I2P_CLIENT_TUNNEL_PORT].as<std::vector<int> >();
|
||||||
auto destinations = vm[I2P_CLIENT_TUNNEL_DESTINATION].as<std::vector<std::string> >();
|
auto destinations = vm[I2P_CLIENT_TUNNEL_DESTINATION].as<std::vector<std::string> >();
|
||||||
auto keys = vm[I2P_CLIENT_TUNNEL_KEYS].as<std::vector<std::string> >();
|
auto keys = vm[I2P_CLIENT_TUNNEL_KEYS].as<std::vector<std::string> >();
|
||||||
@ -311,9 +311,10 @@ namespace client
|
|||||||
LogPrint (eLogInfo, numClientTunnels, " I2P client tunnels created");
|
LogPrint (eLogInfo, numClientTunnels, " I2P client tunnels created");
|
||||||
}
|
}
|
||||||
|
|
||||||
int numServerTunnels = vm.count (I2P_SERVER_TUNNEL_NAME);
|
if (vm.count (I2P_SERVER_TUNNEL_NAME) > 0)
|
||||||
if (numServerTunnels > 0)
|
|
||||||
{
|
{
|
||||||
|
auto names = vm[I2P_SERVER_TUNNEL_NAME].as<std::vector<std::string> >();
|
||||||
|
int numServerTunnels = names.size ();
|
||||||
auto hosts = vm[I2P_SERVER_TUNNEL_HOST].as<std::vector<std::string> >();
|
auto hosts = vm[I2P_SERVER_TUNNEL_HOST].as<std::vector<std::string> >();
|
||||||
auto ports = vm[I2P_SERVER_TUNNEL_PORT].as<std::vector<int> >();
|
auto ports = vm[I2P_SERVER_TUNNEL_PORT].as<std::vector<int> >();
|
||||||
auto keys = vm[I2P_SERVER_TUNNEL_KEYS].as<std::vector<std::string> >();
|
auto keys = vm[I2P_SERVER_TUNNEL_KEYS].as<std::vector<std::string> >();
|
||||||
|
Loading…
Reference in New Issue
Block a user