Browse Source

merged with upstream

pull/892/head
hypnosis-i2p 8 years ago
parent
commit
7379b4ddd2
  1. 2
      libi2pd_client/SAM.cpp
  2. 6
      libi2pd_client/SAM.h
  3. 2
      qt/i2pd_qt/ClientTunnelPane.cpp
  4. 2
      qt/i2pd_qt/ServerTunnelPane.cpp
  5. 20
      qt/i2pd_qt/SignatureTypeComboboxFactory.h
  6. 2
      qt/i2pd_qt/TunnelConfig.h
  7. 173
      qt/i2pd_qt/i2pd_qt.pro
  8. 8
      qt/i2pd_qt/mainwindow.cpp
  9. 4
      qt/i2pd_qt/mainwindow.h

2
libi2pd_client/SAM.cpp

@ -812,7 +812,7 @@ namespace client @@ -812,7 +812,7 @@ namespace client
socks.push_back(sock);
}
}
for (auto & sock : socks ) sock->Terminate();
for (auto & sock : socks ) sock->Terminate("SAMSession::CloseStreams()");
m_Sockets.clear();
}

6
libi2pd_client/SAM.h

@ -87,10 +87,10 @@ namespace client @@ -87,10 +87,10 @@ namespace client
void SetSocketType (SAMSocketType socketType) { m_SocketType = socketType; };
SAMSocketType GetSocketType () const { return m_SocketType; };
void Terminate ();
private:
void Terminate (const char* reason);
private:
void Terminate (const char* reason);
void HandleHandshakeReceived (const boost::system::error_code& ecode, std::size_t bytes_transferred);
void HandleHandshakeReplySent (const boost::system::error_code& ecode, std::size_t bytes_transferred);
void HandleMessage (const boost::system::error_code& ecode, std::size_t bytes_transferred);

2
qt/i2pd_qt/ClientTunnelPane.cpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#include "ClientTunnelPane.h"
#include "../../ClientContext.h"
#include "ClientContext.h"
#include "SignatureTypeComboboxFactory.h"
#include "QVBoxLayout"

2
qt/i2pd_qt/ServerTunnelPane.cpp

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#include "ServerTunnelPane.h"
#include "../../ClientContext.h"
#include "ClientContext.h"
#include "SignatureTypeComboboxFactory.h"
ServerTunnelPane::ServerTunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener, ServerTunnelConfig* tunconf):

