From 365fce922c6fe14c24736548ded2dd59fee3971c Mon Sep 17 00:00:00 2001 From: user Date: Thu, 22 Oct 2020 00:35:59 +0800 Subject: [PATCH] qt: socks defaults fixes, socks outproxy enabled checkbox added; visual fixes --- qt/i2pd_qt/generalsettingswidget.ui | 1015 ++++++++++++++------------- qt/i2pd_qt/mainwindow.cpp | 7 +- 2 files changed, 515 insertions(+), 507 deletions(-) diff --git a/qt/i2pd_qt/generalsettingswidget.ui b/qt/i2pd_qt/generalsettingswidget.ui index eabaa473..7a35c0a5 100644 --- a/qt/i2pd_qt/generalsettingswidget.ui +++ b/qt/i2pd_qt/generalsettingswidget.ui @@ -40,7 +40,7 @@ QGroupBox::title { 0 0 679 - 4242 + 4434 @@ -82,13 +82,13 @@ QGroupBox::title { 0 - 60 + 80 16777215 - 60 + 80 @@ -112,46 +112,62 @@ QGroupBox::title { Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - + - 0 - 18 - 661 - 31 + 12 + 19 + 651 + 51 - - - QLayout::SetMinAndMaxSize - - - - + - - - - 0 - 25 - + + + QLayout::SetMinAndMaxSize - - - 0 - 0 - + + 10 - - - 16777215 - 25 - + + 10 - - Browse… + + 10 - + + 10 + + + + + + + + + 0 + 27 + + + + + 0 + 0 + + + + + 16777215 + 27 + + + + Browse… + + + + @@ -162,40 +178,56 @@ QGroupBox::title { 0 - 51 + 80 16777215 - 51 + 80 Data folder (for storage of i2pd data — RI, keys, peer profiles, …): - + - 0 - 20 - 661 - 31 + 12 + 19 + 651 + 51 - - - QLayout::SetMaximumSize + + + 10 + + + 10 + + + 10 + + + 10 - - - - - - Browse… + + + QLayout::SetMaximumSize - + + + + + + + Browse… + + + + @@ -212,58 +244,74 @@ QGroupBox::title { 0 - 51 + 80 16777215 - 51 + 80 Pid file: - + - 0 - 18 - 661 - 31 + 12 + 19 + 651 + 51 - - - QLayout::SetMaximumSize + + + 10 + + + 10 + + + 10 + + + 10 - - - - - - - 0 - 0 - - - - - 0 - 27 - - - - - 16777215 - 27 - - - - Browse… + + + QLayout::SetMaximumSize - + + + + + + + + 0 + 0 + + + + + 0 + 27 + + + + + 16777215 + 27 + + + + Browse… + + + + @@ -280,58 +328,74 @@ QGroupBox::title { 0 - 51 + 80 16777215 - 51 + 80 Tunnels configuration file: - + - 0 - 18 - 661 - 31 + 12 + 19 + 651 + 51 - - - QLayout::SetMaximumSize + + + 10 + + + 10 + + + 10 + + + 10 - - - - - - - 0 - 0 - - - - - 0 - 27 - - - - - 16777215 - 27 - - - - Browse… + + + QLayout::SetMaximumSize - + + + + + + + + 0 + 0 + + + + + 0 + 27 + + + + + 16777215 + 27 + + + + Browse… + + + + @@ -2885,434 +2949,377 @@ Comma separated list of base64 identities: 0 - 405 + 500 16777215 - 405 + 500 Socks proxy - + - 0 + 9 20 - 97 - 22 - - - - Enabled - - - - - - 0 - 40 661 - 31 + 470 - + + + 10 + + + 10 + + + 10 + + + 10 + - + - IP address to listen on: + Enabled - - - - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + IP address to listen on: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - - 0 - 70 - 661 - 31 - - - - - - Port to listen on: - - - - - - - - 80 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - 100 - 661 - 31 - - - - - - - Keys file: - - - - - - - - - - Browse… - - - - - - - - - 0 - 160 - 661 - 31 - - - - - - - Inbound tunnels length: - - - - - - - - 80 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - 190 - 661 - 31 - - - - - - - Inbound tunnels quantity: - - - - - - - - 80 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - 220 - 661 - 31 - - - - - - - Outbound tunnels length: - - - - - - - - 80 - 16777215 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - 250 - 661 - 31 - - - - - - - Outbound tunnels quantity: - - - - - - - - 80 - 16777215 - - - + + + + + Port to listen on: + + + + + + + + 80 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + Keys file: + + + + + + + + + + Browse… + + + + - - - - - - 0 - 280 - 661 - 31 - - - - - - Outproxy address: - - + + + + + Signature type: + + + + + + + + + + Edit + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - + + + + + Inbound tunnels length: + + + + + + + + 80 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + Inbound tunnels quantity: + + + + + + + + 80 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - - 0 - 310 - 661 - 31 - - - - - - Outproxy port: - - + + + + + Outbound tunnels length: + + + + + + + + 80 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - 80 - 16777215 - - - + + + + + Outbound tunnels quantity: + + + + + + + + 80 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Qt::Horizontal - - - - 40 - 20 - + + + 0 - - - - - - - - 0 - 130 - 661 - 31 - - - - - - - Signature type: + + 0 - - - - + + + + Outproxy enabled + + + + - - - Edit - - + + + + + Outproxy address: + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + Outproxy port: + + + + + + + + 80 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - - - -1 - 340 - 661 - 62 - - - diff --git a/qt/i2pd_qt/mainwindow.cpp b/qt/i2pd_qt/mainwindow.cpp index 95712b68..89178ee0 100644 --- a/qt/i2pd_qt/mainwindow.cpp +++ b/qt/i2pd_qt/mainwindow.cpp @@ -84,7 +84,7 @@ MainWindow::MainWindow(std::shared_ptr logStream_, QWidget *paren ui->settingsScrollArea->resize(uiSettings->settingsContentsQVBoxLayout->sizeHint().width()+10,380); //QScrollBar* const barSett = ui->settingsScrollArea->verticalScrollBar(); int w = 683; - int h = 4250; + int h = 4550; ui->settingsContents->setFixedSize(w, h); ui->settingsContents->setGeometry(QRect(0,0,w,h)); @@ -232,8 +232,9 @@ MainWindow::MainWindow(std::shared_ptr logStream_, QWidget *paren initStringBox( OPTION("socksproxy","inbound.quantity",[]{return "";}), uiSettings->socksProxyInboundTunnQuantityLineEdit); initStringBox( OPTION("socksproxy","outbound.length",[]{return "";}), uiSettings->socksProxyOutBoundTunnLenLineEdit); initStringBox( OPTION("socksproxy","outbound.quantity",[]{return "";}), uiSettings->socksProxyOutboundTunnQuantityLineEdit); - initIPAddressBox( OPTION("socksproxy","outproxy",[]{return "";}), uiSettings->outproxyAddressLineEdit, tr("Socks proxy -> Outproxy address")); - initTCPPortBox( OPTION("socksproxy","outproxyport",[]{return "";}), uiSettings->outproxyPortLineEdit, tr("Socks proxy -> Outproxy port")); + initCheckBox( OPTION("socksproxy","outproxy.enabled",[]{return "false";}), uiSettings->socksOutproxyEnabledCheckBox); + initIPAddressBox( OPTION("socksproxy","outproxy",[]{return "127.0.0.1";}), uiSettings->outproxyAddressLineEdit, tr("Socks proxy -> Outproxy address")); + initTCPPortBox( OPTION("socksproxy","outproxyport",[]{return "9050";}), uiSettings->outproxyPortLineEdit, tr("Socks proxy -> Outproxy port")); initStringBox( OPTION("socksproxy","i2cp.leaseSetType",[]{return "1";}), uiSettings->socksProxyI2cpLeaseSetTypeLineEdit);//Type of LeaseSet to be sent. 1, 3 or 5. 1 by default initStringBox( OPTION("socksproxy","i2cp.leaseSetEncType",[]{return "";}), uiSettings->socksProxyI2cpLeaseSetEncTypeLineEdit);//Comma separated encryption types to be used in LeaseSet type 3 or 5