Skip to content

Commit

Permalink
Merge pull request PurpleI2P#942 from Markovskij/openssl
Browse files Browse the repository at this point in the history
Make tunnels.conf more readable with QT GUI
  • Loading branch information
orignal authored Sep 7, 2017
2 parents 7e0ab6d + 1d8f913 commit 1673966
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
25 changes: 19 additions & 6 deletions qt/i2pd_qt/TunnelConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,25 @@ void TunnelConfig::saveHeaderToStringStream(std::stringstream& out) {
}

void TunnelConfig::saveI2CPParametersToStringStream(std::stringstream& out) {
out << "inbound.length=" << i2cpParameters.getInbound_length().toStdString() << "\n"
<< "outbound.length=" << i2cpParameters.getOutbound_length().toStdString() << "\n"
<< "inbound.quantity=" << i2cpParameters.getInbound_quantity().toStdString() << "\n"
<< "outbound.quantity=" << i2cpParameters.getOutbound_quantity().toStdString() << "\n"
<< "crypto.tagsToSend=" << i2cpParameters.getCrypto_tagsToSend().toStdString() << "\n"
<< "explicitPeers=" << i2cpParameters.getExplicitPeers().toStdString() << "\n\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())
out << i2p::client::I2CP_PARAM_EXPLICIT_PEERS << "="
<< i2cpParameters.getExplicitPeers().toStdString() << "\n";
out << "\n";
}

void ClientTunnelConfig::saveToStringStream(std::stringstream& out) {
Expand Down
1 change: 1 addition & 0 deletions qt/i2pd_qt/TunnelConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string>

#include "../../libi2pd_client/ClientContext.h"
#include "../../libi2pd/Destination.h"
#include "TunnelsPageUpdateListener.h"


Expand Down

0 comments on commit 1673966

Please sign in to comment.