From 53de42565e7c53172264717935650004ef7280b6 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 20 Nov 2020 15:35:11 -0500 Subject: [PATCH] support ratchets I2P encryption --- src/i2p.h | 2 +- src/i2psam/i2psam.h | 2 ++ src/qt/optionsmodel.cpp | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i2p.h b/src/i2p.h index 671bb2e..b71389a 100644 --- a/src/i2p.h +++ b/src/i2p.h @@ -24,7 +24,7 @@ #define I2P_SAM_MY_DESTINATION_DEFAULT SAM_GENERATE_MY_DESTINATION #define I2P_SAM_I2P_OPTIONS_PARAM "-i2poptions" -#define I2P_SAM_I2P_OPTIONS_DEFAULT SAM_DEFAULT_I2P_OPTIONS +#define I2P_SAM_I2P_OPTIONS_DEFAULT SAM_NAME_I2CP_LEASESET_ENC_TYPE "=" SAM_DEFAULT_I2CP_LEASESET_ENC_TYPE // i2cp.leaseSetEncType=0,4 #define I2P_SAM_GENERATE_DESTINATION_PARAM "-generatei2pdestination" diff --git a/src/i2psam/i2psam.h b/src/i2psam/i2psam.h index aef15f2..30e5b9c 100644 --- a/src/i2psam/i2psam.h +++ b/src/i2psam/i2psam.h @@ -62,6 +62,8 @@ #define SAM_DEFAULT_OUTBOUND_IPRESTRICTION 2 #define SAM_NAME_OUTBOUND_PRIORITY "outbound.priority" #define SAM_DEFAULT_OUTBOUND_PRIORITY 0 +#define SAM_NAME_I2CP_LEASESET_ENC_TYPE "i2cp.leaseSetEncType" +#define SAM_DEFAULT_I2CP_LEASESET_ENC_TYPE "0,4" namespace SAM { diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index aaa756d..98fa3f7 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -173,6 +173,7 @@ void OptionsModel::Init() FormatI2POptionsString(i2pOptionsTemp, SAM_NAME_OUTBOUND_ALLOWZEROHOP , std::make_pair(settings.contains(SAM_NAME_OUTBOUND_ALLOWZEROHOP ), i2pOutboundAllowZeroHop)); FormatI2POptionsString(i2pOptionsTemp, SAM_NAME_OUTBOUND_IPRESTRICTION , std::make_pair(settings.contains(SAM_NAME_OUTBOUND_IPRESTRICTION ), i2pOutboundIPRestriction)); FormatI2POptionsString(i2pOptionsTemp, SAM_NAME_OUTBOUND_PRIORITY , std::make_pair(settings.contains(SAM_NAME_OUTBOUND_PRIORITY ), i2pOutboundPriority)); + FormatI2POptionsString(i2pOptionsTemp, SAM_NAME_I2CP_LEASESET_ENC_TYPE, std::make_pair(true, std::string (SAM_DEFAULT_I2CP_LEASESET_ENC_TYPE))); // i2cp.leaseSetEncType=0,4 TODO: make it configurable if (!i2pOptionsTemp.empty()) SoftSetArg(I2P_SAM_I2P_OPTIONS_PARAM, i2pOptionsTemp);