mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-13 01:20:22 +03:00
Merge branch 'openssl' of https://github.com/borned-mind/i2pd into openssl
This commit is contained in:
commit
adaff9f354
@ -64,7 +64,18 @@ namespace util
|
|||||||
|
|
||||||
DaemonWin32 ():isGraceful(false) {}
|
DaemonWin32 ():isGraceful(false) {}
|
||||||
};
|
};
|
||||||
|
#elif defined(ANDROID)
|
||||||
|
#define Daemon i2p::util::DaemonAndroid::Instance()
|
||||||
|
// dummy, invoked from android/jni/DaemonAndroid.*
|
||||||
|
class DaemonAndroid: public i2p::util::Daemon_Singleton
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static DaemonAndroid& Instance()
|
||||||
|
{
|
||||||
|
static DaemonAndroid instance;
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
};
|
||||||
#else
|
#else
|
||||||
#define Daemon i2p::util::DaemonLinux::Instance()
|
#define Daemon i2p::util::DaemonLinux::Instance()
|
||||||
class DaemonLinux : public Daemon_Singleton
|
class DaemonLinux : public Daemon_Singleton
|
||||||
|
@ -204,24 +204,6 @@ int ServerTunnelPane::appendServerTunnelForm(
|
|||||||
horizontalLayout_2->addItem(horizontalSpacer);
|
horizontalLayout_2->addItem(horizontalSpacer);
|
||||||
tunnelGridLayout->addLayout(horizontalLayout_2);
|
tunnelGridLayout->addLayout(horizontalLayout_2);
|
||||||
}
|
}
|
||||||
{
|
|
||||||
uint32_t maxConns = tunnelConfig->getmaxConns();
|
|
||||||
QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
|
|
||||||
horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2"));
|
|
||||||
ui.maxConnsLabel = new QLabel(gridLayoutWidget_2);
|
|
||||||
maxConnsLabel->setObjectName(QStringLiteral("maxConnsLabel"));
|
|
||||||
horizontalLayout_2->addWidget(maxConnsLabel);
|
|
||||||
ui.maxConnsLineEdit = new QLineEdit(gridLayoutWidget_2);
|
|
||||||
maxConnsLineEdit->setObjectName(QStringLiteral("maxConnsLineEdit"));
|
|
||||||
maxConnsLineEdit->setText(QString::number(maxConns));
|
|
||||||
maxConnsLineEdit->setMaximumWidth(80);
|
|
||||||
QObject::connect(maxConnsLineEdit, SIGNAL(textChanged(const QString &)),
|
|
||||||
this, SLOT(updated()));
|
|
||||||
horizontalLayout_2->addWidget(maxConnsLineEdit);
|
|
||||||
QSpacerItem * horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
|
||||||
horizontalLayout_2->addItem(horizontalSpacer);
|
|
||||||
tunnelGridLayout->addLayout(horizontalLayout_2);
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
std::string address = tunnelConfig->getaddress();
|
std::string address = tunnelConfig->getaddress();
|
||||||
QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
|
QHBoxLayout *horizontalLayout_2 = new QHBoxLayout();
|
||||||
|
@ -81,10 +81,6 @@ private:
|
|||||||
QLabel * addressLabel;
|
QLabel * addressLabel;
|
||||||
QLineEdit * addressLineEdit;
|
QLineEdit * addressLineEdit;
|
||||||
|
|
||||||
//maxConns
|
|
||||||
QLabel * maxConnsLabel;
|
|
||||||
QLineEdit * maxConnsLineEdit;
|
|
||||||
|
|
||||||
//gzip
|
//gzip
|
||||||
QCheckBox * gzipCheckBox;
|
QCheckBox * gzipCheckBox;
|
||||||
|
|
||||||
@ -109,7 +105,6 @@ private:
|
|||||||
hostOverrideLabel->setText(QApplication::translate("srvTunForm", "Host override:", 0));
|
hostOverrideLabel->setText(QApplication::translate("srvTunForm", "Host override:", 0));
|
||||||
webIRCPassLabel->setText(QApplication::translate("srvTunForm", "WebIRC password:", 0));
|
webIRCPassLabel->setText(QApplication::translate("srvTunForm", "WebIRC password:", 0));
|
||||||
addressLabel->setText(QApplication::translate("srvTunForm", "Address:", 0));
|
addressLabel->setText(QApplication::translate("srvTunForm", "Address:", 0));
|
||||||
maxConnsLabel->setText(QApplication::translate("srvTunForm", "Max connections:", 0));
|
|
||||||
|
|
||||||
gzipCheckBox->setText(QApplication::translate("srvTunForm", "GZip", 0));
|
gzipCheckBox->setText(QApplication::translate("srvTunForm", "GZip", 0));
|
||||||
isUniqueLocalCheckBox->setText(QApplication::translate("srvTunForm", "Is unique local", 0));
|
isUniqueLocalCheckBox->setText(QApplication::translate("srvTunForm", "Is unique local", 0));
|
||||||
@ -152,14 +147,6 @@ protected:
|
|||||||
|
|
||||||
stc->setaddress(addressLineEdit->text().toStdString());
|
stc->setaddress(addressLineEdit->text().toStdString());
|
||||||
|
|
||||||
auto mcStr=maxConnsLineEdit->text();
|
|
||||||
uint32_t mcInt=(uint32_t)mcStr.toInt(&ok);
|
|
||||||
if(!ok){
|
|
||||||
highlightWrongInput(QApplication::tr("Bad maxConns, must be int.")+" "+cannotSaveSettings,maxConnsLineEdit);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
stc->setmaxConns(mcInt);
|
|
||||||
|
|
||||||
stc->setgzip(gzipCheckBox->isChecked());
|
stc->setgzip(gzipCheckBox->isChecked());
|
||||||
|
|
||||||
stc->setisUniqueLocal(isUniqueLocalCheckBox->isChecked());
|
stc->setisUniqueLocal(isUniqueLocalCheckBox->isChecked());
|
||||||
|
@ -48,7 +48,6 @@ void ServerTunnelConfig::saveToStringStream(std::stringstream& out) {
|
|||||||
<< "enableuniquelocal=" << (isUniqueLocal?"true":"false") << "\n"
|
<< "enableuniquelocal=" << (isUniqueLocal?"true":"false") << "\n"
|
||||||
<< "address=" << address << "\n"
|
<< "address=" << address << "\n"
|
||||||
<< "hostoverride=" << hostOverride << "\n"
|
<< "hostoverride=" << hostOverride << "\n"
|
||||||
<< "webircpassword=" << webircpass << "\n"
|
<< "webircpassword=" << webircpass << "\n";
|
||||||
<< "maxconns=" << maxConns << "\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,6 @@ public:
|
|||||||
std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, "");
|
std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, "");
|
||||||
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true);
|
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true);
|
||||||
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
|
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
|
||||||
uint32_t maxConns = section.second.get(i2p::stream::I2CP_PARAM_STREAMING_MAX_CONNS_PER_MIN, i2p::stream::DEFAULT_MAX_CONNS_PER_MIN);
|
|
||||||
std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1");
|
std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1");
|
||||||
bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true);
|
bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true);
|
||||||
# * inport -- optional, i2p service port, if unset - the same as 'port'
|
# * inport -- optional, i2p service port, if unset - the same as 'port'
|
||||||
@ -170,7 +169,6 @@ class ServerTunnelConfig : public TunnelConfig {
|
|||||||
std::string webircpass;
|
std::string webircpass;
|
||||||
bool gzip;
|
bool gzip;
|
||||||
i2p::data::SigningKeyType sigType;
|
i2p::data::SigningKeyType sigType;
|
||||||
uint32_t maxConns;
|
|
||||||
std::string address;
|
std::string address;
|
||||||
bool isUniqueLocal;
|
bool isUniqueLocal;
|
||||||
public:
|
public:
|
||||||
@ -184,7 +182,6 @@ public:
|
|||||||
std::string webircpass_,
|
std::string webircpass_,
|
||||||
bool gzip_,
|
bool gzip_,
|
||||||
i2p::data::SigningKeyType sigType_,
|
i2p::data::SigningKeyType sigType_,
|
||||||
uint32_t maxConns_,
|
|
||||||
std::string address_,
|
std::string address_,
|
||||||
bool isUniqueLocal_): TunnelConfig(name_, type_, i2cpParameters_),
|
bool isUniqueLocal_): TunnelConfig(name_, type_, i2cpParameters_),
|
||||||
host(host_),
|
host(host_),
|
||||||
@ -196,7 +193,6 @@ public:
|
|||||||
webircpass(webircpass_),
|
webircpass(webircpass_),
|
||||||
gzip(gzip_),
|
gzip(gzip_),
|
||||||
sigType(sigType_),
|
sigType(sigType_),
|
||||||
maxConns(maxConns_),
|
|
||||||
address(address_),
|
address(address_),
|
||||||
isUniqueLocal(isUniqueLocal_) {}
|
isUniqueLocal(isUniqueLocal_) {}
|
||||||
std::string& gethost(){return host;}
|
std::string& gethost(){return host;}
|
||||||
@ -208,7 +204,6 @@ public:
|
|||||||
std::string& getwebircpass(){return webircpass;}
|
std::string& getwebircpass(){return webircpass;}
|
||||||
bool getgzip(){return gzip;}
|
bool getgzip(){return gzip;}
|
||||||
i2p::data::SigningKeyType getsigType(){return sigType;}
|
i2p::data::SigningKeyType getsigType(){return sigType;}
|
||||||
uint32_t getmaxConns(){return maxConns;}
|
|
||||||
std::string& getaddress(){return address;}
|
std::string& getaddress(){return address;}
|
||||||
bool getisUniqueLocal(){return isUniqueLocal;}
|
bool getisUniqueLocal(){return isUniqueLocal;}
|
||||||
void sethost(const std::string& host_){host=host_;}
|
void sethost(const std::string& host_){host=host_;}
|
||||||
@ -220,7 +215,6 @@ public:
|
|||||||
void setwebircpass(const std::string& webircpass_){webircpass=webircpass_;}
|
void setwebircpass(const std::string& webircpass_){webircpass=webircpass_;}
|
||||||
void setgzip(bool gzip_){gzip=gzip_;}
|
void setgzip(bool gzip_){gzip=gzip_;}
|
||||||
void setsigType(i2p::data::SigningKeyType sigType_){sigType=sigType_;}
|
void setsigType(i2p::data::SigningKeyType sigType_){sigType=sigType_;}
|
||||||
void setmaxConns(uint32_t maxConns_){maxConns=maxConns_;}
|
|
||||||
void setaddress(const std::string& address_){address=address_;}
|
void setaddress(const std::string& address_){address=address_;}
|
||||||
void setisUniqueLocal(bool isUniqueLocal_){isUniqueLocal=isUniqueLocal_;}
|
void setisUniqueLocal(bool isUniqueLocal_){isUniqueLocal=isUniqueLocal_;}
|
||||||
virtual void saveToStringStream(std::stringstream& out);
|
virtual void saveToStringStream(std::stringstream& out);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE RCC><RCC version="1.0">
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
<qresource prefix="/">
|
<qresource prefix="/icons">
|
||||||
<file>images/icon.png</file>
|
<file alias="mask">resources/icons/mask.ico</file>
|
||||||
</qresource>
|
<file alias="icon">resources/images/icon.png</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
32
qt/i2pd_qt/i2pd.rc
Normal file
32
qt/i2pd_qt/i2pd.rc
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
IDI_ICON1 ICON DISCARDABLE "resources/icons/mask.ico"
|
||||||
|
|
||||||
|
#include <windows.h> // needed for VERSIONINFO
|
||||||
|
#include "../../libi2pd/version.h"
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION I2PD_VERSION_MAJOR,I2PD_VERSION_MINOR,I2PD_VERSION_MICRO,I2PD_VERSION_PATCH
|
||||||
|
PRODUCTVERSION I2P_VERSION_MAJOR,I2P_VERSION_MINOR,I2P_VERSION_MICRO,I2P_VERSION_PATCH
|
||||||
|
FILEOS VOS_NT_WINDOWS32
|
||||||
|
FILETYPE VFT_APP
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904E4" // U.S. English - multilingual (hex)
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "PurpleI2P"
|
||||||
|
VALUE "FileDescription", "I2Pd Qt"
|
||||||
|
VALUE "FileVersion", I2PD_VERSION
|
||||||
|
VALUE "InternalName", "i2pd-qt"
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) 2013-2018, The PurpleI2P Project"
|
||||||
|
VALUE "LegalTrademarks1", "Distributed under the BSD 3-Clause software license, see the accompanying file COPYING or https://opensource.org/licenses/BSD-3-Clause."
|
||||||
|
VALUE "OriginalFilename", "i2pd_qt.exe"
|
||||||
|
VALUE "ProductName", "i2pd-qt"
|
||||||
|
VALUE "ProductVersion", I2P_VERSION
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
|
||||||
|
END
|
||||||
|
END
|
@ -272,10 +272,29 @@ linux:!android {
|
|||||||
LIBS += -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lminiupnpc
|
LIBS += -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lminiupnpc
|
||||||
}
|
}
|
||||||
|
|
||||||
windows:!android {
|
windows {
|
||||||
message("Using Windows settings")
|
message("Using Windows settings")
|
||||||
DEFINES += BOOST_USE_WINDOWS_H WINDOWS
|
RC_FILE = i2pd.rc
|
||||||
LIBS += -lcrypto -lssl -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread -lminiupnpc
|
DEFINES += BOOST_USE_WINDOWS_H WINDOWS _WINDOWS WIN32_LEAN_AND_MEAN MINIUPNP_STATICLIB
|
||||||
|
DEFINES -= UNICODE _UNICODE
|
||||||
|
BOOST_SUFFIX = -mt
|
||||||
|
QMAKE_CXXFLAGS = -Os
|
||||||
|
QMAKE_LFLAGS = -s -Wl,-Bstatic -static-libgcc -static-libstdc++ -mwindows
|
||||||
|
|
||||||
|
LIBS = -lminiupnpc \
|
||||||
|
-lboost_system$$BOOST_SUFFIX \
|
||||||
|
-lboost_date_time$$BOOST_SUFFIX \
|
||||||
|
-lboost_filesystem$$BOOST_SUFFIX \
|
||||||
|
-lboost_program_options$$BOOST_SUFFIX \
|
||||||
|
-lssl \
|
||||||
|
-lcrypto \
|
||||||
|
-lz \
|
||||||
|
-lwsock32 \
|
||||||
|
-lws2_32 \
|
||||||
|
-lgdi32 \
|
||||||
|
-liphlpapi \
|
||||||
|
-lstdc++ \
|
||||||
|
-lpthread
|
||||||
}
|
}
|
||||||
|
|
||||||
!android:!symbian:!maemo5:!simulator {
|
!android:!symbian:!maemo5:!simulator {
|
||||||
|
@ -449,7 +449,7 @@ void MainWindow::createTrayIcon() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setIcon() {
|
void MainWindow::setIcon() {
|
||||||
QIcon icon(":/images/icon.png");
|
QIcon icon(":icons/mask");
|
||||||
trayIcon->setIcon(icon);
|
trayIcon->setIcon(icon);
|
||||||
setWindowIcon(icon);
|
setWindowIcon(icon);
|
||||||
|
|
||||||
|
@ -628,7 +628,6 @@ private:
|
|||||||
std::string webircpass = "";
|
std::string webircpass = "";
|
||||||
bool gzip = true;
|
bool gzip = true;
|
||||||
i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256;
|
i2p::data::SigningKeyType sigType = i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256;
|
||||||
uint32_t maxConns = i2p::stream::DEFAULT_MAX_CONNS_PER_MIN;
|
|
||||||
std::string address = "127.0.0.1";
|
std::string address = "127.0.0.1";
|
||||||
bool isUniqueLocal = true;
|
bool isUniqueLocal = true;
|
||||||
|
|
||||||
@ -646,7 +645,6 @@ private:
|
|||||||
webircpass,
|
webircpass,
|
||||||
gzip,
|
gzip,
|
||||||
sigType,
|
sigType,
|
||||||
maxConns,
|
|
||||||
address,
|
address,
|
||||||
isUniqueLocal);
|
isUniqueLocal);
|
||||||
|
|
||||||
@ -734,7 +732,6 @@ private:
|
|||||||
std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, "");
|
std::string webircpass = section.second.get<std::string> (I2P_SERVER_TUNNEL_WEBIRC_PASSWORD, "");
|
||||||
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true);
|
bool gzip = section.second.get (I2P_SERVER_TUNNEL_GZIP, true);
|
||||||
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
|
i2p::data::SigningKeyType sigType = section.second.get (I2P_SERVER_TUNNEL_SIGNATURE_TYPE, i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA256_P256);
|
||||||
uint32_t maxConns = section.second.get(i2p::stream::I2CP_PARAM_STREAMING_MAX_CONNS_PER_MIN, i2p::stream::DEFAULT_MAX_CONNS_PER_MIN);
|
|
||||||
std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1");
|
std::string address = section.second.get<std::string> (I2P_SERVER_TUNNEL_ADDRESS, "127.0.0.1");
|
||||||
bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true);
|
bool isUniqueLocal = section.second.get(I2P_SERVER_TUNNEL_ENABLE_UNIQUE_LOCAL, true);
|
||||||
|
|
||||||
@ -769,7 +766,6 @@ private:
|
|||||||
webircpass,
|
webircpass,
|
||||||
gzip,
|
gzip,
|
||||||
sigType,
|
sigType,
|
||||||
maxConns,
|
|
||||||
address,
|
address,
|
||||||
isUniqueLocal);
|
isUniqueLocal);
|
||||||
}
|
}
|
||||||
|
BIN
qt/i2pd_qt/resources/icons/mask.ico
Normal file
BIN
qt/i2pd_qt/resources/icons/mask.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Loading…
Reference in New Issue
Block a user