diff --git a/README.md b/README.md index 884e2205a..4d5f993c1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Amnezia VPN ## _The best client for self-hosted VPN_ -[![Build Status](https://travis-ci.com/amnezia-vpn/desktop-client.svg?branch=master)](https://travis-ci.com/amnezia-vpn/desktop-client) +[![Build Status](https://github.com/amnezia-vpn/desktop-client/actions/workflows/deploy.yml/badge.svg?branch=dev)] Amnezia is a VPN client with the key feature of deploying your own VPN server on you virtual server. diff --git a/client/vpnconnection.cpp b/client/vpnconnection.cpp index 6a981f0c9..286ffc8c6 100644 --- a/client/vpnconnection.cpp +++ b/client/vpnconnection.cpp @@ -105,13 +105,11 @@ void VpnConnection::onConnectionStateChanged(VpnProtocol::VpnConnectionState sta #endif #ifdef Q_OS_IOS - - qDebug() << state; - if(state == VpnProtocol::Connected){ + if (state == VpnProtocol::Connected){ m_isIOSConnected = true; checkIOSStatus(); - }else{ - + } + else { m_isIOSConnected = false; m_receivedBytes = 0; m_sentBytes = 0; @@ -120,17 +118,17 @@ void VpnConnection::onConnectionStateChanged(VpnProtocol::VpnConnectionState sta emit connectionStateChanged(state); } +#ifdef Q_OS_IOS void VpnConnection::checkIOSStatus() { QTimer::singleShot(1000, [this]() { - if(m_isIOSConnected){ iosVpnProtocol->checkStatus(); checkIOSStatus(); } - } ); } +#endif const QString &VpnConnection::remoteAddress() const { diff --git a/client/vpnconnection.h b/client/vpnconnection.h index 28c8ef0be..c8ebdfad0 100644 --- a/client/vpnconnection.h +++ b/client/vpnconnection.h @@ -9,7 +9,10 @@ #include "protocols/vpnprotocol.h" #include "core/defs.h" #include "settings.h" + +#ifdef Q_OS_IOS #include "protocols/ios_vpnprotocol.h" +#endif #ifdef AMNEZIA_DESKTOP #include "core/ipcclient.h" @@ -74,7 +77,10 @@ signals: protected slots: void onBytesChanged(quint64 receivedBytes, quint64 sentBytes); void onConnectionStateChanged(VpnProtocol::VpnConnectionState state); + +#ifdef Q_OS_IOS void checkIOSStatus(); +#endif protected: QSharedPointer m_vpnProtocol;