Restart IPSec service before VPN connect
This commit is contained in:
parent
ad61ef0b22
commit
3cec0dc2a7
2 changed files with 5 additions and 6 deletions
|
|
@ -45,7 +45,6 @@ void Ikev2Protocol::stop()
|
|||
qDebug() << "IpsecProtocol::stop()";
|
||||
}
|
||||
|
||||
|
||||
void Ikev2Protocol::readIkev2Configuration(const QJsonObject &configuration)
|
||||
{
|
||||
QJsonObject ikev2_data = configuration.value(ProtocolProps::key_proto_config_data(Proto::Ikev2)).toObject();
|
||||
|
|
@ -89,12 +88,12 @@ ErrorCode Ikev2Protocol::start()
|
|||
}
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
bool Ikev2Protocol::create_new_vpn(const QString & vpn_name,
|
||||
const QString & serv_addr){
|
||||
const QString & serv_addr) {
|
||||
qDebug() << "Ikev2Protocol::create_new_vpn()";
|
||||
return true;
|
||||
}
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
bool Ikev2Protocol::delete_vpn_connection(const QString &vpn_name){
|
||||
bool Ikev2Protocol::delete_vpn_connection(const QString &vpn_name) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ bool IpcServer::disableKillSwitch()
|
|||
bool IpcServer::startIPsec(QString tunnelName)
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
/* QProcess processSystemd;
|
||||
QProcess processSystemd;
|
||||
QStringList commandsSystemd;
|
||||
commandsSystemd << "systemctl" << "restart" << "ipsec";
|
||||
processSystemd.start("sudo", commandsSystemd);
|
||||
|
|
@ -327,8 +327,8 @@ bool IpcServer::startIPsec(QString tunnelName)
|
|||
}
|
||||
commandsSystemd.clear();
|
||||
|
||||
QThread::msleep(2000);
|
||||
*/
|
||||
QThread::msleep(5000);
|
||||
|
||||
QProcess process;
|
||||
QStringList commands;
|
||||
commands << "ipsec" << "up" << QString("%1").arg(tunnelName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue