Merge branch 'feature/android_qt6_moving' into feature/android_bandwidth_counter
# Conflicts: # client/platforms/android/android_controller.cpp # client/platforms/android/android_controller.h
This commit is contained in:
commit
39736e865e
255 changed files with 4322 additions and 7218 deletions
|
|
@ -1,9 +1,3 @@
|
|||
#include <QAndroidBinder>
|
||||
#include <QAndroidIntent>
|
||||
#include <QAndroidJniEnvironment>
|
||||
#include <QAndroidJniObject>
|
||||
#include <QAndroidParcel>
|
||||
#include <QAndroidServiceConnection>
|
||||
#include <QDebug>
|
||||
#include <QHostAddress>
|
||||
#include <QJsonArray>
|
||||
|
|
@ -12,10 +6,8 @@
|
|||
#include <QRandomGenerator>
|
||||
#include <QTextCodec>
|
||||
#include <QTimer>
|
||||
#include <QtAndroid>
|
||||
|
||||
#include "android_vpnprotocol.h"
|
||||
#include "core/errorstrings.h"
|
||||
|
||||
#include "platforms/android/android_controller.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,11 @@
|
|||
#ifndef ANDROID_VPNPROTOCOL_H
|
||||
#define ANDROID_VPNPROTOCOL_H
|
||||
|
||||
#include <QAndroidBinder>
|
||||
#include <QAndroidServiceConnection>
|
||||
|
||||
#include "vpnprotocol.h"
|
||||
#include "protocols/protocols_defs.h"
|
||||
|
||||
using namespace amnezia;
|
||||
|
||||
|
||||
|
||||
class AndroidVpnProtocol : public VpnProtocol
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -35,7 +30,6 @@ protected:
|
|||
|
||||
private:
|
||||
Proto m_protocol;
|
||||
|
||||
};
|
||||
|
||||
#endif // ANDROID_VPNPROTOCOL_H
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "debug.h"
|
||||
#include "ikev2_vpn_protocol_windows.h"
|
||||
#include "utils.h"
|
||||
#include "utilities.h"
|
||||
|
||||
static Ikev2Protocol* self = nullptr;
|
||||
static std::mutex rasDialFuncMutex;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef IOS_VPNPROTOCOL_H
|
||||
#define IOS_VPNPROTOCOL_H
|
||||
|
||||
#include "platforms/ios/json.h"
|
||||
#include "vpnprotocol.h"
|
||||
#include "protocols/protocols_defs.h"
|
||||
#include "json.h"
|
||||
|
||||
using namespace amnezia;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,12 @@
|
|||
|
||||
#include <QByteArray>
|
||||
|
||||
#include "ipaddressrange.h"
|
||||
#include "platforms/ios/ipaddressrange.h"
|
||||
#include "ios_vpnprotocol.h"
|
||||
#include "core/errorstrings.h"
|
||||
#include "AmneziaVPN-Swift.h"
|
||||
#include "UIKit/UIKit.h"
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "openvpnovercloakprotocol.h"
|
||||
|
||||
#include "utils.h"
|
||||
#include "utilities.h"
|
||||
#include "containers/containers_defs.h"
|
||||
|
||||
#include <QCryptographicHash>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "debug.h"
|
||||
#include "defines.h"
|
||||
#include "utils.h"
|
||||
#include "utilities.h"
|
||||
#include "openvpnprotocol.h"
|
||||
|
||||
|
||||
|
|
@ -141,9 +141,9 @@ uint OpenVpnProtocol::selectMgmtPort()
|
|||
void OpenVpnProtocol::updateRouteGateway(QString line)
|
||||
{
|
||||
// TODO: fix for macos
|
||||
line = line.split("ROUTE_GATEWAY", QString::SkipEmptyParts).at(1);
|
||||
line = line.split("ROUTE_GATEWAY", Qt::SkipEmptyParts).at(1);
|
||||
if (!line.contains("/")) return;
|
||||
m_routeGateway = line.split("/", QString::SkipEmptyParts).first();
|
||||
m_routeGateway = line.split("/", Qt::SkipEmptyParts).first();
|
||||
m_routeGateway.replace(" ", "");
|
||||
qDebug() << "Set VPN route gateway" << m_routeGateway;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,12 @@ constexpr char additional_server_config[] = "additional_server_config";
|
|||
|
||||
// proto config keys
|
||||
constexpr char last_config[] = "last_config";
|
||||
|
||||
constexpr char isThirdPartyConfig[] = "isThirdPartyConfig";
|
||||
|
||||
constexpr char openvpn[] = "openvpn";
|
||||
constexpr char wireguard[] = "wireguard";
|
||||
|
||||
}
|
||||
|
||||
namespace protocols {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "shadowsocksvpnprotocol.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "utils.h"
|
||||
#include "utilities.h"
|
||||
#include "containers/containers_defs.h"
|
||||
|
||||
#include <QCryptographicHash>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@ VpnProtocol::VpnConnectionState VpnProtocol::connectionState() const
|
|||
|
||||
void VpnProtocol::setBytesChanged(quint64 receivedBytes, quint64 sentBytes)
|
||||
{
|
||||
emit bytesChanged(receivedBytes - m_receivedBytes, sentBytes - m_sentBytes);
|
||||
quint64 rxDiff = receivedBytes - m_receivedBytes;
|
||||
quint64 txDiff = sentBytes - m_sentBytes;
|
||||
|
||||
emit bytesChanged(rxDiff, txDiff);
|
||||
|
||||
m_receivedBytes = receivedBytes;
|
||||
m_sentBytes = sentBytes;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "debug.h"
|
||||
#include "wireguardprotocol.h"
|
||||
#include "utils.h"
|
||||
#include "utilities.h"
|
||||
|
||||
WireguardProtocol::WireguardProtocol(const QJsonObject &configuration, QObject* parent) :
|
||||
VpnProtocol(configuration, parent)
|
||||
|
|
@ -98,9 +98,9 @@ QString WireguardProtocol::configPath() const
|
|||
void WireguardProtocol::updateRouteGateway(QString line)
|
||||
{
|
||||
// TODO: fix for macos
|
||||
line = line.split("ROUTE_GATEWAY", QString::SkipEmptyParts).at(1);
|
||||
line = line.split("ROUTE_GATEWAY", Qt::SkipEmptyParts).at(1);
|
||||
if (!line.contains("/")) return;
|
||||
m_routeGateway = line.split("/", QString::SkipEmptyParts).first();
|
||||
m_routeGateway = line.split("/", Qt::SkipEmptyParts).first();
|
||||
m_routeGateway.replace(" ", "");
|
||||
qDebug() << "Set VPN route gateway" << m_routeGateway;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue