Update versioning and minor fixes
parent
1c1231a926
commit
45b1d4400f
|
|
@ -33,6 +33,7 @@
|
|||
#include <QCommandLineOption>
|
||||
|
||||
#include "proxyclient.h"
|
||||
#include "../version.h"
|
||||
|
||||
static QHash<QString, bool> s_loggingFilters;
|
||||
static const char *const normal = "\033[0m";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Source: nymea-remoteproxy
|
||||
Section: utils
|
||||
Priority: options
|
||||
Maintainer: Simon Stürz <simon.stuerz@nymea.io>
|
||||
Maintainer: nymea GmbH <developer@nymea.io>
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: https://nymea.io
|
||||
Vcs-Git: https://github.com/nymea/nymea-remoteproxy.git
|
||||
|
|
@ -16,6 +16,8 @@ Build-depends: debhelper (>= 9.0.0),
|
|||
|
||||
Package: nymea-remoteproxy
|
||||
Architecture: any
|
||||
Section: net
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
awscli,
|
||||
|
|
@ -28,6 +30,7 @@ Description: The nymea remote proxy server
|
|||
Package: libnymea-remoteproxy
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy server lib
|
||||
|
|
@ -48,7 +51,8 @@ Description: The nymea remote proxy server lib - development files
|
|||
|
||||
Package: nymea-remoteproxy-client
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Section: utils
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy client for testing
|
||||
|
|
@ -57,7 +61,8 @@ Description: The nymea remote proxy client for testing
|
|||
|
||||
Package: nymea-remoteproxy-tunnelclient
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Section: utils
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy tunnel client for testing
|
||||
|
|
@ -67,6 +72,7 @@ Description: The nymea remote proxy tunnel client for testing
|
|||
Package: libnymea-remoteproxyclient
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Multi-Arch: same
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
Description: The nymea remote proxy server client lib
|
||||
|
|
@ -87,6 +93,8 @@ Description: The nymea remote proxy server client lib - development files
|
|||
|
||||
Package: nymea-remoteproxy-tests
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Section: devel
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
libnymea-remoteproxy (= ${binary:Version}),
|
||||
|
|
@ -96,8 +104,9 @@ Description: The nymea remote proxy server tests
|
|||
|
||||
Package: nymea-remoteproxy-monitor
|
||||
Architecture: any
|
||||
Multi-Arch: same
|
||||
Section: utils
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
libncurses5,
|
||||
Description: The nymea remote proxy monitor tool
|
||||
The nymea remote proxy server monitor
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: nymea-remoteproxy
|
||||
Upstream-Contact: Simon Stürz <simon.stuerz@nymea.io>
|
||||
Copyright: 2018 - 2021, nymea GmbH
|
||||
Copyright: 2018 - 2022, nymea GmbH
|
||||
Download: http://www.github.com/nymea/nymea-remoteproxy
|
||||
Source: https://github.com/nymea/nymea-remoteproxy.git
|
||||
|
||||
|
|
@ -16,24 +16,24 @@ License: LGPL-3
|
|||
|
||||
Files: libnymea-remoteproxyclient/*
|
||||
License: LGPL-3
|
||||
Copyright: 2018 - 2021, nymea GmbH <contact@nymea.io>
|
||||
Copyright: 2018 - 2022, nymea GmbH <developer@nymea.io>
|
||||
|
||||
Files: libnymea-remoteproxy/*
|
||||
License: GPL-3
|
||||
Copyright: 2018 - 2021, nymea GmbH <contact@nymea.io>
|
||||
Copyright: 2018 - 2022, nymea GmbH <developer@nymea.io>
|
||||
|
||||
Files: client/*
|
||||
License: GPL-3
|
||||
Copyright: 2018 - 2021, nymea GmbH <contact@nymea.io>
|
||||
Copyright: 2018 - 2022, nymea GmbH <developer@nymea.io>
|
||||
|
||||
Files: monitor/*
|
||||
License: GPL-3
|
||||
Copyright: 2018 - 2021, nymea GmbH <contact@nymea.io>
|
||||
Copyright: 2018 - 2022, nymea GmbH <developer@nymea.io>
|
||||
|
||||
Files: server/*
|
||||
License: GPL-3
|
||||
Copyright: 2018 - 2021, nymea GmbH <contact@nymea.io>
|
||||
Copyright: 2018 - 2022, nymea GmbH <developer@nymea.io>
|
||||
|
||||
Files: tests/*
|
||||
License: GPL-3
|
||||
Copyright: 2018 - 2021, nymea GmbH <contact@nymea.io>
|
||||
Copyright: 2018 - 2022, nymea GmbH <developer@nymea.io>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "engine.h"
|
||||
#include "loggingcategories.h"
|
||||
#include "../version.h"
|
||||
|
||||
namespace remoteproxy {
|
||||
|
||||
|
|
@ -327,7 +328,6 @@ void Engine::clean()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void Engine::setRunning(bool running)
|
||||
{
|
||||
if (m_running == running)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "jsonrpc/jsontypes.h"
|
||||
#include "transportclient.h"
|
||||
#include "../common/slipdataprocessor.h"
|
||||
#include "../version.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonParseError>
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ bool TcpSocketServer::startServer()
|
|||
}
|
||||
|
||||
connect(m_server, &SslServer::clientConnected, this, &TcpSocketServer::onClientConnected);
|
||||
connect(m_server, SIGNAL(clientDisconnected(QSslSocket*)), SLOT(onClientDisconnected(QSslSocket*)));
|
||||
connect(m_server, &SslServer::clientDisconnected, this, &TcpSocketServer::onClientDisconnected);
|
||||
connect(m_server, &SslServer::dataAvailable, this, &TcpSocketServer::onDataAvailable);
|
||||
qCDebug(dcTcpSocketServer()) << "Server started successfully.";
|
||||
return true;
|
||||
|
|
@ -152,7 +152,9 @@ void SslServer::incomingConnection(qintptr socketDescriptor)
|
|||
qCDebug(dcTcpSocketServer()) << "Incomming connection" << sslSocket;
|
||||
connect(sslSocket, &QSslSocket::readyRead, this, &SslServer::onSocketReadyRead);
|
||||
connect(sslSocket, &QSslSocket::disconnected, this, &SslServer::onClientDisconnected);
|
||||
connect(sslSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(onSocketError(QAbstractSocket::SocketError)));
|
||||
|
||||
typedef void (QAbstractSocket:: *errorSignal)(QAbstractSocket::SocketError);
|
||||
connect(sslSocket, static_cast<errorSignal>(&QAbstractSocket::error), this, &SslServer::onSocketError);
|
||||
connect(sslSocket, &QSslSocket::encrypted, this, [this, sslSocket](){
|
||||
qCDebug(dcTcpSocketServer()) << "SSL encryption established for" << sslSocket;
|
||||
emit clientConnected(sslSocket);
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ quint64 TransportClient::rxDataCount() const
|
|||
|
||||
void TransportClient::addRxDataCount(int dataCount)
|
||||
{
|
||||
m_rxDataCount += static_cast<quint64>(dataCount);
|
||||
m_rxDataCount += dataCount;
|
||||
}
|
||||
|
||||
quint64 TransportClient::txDataCount() const
|
||||
|
|
@ -139,7 +139,7 @@ quint64 TransportClient::txDataCount() const
|
|||
|
||||
void TransportClient::addTxDataCount(int dataCount)
|
||||
{
|
||||
m_txDataCount += static_cast<quint64>(dataCount);
|
||||
m_txDataCount += dataCount;
|
||||
}
|
||||
|
||||
int TransportClient::bufferSize() const
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ protected:
|
|||
// Json data information
|
||||
int m_messageId = 0;
|
||||
|
||||
private:
|
||||
// Statistics info
|
||||
quint64 m_rxDataCount = 0;
|
||||
quint64 m_txDataCount = 0;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ void TunnelProxyClient::setType(Type type)
|
|||
|
||||
QList<QByteArray> TunnelProxyClient::processData(const QByteArray &data)
|
||||
{
|
||||
// TODO: unescape if this data is for the json handler
|
||||
QList<QByteArray> packages;
|
||||
|
||||
// Parse packages depending on the encoded
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ TcpSocketConnection::TcpSocketConnection(QObject *parent) :
|
|||
{
|
||||
m_tcpSocket = new QSslSocket(this);
|
||||
|
||||
QObject::connect(m_tcpSocket, &QSslSocket::connected, this, [=](){ qCDebug(dcRemoteProxyClientTcpSocket()) << "Connected!!!!"; });
|
||||
QObject::connect(m_tcpSocket, &QSslSocket::disconnected, this, &TcpSocketConnection::onDisconnected);
|
||||
QObject::connect(m_tcpSocket, &QSslSocket::encrypted, this, &TcpSocketConnection::onEncrypted);
|
||||
QObject::connect(m_tcpSocket, &QSslSocket::readyRead, this, &TcpSocketConnection::onReadyRead);
|
||||
|
|
@ -47,10 +46,6 @@ TcpSocketConnection::TcpSocketConnection(QObject *parent) :
|
|||
|
||||
typedef void (QSslSocket:: *sslErrorsSignal)(const QList<QSslError> &);
|
||||
QObject::connect(m_tcpSocket, static_cast<sslErrorsSignal>(&QSslSocket::sslErrors), this, &TcpSocketConnection::sslErrors);
|
||||
|
||||
// QObject::connect(m_tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(onError(QAbstractSocket::SocketError)));
|
||||
// QObject::connect(m_tcpSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SIGNAL(sslErrors(QList<QSslError>)));
|
||||
|
||||
}
|
||||
|
||||
TcpSocketConnection::~TcpSocketConnection()
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ private:
|
|||
|
||||
ProxyConnection *m_connection = nullptr;
|
||||
TunnelProxySocketServer *m_socketServer = nullptr;
|
||||
bool m_connected = true; // Note: on creatrion, the socket is connected, otherwise it would not have been created
|
||||
bool m_connected = true; // Note: on creation, the socket is connected, otherwise it would not have been created
|
||||
|
||||
QString m_clientName;
|
||||
QUuid m_clientUuid;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <QCommandLineOption>
|
||||
|
||||
#include "monitor.h"
|
||||
#include "../version.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
QT *= network websockets
|
||||
QT -= gui
|
||||
|
||||
# Define versions
|
||||
SERVER_NAME=nymea-remoteproxy
|
||||
API_VERSION_MAJOR=0
|
||||
API_VERSION_MINOR=5
|
||||
SERVER_VERSION=0.2.1
|
||||
|
||||
DEFINES += SERVER_NAME_STRING=\\\"$${SERVER_NAME}\\\" \
|
||||
SERVER_VERSION_STRING=\\\"$${SERVER_VERSION}\\\" \
|
||||
API_VERSION_STRING=\\\"$${API_VERSION_MAJOR}.$${API_VERSION_MINOR}\\\"
|
||||
|
||||
CONFIG += c++11 console
|
||||
|
||||
QMAKE_CXXFLAGS *= -Werror -std=c++11 -g -Wno-deprecated-declarations
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
include(nymea-remoteproxy.pri)
|
||||
|
||||
# Define versions
|
||||
SERVER_NAME=nymea-remoteproxy
|
||||
API_VERSION_MAJOR=0
|
||||
API_VERSION_MINOR=5
|
||||
|
||||
# Parse and export SERVER_VERSION
|
||||
SERVER_VERSION=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
||||
|
||||
QMAKE_SUBSTITUTES += version.h.in
|
||||
|
||||
TEMPLATE=subdirs
|
||||
SUBDIRS += server client tunnelclient libnymea-remoteproxy libnymea-remoteproxyclient
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@
|
|||
#include "authentication/aws/awsauthenticator.h"
|
||||
#include "authentication/dummy/dummyauthenticator.h"
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
using namespace remoteproxy;
|
||||
|
||||
static QHash<QString, bool> s_loggingFilters;
|
||||
|
|
@ -65,7 +67,7 @@ static const char *const error = "\e[31m";
|
|||
static void consoleLogHandler(QtMsgType type, const QMessageLogContext& context, const QString& message)
|
||||
{
|
||||
QString messageString;
|
||||
QString timeString = QDateTime::currentDateTimeUtc().toString("yyyy.MM.dd hh:mm:ss.zzz");
|
||||
QString timeString = QDateTime::currentDateTime().toString("yyyy.MM.dd hh:mm:ss.zzz");
|
||||
switch (type) {
|
||||
case QtInfoMsg:
|
||||
messageString = QString(" I %1 | %2: %3").arg(timeString).arg(context.category).arg(message);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "engine.h"
|
||||
#include "loggingcategories.h"
|
||||
#include "remoteproxyconnection.h"
|
||||
#include "../../version.h"
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QSignalSpy>
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "loggingcategories.h"
|
||||
#include "remoteproxyconnection.h"
|
||||
#include "../common/slipdataprocessor.h"
|
||||
#include "../../version.h"
|
||||
|
||||
// Client
|
||||
#include "tunnelproxy/tunnelproxysocketserver.h"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#include "serverconnection.h"
|
||||
#include "clientconnection.h"
|
||||
|
||||
#include "../version.h"
|
||||
|
||||
static QHash<QString, bool> s_loggingFilters;
|
||||
static const char *const normal = "\033[0m";
|
||||
static const char *const warning = "\e[33m";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Copyright 2013 - 2022, nymea GmbH
|
||||
* Contact: contact@nymea.io
|
||||
*
|
||||
* This file is part of nymea.
|
||||
* This project including source code and documentation is protected by
|
||||
* copyright law, and remains the property of nymea GmbH. All rights, including
|
||||
* reproduction, publication, editing and translation, are reserved. The use of
|
||||
* this project is subject to the terms of a license agreement to be concluded
|
||||
* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
|
||||
* under https://nymea.io/license
|
||||
*
|
||||
* GNU General Public License Usage
|
||||
* Alternatively, this project may be redistributed and/or modified under the
|
||||
* terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation, GNU version 3. This project is distributed in the hope that it
|
||||
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
* Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this project. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For any further details and any questions please contact us under
|
||||
* contact@nymea.io or see our FAQ/Licensing Information on
|
||||
* https://nymea.io/license/faq
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define SERVER_NAME_STRING '"$$SERVER_NAME"'
|
||||
#define SERVER_VERSION_STRING '"$$SERVER_VERSION"'
|
||||
#define API_VERSION_STRING '"$$API_VERSION_MAJOR.$$API_VERSION_MINOR"'
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue