mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
fixed #935
This commit is contained in:
parent
ef30d2d3b6
commit
9441c1cffe
10 changed files with 863 additions and 353 deletions
|
@ -6,24 +6,24 @@ void TunnelConfig::saveHeaderToStringStream(std::stringstream& out) {
|
|||
}
|
||||
|
||||
void TunnelConfig::saveI2CPParametersToStringStream(std::stringstream& out) {
|
||||
if (i2cpParameters.getInbound_length().toUShort() != i2p::client::DEFAULT_INBOUND_TUNNEL_LENGTH)
|
||||
out << i2p::client::I2CP_PARAM_INBOUND_TUNNEL_LENGTH << "="
|
||||
<< i2cpParameters.getInbound_length().toStdString() << "\n";
|
||||
if (i2cpParameters.getOutbound_length().toUShort() != i2p::client::DEFAULT_OUTBOUND_TUNNEL_LENGTH)
|
||||
out << i2p::client::I2CP_PARAM_OUTBOUND_TUNNEL_LENGTH << "="
|
||||
<< i2cpParameters.getOutbound_length().toStdString() << "\n";
|
||||
if (i2cpParameters.getInbound_quantity().toUShort() != i2p::client::DEFAULT_INBOUND_TUNNELS_QUANTITY)
|
||||
out << i2p::client::I2CP_PARAM_INBOUND_TUNNELS_QUANTITY << "="
|
||||
<< i2cpParameters.getInbound_quantity().toStdString() << "\n";
|
||||
if (i2cpParameters.getOutbound_quantity().toUShort() != i2p::client::DEFAULT_OUTBOUND_TUNNELS_QUANTITY)
|
||||
out << i2p::client::I2CP_PARAM_OUTBOUND_TUNNELS_QUANTITY << "="
|
||||
<< i2cpParameters.getOutbound_quantity().toStdString() << "\n";
|
||||
if (i2cpParameters.getCrypto_tagsToSend().toUShort() != i2p::client::DEFAULT_TAGS_TO_SEND)
|
||||
out << i2p::client::I2CP_PARAM_TAGS_TO_SEND << "="
|
||||
<< i2cpParameters.getCrypto_tagsToSend().toStdString() << "\n";
|
||||
if (!i2cpParameters.getExplicitPeers().isEmpty())
|
||||
out << i2p::client::I2CP_PARAM_EXPLICIT_PEERS << "="
|
||||
<< i2cpParameters.getExplicitPeers().toStdString() << "\n";
|
||||
if (i2cpParameters.getInbound_length().toUShort() != i2p::client::DEFAULT_INBOUND_TUNNEL_LENGTH)
|
||||
out << i2p::client::I2CP_PARAM_INBOUND_TUNNEL_LENGTH << "="
|
||||
<< i2cpParameters.getInbound_length().toStdString() << "\n";
|
||||
if (i2cpParameters.getOutbound_length().toUShort() != i2p::client::DEFAULT_OUTBOUND_TUNNEL_LENGTH)
|
||||
out << i2p::client::I2CP_PARAM_OUTBOUND_TUNNEL_LENGTH << "="
|
||||
<< i2cpParameters.getOutbound_length().toStdString() << "\n";
|
||||
if (i2cpParameters.getInbound_quantity().toUShort() != i2p::client::DEFAULT_INBOUND_TUNNELS_QUANTITY)
|
||||
out << i2p::client::I2CP_PARAM_INBOUND_TUNNELS_QUANTITY << "="
|
||||
<< i2cpParameters.getInbound_quantity().toStdString() << "\n";
|
||||
if (i2cpParameters.getOutbound_quantity().toUShort() != i2p::client::DEFAULT_OUTBOUND_TUNNELS_QUANTITY)
|
||||
out << i2p::client::I2CP_PARAM_OUTBOUND_TUNNELS_QUANTITY << "="
|
||||
<< i2cpParameters.getOutbound_quantity().toStdString() << "\n";
|
||||
if (i2cpParameters.getCrypto_tagsToSend().toUShort() != i2p::client::DEFAULT_TAGS_TO_SEND)
|
||||
out << i2p::client::I2CP_PARAM_TAGS_TO_SEND << "="
|
||||
<< i2cpParameters.getCrypto_tagsToSend().toStdString() << "\n";
|
||||
if (!i2cpParameters.getExplicitPeers().isEmpty()) //todo #947
|
||||
out << i2p::client::I2CP_PARAM_EXPLICIT_PEERS << "="
|
||||
<< i2cpParameters.getExplicitPeers().toStdString() << "\n";
|
||||
out << "\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue