Set local IPSec VPN address
This commit is contained in:
parent
f54308e4f4
commit
948ab4cf71
1 changed files with 2 additions and 1 deletions
|
|
@ -107,8 +107,10 @@ ErrorCode Ikev2Protocol::start()
|
||||||
m_routeGateway = iter->split("===", Qt::SkipEmptyParts).first();
|
m_routeGateway = iter->split("===", Qt::SkipEmptyParts).first();
|
||||||
m_routeGateway = m_routeGateway.split(" ").at(2);
|
m_routeGateway = m_routeGateway.split(" ").at(2);
|
||||||
m_routeGateway = m_routeGateway.split("/").first();
|
m_routeGateway = m_routeGateway.split("/").first();
|
||||||
|
m_vpnLocalAddress = m_routeGateway;
|
||||||
qDebug() << "m_routeGateway " << m_routeGateway;
|
qDebug() << "m_routeGateway " << m_routeGateway;
|
||||||
|
|
||||||
|
|
||||||
// killSwitch toggle
|
// killSwitch toggle
|
||||||
if (QVariant(m_config.value(config_key::killSwitchOption).toString()).toBool()) {
|
if (QVariant(m_config.value(config_key::killSwitchOption).toString()).toBool()) {
|
||||||
IpcClient::Interface()->enableKillSwitch(m_config, 0);
|
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) {
|
bool Ikev2Protocol::connect_to_vpn(const QString &vpn_name) {
|
||||||
IpcClient::Interface()->startIPsec(vpn_name);
|
IpcClient::Interface()->startIPsec(vpn_name);
|
||||||
|
|
||||||
QThread::msleep(3000);
|
QThread::msleep(3000);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue