From a0653e7f43829c8a4530656a491c08a62f00044d Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 14 Aug 2022 10:14:54 +0800 Subject: [PATCH 1/2] ui ssu2 options (part 1 of code) ( #57 related ) + default sigtype fix ( fixes #46 ) --- src/generalsettingswidget.ui | 45 ++++++++++++++++++++++++++++++++++-- src/mainwindow.h | 4 ++-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/src/generalsettingswidget.ui b/src/generalsettingswidget.ui index e81d6f1..22e2b68 100644 --- a/src/generalsettingswidget.ui +++ b/src/generalsettingswidget.ui @@ -7,7 +7,7 @@ 0 0 679 - 4152 + 8152 @@ -584,7 +584,7 @@ QGroupBox::title { 0 20 661 - 397 + 488 @@ -623,6 +623,47 @@ QGroupBox::title { + + + + Enable SSU2 + + + + + + + Publish SSU2 + + + + + + + + + Port to listen for incoming SSU2 packets (0 means auto-assign): + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/src/mainwindow.h b/src/mainwindow.h index e1ddcc6..4f0fe7a 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -681,7 +681,7 @@ private: std::string address = "127.0.0.1"; int destinationPort = 0; int cryptoType = 0; - i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256; + i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519; // I2CP I2CPParameters i2cpParameters; CreateDefaultI2CPOptions (i2cpParameters); @@ -709,7 +709,7 @@ private: std::string hostOverride = ""; std::string webircpass = ""; bool gzip = true; - i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256; + i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519; std::string address = "127.0.0.1"; bool isUniqueLocal = true; int cryptoType = 0; From e03dc6bb9f007c94753bbb75c811393879dc0126 Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 14 Aug 2022 10:53:14 +0800 Subject: [PATCH 2/2] ui ssu2 options (part 2 of code) ( fixes #57 related ) --- src/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7aa868f..6464b7b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -325,6 +325,10 @@ MainWindow::MainWindow(std::shared_ptr logStream_, QWidget *paren initIPAddressBox( OPTION("ntcp2","addressv6",[]{return "::";}), uiSettings->ntcp2AddressV6LineEdit, tr("NTCP2 -> IPv6 address")); //External IPv6 for incoming connections initStringBox( OPTION("ntcp2","proxy",[]{return "";}), uiSettings->lineEditNtcp2Proxy); //Specify proxy server for NTCP2. Should be http://address:port or socks://address:port + initCheckBox( OPTION("ssu2","enabled",[]{return "false";}), uiSettings->ssu2enabledCheckBox); + initCheckBox( OPTION("ssu2","published",[]{return "false";}), uiSettings->ssu2publishedCheckBox); + initTCPPortBox( OPTION("ssu2","port",[]{return "0";}), uiSettings->ssu2portLineEdit, tr("Port to listen for incoming SSU2 packets (set 0 to auto-assign the port)")); + initCheckBox( OPTION("nettime","enabled",[]{return "false";}), uiSettings->checkBoxNettimeEnable); //Enable NTP sync. Disabled by default initStringBox( OPTION("nettime","ntpservers",[]{return "pool.ntp.org";}), uiSettings->lineEditNetTimeNtpServers); //Comma-separated list of NTP servers. pool.ntp.org by default initIntegerBox( OPTION("nettime","ntpsyncinterval",[]{return "72";}), uiSettings->nettimeNtpSyncIntervalNumberLineEdit, tr("nettimeNtpSyncInterval")); //NTP time sync interval in hours. 72 by default