mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
feat: awg connection states (#2091)
* Submodule amneziawg-apple updated * feat: add support for controlled junk and special handshake timeout in AWG configurator * refactor: improve AWG configurator and iOS controller logic * awg_configurator.cpp reverted
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <QVariantMap>
|
||||
#include <QStringList>
|
||||
#include <QList>
|
||||
#include <QElapsedTimer>
|
||||
#include <atomic>
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/Foundation.h>
|
||||
@@ -103,6 +105,7 @@ private:
|
||||
bool startXray(const QString &jsonConfig);
|
||||
|
||||
void startTunnel();
|
||||
void emitConnectionStateIfChanged(Vpn::ConnectionState state);
|
||||
|
||||
private:
|
||||
void *m_iosControllerWrapper {};
|
||||
@@ -116,8 +119,13 @@ private:
|
||||
amnezia::Proto m_proto;
|
||||
QJsonObject m_rawConfig;
|
||||
QString m_tunnelId;
|
||||
uint64_t m_txBytes;
|
||||
uint64_t m_rxBytes;
|
||||
uint64_t m_txBytes = 0;
|
||||
uint64_t m_rxBytes = 0;
|
||||
bool m_handshakeAwaiting = false;
|
||||
bool m_handshakeConfirmed = false;
|
||||
QElapsedTimer m_handshakeTimer;
|
||||
Vpn::ConnectionState m_lastEmittedState = Vpn::ConnectionState::Unknown;
|
||||
std::atomic_bool m_statusRequestInFlight { false };
|
||||
};
|
||||
|
||||
#endif // IOS_CONTROLLER_H
|
||||
|
||||
Reference in New Issue
Block a user