From 948ab4cf718b25a66732a7fbdf9e31a4ad895e61 Mon Sep 17 00:00:00 2001 From: Mykola Baibuz Date: Fri, 30 Aug 2024 22:10:39 +0300 Subject: [PATCH] Set local IPSec VPN address --- client/protocols/ikev2_vpn_protocol_linux.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/protocols/ikev2_vpn_protocol_linux.cpp b/client/protocols/ikev2_vpn_protocol_linux.cpp index 2fc85150..7c6904c2 100644 --- a/client/protocols/ikev2_vpn_protocol_linux.cpp +++ b/client/protocols/ikev2_vpn_protocol_linux.cpp @@ -107,8 +107,10 @@ ErrorCode Ikev2Protocol::start() m_routeGateway = iter->split("===", Qt::SkipEmptyParts).first(); m_routeGateway = m_routeGateway.split(" ").at(2); m_routeGateway = m_routeGateway.split("/").first(); + m_vpnLocalAddress = m_routeGateway; qDebug() << "m_routeGateway " << m_routeGateway; + // killSwitch toggle if (QVariant(m_config.value(config_key::killSwitchOption).toString()).toBool()) { IpcClient::Interface()->enableKillSwitch(m_config, 0); @@ -145,7 +147,6 @@ bool Ikev2Protocol::delete_vpn_connection(const QString &vpn_name) { //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bool Ikev2Protocol::connect_to_vpn(const QString &vpn_name) { IpcClient::Interface()->startIPsec(vpn_name); - QThread::msleep(3000); return true; }