20
qt/i2pd_qt/SignatureTypeComboboxFactory.h

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
#include <QApplication>
#include <QComboBox>
#include <QWidget>
#include "../../Identity.h"
#include "Identity.h"
class SignatureTypeComboBoxFactory
{
@ -57,12 +57,22 @@ public: @@ -57,12 +57,22 @@ public:
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "EDDSA_SHA512_ED25519", 0), SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519); //7
if(selectedSigType==SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "EDDSA_SHA512_ED25519PH", 0), SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519PH); //8
if(selectedSigType==SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519PH){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "EDDSA_SHA512_ED25519PH", 0), SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519ph); //8
if(selectedSigType==SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519ph){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
// the following signature type should never appear in netid=2
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_A_GOSTR3411", 0), SIGNING_KEY_TYPE_GOSTR3410_A_GOSTR3411); //65280
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_A_GOSTR3411){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256", 0), SIGNING_KEY_TYPE_GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256); //9
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_TC26_A_512_GOSTR3411_512", 0), SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512); //10
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
// TODO: remove later
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256_TEST", 0), SIGNING_KEY_TYPE_GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256_TEST); //65281
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_CRYPTO_PRO_A_GOSTR3411_256_TEST){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
addItem(signatureTypeCombobox, QApplication::translate("signatureTypeCombobox", "GOSTR3410_TC26_A_512_GOSTR3411_512_TEST", 0), SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512_TEST); //65282
if(selectedSigType==SIGNING_KEY_TYPE_GOSTR3410_TC26_A_512_GOSTR3411_512_TEST){signatureTypeCombobox->setCurrentIndex(index);foundSelected=true;}
++index;
if(!foundSelected){
addItem(signatureTypeCombobox, QString::number(selectedSigType), selectedSigType); //unknown sigtype

2
qt/i2pd_qt/TunnelConfig.h

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
#include "QString"
#include <string>
#include "../../ClientContext.h"
#include "../../libi2pd_client/ClientContext.h"
#include "TunnelsPageUpdateListener.h"

173
qt/i2pd_qt/i2pd_qt.pro

@ -24,42 +24,149 @@ IFADDRS_PATH = $$MAIN_PATH/android-ifaddrs @@ -24,42 +24,149 @@ IFADDRS_PATH = $$MAIN_PATH/android-ifaddrs
# 2) Check API 11
# Finally, click Install.
SOURCES += DaemonQT.cpp mainwindow.cpp
# ../../HTTPServer.cpp ../../I2PControl.cpp ../../Daemon.cpp ../../Config.cpp \
# ../../AddressBook.cpp ../../api.cpp ../../Base.cpp ../../BOB.cpp ../../ClientContext.cpp \
# ../../Crypto.cpp ../../Datagram.cpp ../../Destination.cpp ../../Family.cpp ../../FS.cpp \
# ../../Garlic.cpp ../../HTTP.cpp ../../HTTPProxy.cpp ../../I2CP.cpp ../../I2NPProtocol.cpp \
# ../../I2PEndian.cpp ../../I2PService.cpp ../../I2PTunnel.cpp ../../Identity.cpp \
# ../../LeaseSet.cpp ../../Log.cpp ../../NetDb.cpp ../../NetDbRequests.cpp \
# ../../NTCPSession.cpp ../../Profiling.cpp ../../Reseed.cpp ../../RouterContext.cpp \
# ../../RouterInfo.cpp ../../SAM.cpp ../../Signature.cpp ../../SOCKS.cpp ../../SSU.cpp \
# ../../SSUData.cpp ../../SSUSession.cpp ../../Streaming.cpp ../../TransitTunnel.cpp \
# ../../Transports.cpp ../../Tunnel.cpp ../../TunnelEndpoint.cpp ../../TunnelGateway.cpp \
# ../../TunnelPool.cpp ../../UPnP.cpp ../../Gzip.cpp ../../Timestamp.cpp ../../util.cpp \
# ../../Event.cpp ../../BloomFiler.cpp ../../Gost.cpp ../../MatchedDestination.cpp \
# ../../i2pd.cpp
SOURCES += $$files(../../libi2pd/*.cpp)
SOURCES += $$files(../../libi2pd_client/*.cpp)
SOURCES += $$files(../../daemon/*.cpp)
SOURCES += $$files(./*.cpp)
SOURCES += DaemonQT.cpp mainwindow.cpp \
../../libi2pd/api.cpp \
../../libi2pd/Base.cpp \
../../libi2pd/BloomFilter.cpp \
../../libi2pd/Config.cpp \
../../libi2pd/Crypto.cpp \
../../libi2pd/Datagram.cpp \
../../libi2pd/Destination.cpp \
../../libi2pd/Event.cpp \
../../libi2pd/Family.cpp \
../../libi2pd/FS.cpp \
../../libi2pd/Garlic.cpp \
../../libi2pd/Gost.cpp \
../../libi2pd/Gzip.cpp \
../../libi2pd/HTTP.cpp \
../../libi2pd/I2NPProtocol.cpp \
../../libi2pd/I2PEndian.cpp \
../../libi2pd/Identity.cpp \
../../libi2pd/LeaseSet.cpp \
../../libi2pd/Log.cpp \
../../libi2pd/NetDb.cpp \
../../libi2pd/NetDbRequests.cpp \
../../libi2pd/NTCPSession.cpp \
../../libi2pd/Profiling.cpp \
../../libi2pd/Reseed.cpp \
../../libi2pd/RouterContext.cpp \
../../libi2pd/RouterInfo.cpp \
../../libi2pd/Signature.cpp \
../../libi2pd/SSU.cpp \
../../libi2pd/SSUData.cpp \
../../libi2pd/SSUSession.cpp \
../../libi2pd/Streaming.cpp \
../../libi2pd/Timestamp.cpp \
../../libi2pd/TransitTunnel.cpp \
../../libi2pd/Transports.cpp \
../../libi2pd/Tunnel.cpp \
../../libi2pd/TunnelEndpoint.cpp \
../../libi2pd/TunnelGateway.cpp \
../../libi2pd/TunnelPool.cpp \
../../libi2pd/util.cpp \
../../libi2pd_client/AddressBook.cpp \
../../libi2pd_client/BOB.cpp \
../../libi2pd_client/ClientContext.cpp \
../../libi2pd_client/HTTPProxy.cpp \
../../libi2pd_client/I2CP.cpp \
../../libi2pd_client/I2PService.cpp \
../../libi2pd_client/I2PTunnel.cpp \
../../libi2pd_client/MatchedDestination.cpp \
../../libi2pd_client/SAM.cpp \
../../libi2pd_client/SOCKS.cpp \
../../libi2pd_client/Websocket.cpp \
../../libi2pd_client/WebSocks.cpp \
ClientTunnelPane.cpp \
MainWindowItems.cpp \
ServerTunnelPane.cpp \
SignatureTypeComboboxFactory.cpp \
TunnelConfig.cpp \
TunnelPane.cpp \
../../daemon/Daemon.cpp \
../../daemon/HTTPServer.cpp \
../../daemon/i2pd.cpp \
../../daemon/I2PControl.cpp \
../../daemon/UnixDaemon.cpp \
../../daemon/UPnP.cpp
#qt creator does not handle this well
#SOURCES += $$files(../../libi2pd/*.cpp)
#SOURCES += $$files(../../libi2pd_client/*.cpp)
#SOURCES += $$files(../../daemon/*.cpp)
#SOURCES += $$files(./*.cpp)
SOURCES -= ../../daemon/UnixDaemon.cpp
HEADERS += DaemonQT.h mainwindow.h
# ../../HTTPServer.h ../../I2PControl.h ../../UPnP.h ../../Daemon.h ../../Config.h \
# ../../AddressBook.h ../../api.h ../../Base.h ../../BOB.h ../../ClientContext.h \
# ../../Crypto.h ../../Datagram.h ../../Destination.h ../../Family.h ../../FS.h \
# ../../Garlic.h ../../HTTP.h ../../HTTPProxy.h ../../I2CP.h ../../I2NPProtocol.h \
# ../../I2PEndian.h ../../I2PService.h ../../I2PTunnel.h ../../Identity.h ../../LeaseSet.h \
# ../../LittleBigEndian.h ../../Log.h ../../NetDb.h ../../NetDbRequests.h ../../NTCPSession.h \
# ../../Profiling.h ../../Queue.h ../../Reseed.h ../../RouterContext.h ../../RouterInfo.h \
# ../../SAM.h ../../Signature.h ../../SOCKS.h ../../SSU.h ../../SSUData.h ../../SSUSession.h \
# ../../Streaming.h ../../Timestamp.h ../../TransitTunnel.h ../../Transports.h \
# ../../TransportSession.h ../../Tunnel.h ../../TunnelBase.h ../../TunnelConfig.h \
# ../../TunnelEndpoint.h ../../TunnelGateway.h ../../TunnelPool.h ../../UPnP.h \
# ../../util.h ../../version.h ../../Gzip.h ../../Tag.h \
# ../../BloomFiler.h ../../Event.h ../../Gost.h ../../MatchedDestination.h
HEADERS += DaemonQT.h mainwindow.h \
../../libi2pd/api.h \
../../libi2pd/Base.h \
../../libi2pd/BloomFilter.h \
../../libi2pd/Config.h \
../../libi2pd/Crypto.h \
../../libi2pd/Datagram.h \
../../libi2pd/Destination.h \
../../libi2pd/Event.h \
../../libi2pd/Family.h \
../../libi2pd/FS.h \
../../libi2pd/Garlic.h \
../../libi2pd/Gost.h \
../../libi2pd/Gzip.h \
../../libi2pd/HTTP.h \
../../libi2pd/I2NPProtocol.h \
../../libi2pd/I2PEndian.h \
../../libi2pd/Identity.h \
../../libi2pd/LeaseSet.h \
../../libi2pd/LittleBigEndian.h \
../../libi2pd/Log.h \
../../libi2pd/NetDb.hpp \
../../libi2pd/NetDbRequests.h \
../../libi2pd/NTCPSession.h \
../../libi2pd/Profiling.h \
../../libi2pd/Queue.h \
../../libi2pd/Reseed.h \
../../libi2pd/RouterContext.h \
../../libi2pd/RouterInfo.h \
../../libi2pd/Signature.h \
../../libi2pd/SSU.h \
../../libi2pd/SSUData.h \
../../libi2pd/SSUSession.h \
../../libi2pd/Streaming.h \
../../libi2pd/Tag.h \
../../libi2pd/Timestamp.h \
../../libi2pd/TransitTunnel.h \
../../libi2pd/Transports.h \
../../libi2pd/TransportSession.h \
../../libi2pd/Tunnel.h \
../../libi2pd/TunnelBase.h \
../../libi2pd/TunnelConfig.h \
../../libi2pd/TunnelEndpoint.h \
../../libi2pd/TunnelGateway.h \
../../libi2pd/TunnelPool.h \
../../libi2pd/util.h \
../../libi2pd/version.h \
../../libi2pd_client/AddressBook.h \
../../libi2pd_client/BOB.h \
../../libi2pd_client/ClientContext.h \
../../libi2pd_client/HTTPProxy.h \
../../libi2pd_client/I2CP.h \
../../libi2pd_client/I2PService.h \
../../libi2pd_client/I2PTunnel.h \
../../libi2pd_client/MatchedDestination.h \
../../libi2pd_client/SAM.h \
../../libi2pd_client/SOCKS.h \
../../libi2pd_client/Websocket.h \
../../libi2pd_client/WebSocks.h \
ClientTunnelPane.h \
MainWindowItems.h \
ServerTunnelPane.h \
SignatureTypeComboboxFactory.h \
TunnelConfig.h \
TunnelPane.h \
TunnelsPageUpdateListener.h \
../../daemon/Daemon.h \
../../daemon/HTTPServer.h \
../../daemon/I2PControl.h \
../../daemon/UPnP.h
INCLUDEPATH += ../../libi2pd
INCLUDEPATH += ../../libi2pd_client

8
qt/i2pd_qt/mainwindow.cpp

@ -4,10 +4,10 @@ @@ -4,10 +4,10 @@
#include <QTimer>
#include <QFile>
#include <QFileDialog>
#include "../../RouterContext.h"
#include "../../Config.h"
#include "../../FS.h"
#include "../../Log.h"
#include "RouterContext.h"
#include "Config.h"
#include "FS.h"
#include "Log.h"
#ifndef ANDROID
# include <QtDebug>

4
qt/i2pd_qt/mainwindow.h

@ -41,8 +41,8 @@ @@ -41,8 +41,8 @@
#include "ClientTunnelPane.h"
#include "TunnelConfig.h"
#include "../../Config.h"
#include "../../FS.h"
#include "Config.h"
#include "FS.h"
#include <QDebug>

Loading…
Cancel
Save