X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.h;h=21a2c512a33043372bd29f3b8b7336b03839709a;hp=9a420af6d5a8e4da544819ba8a05a93bedf7042a;hb=c0d6dc0dec628f2e143e37ecc95cec45e636f8a5;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650 diff --git a/src/core/coreauthhandler.h b/src/core/coreauthhandler.h index 9a420af6..21a2c512 100644 --- a/src/core/coreauthhandler.h +++ b/src/core/coreauthhandler.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,11 +18,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef COREAUTHHANDLER_H -#define COREAUTHHANDLER_H +#pragma once #include "authhandler.h" +#include "metricsserver.h" #include "peerfactory.h" +#include "proxyline.h" #include "remotepeer.h" #include "types.h" @@ -31,7 +32,10 @@ class CoreAuthHandler : public AuthHandler Q_OBJECT public: - CoreAuthHandler(QTcpSocket* socket, QObject* parent = nullptr); + CoreAuthHandler(QSslSocket* socket, QObject* parent = nullptr); + + QHostAddress hostAddress() const; + bool isLocal() const override; signals: void handshakeComplete(RemotePeer* peer, UserId uid); @@ -51,21 +55,21 @@ private: private slots: void onReadyRead(); -#ifdef HAVE_SSL void onSslErrors(); -#endif // only in legacy mode void onProtocolVersionMismatch(int actual, int expected); private: RemotePeer* _peer; + MetricsServer* _metricsServer; + bool _proxyReceived; + ProxyLine _proxyLine; + bool _useProxyLine; bool _magicReceived; bool _legacy; bool _clientRegistered; quint8 _connectionFeatures; QVector _supportedProtos; }; - -#endif