Merge branch 'dev' into feature/linux-ipsec
This commit is contained in:
commit
dcde24649f
47 changed files with 6730 additions and 5386 deletions
|
|
@ -36,10 +36,6 @@ int IpcServer::createPrivilegedProcess()
|
|||
qDebug() << "IpcServer::createPrivilegedProcess";
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
WindowsFirewall::instance()->init();
|
||||
#endif
|
||||
|
||||
m_localpid++;
|
||||
|
||||
ProcessDescriptor pd(this);
|
||||
|
|
@ -197,7 +193,9 @@ void IpcServer::setLogsEnabled(bool enabled)
|
|||
bool IpcServer::enableKillSwitch(const QJsonObject &configStr, int vpnAdapterIndex)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
return WindowsFirewall::instance()->enableKillSwitch(vpnAdapterIndex);
|
||||
auto firewallManager = WindowsFirewall::create(this);
|
||||
Q_ASSERT(firewallManager != nullptr);
|
||||
return firewallManager->enableInterface(vpnAdapterIndex);
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_MACOS)
|
||||
|
|
@ -285,7 +283,9 @@ bool IpcServer::enableKillSwitch(const QJsonObject &configStr, int vpnAdapterInd
|
|||
bool IpcServer::disableKillSwitch()
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
return WindowsFirewall::instance()->disableKillSwitch();
|
||||
auto firewallManager = WindowsFirewall::create(this);
|
||||
Q_ASSERT(firewallManager != nullptr);
|
||||
return firewallManager->disableKillSwitch();
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
|
|
@ -540,7 +540,9 @@ bool IpcServer::enablePeerTraffic(const QJsonObject &configStr)
|
|||
|
||||
// killSwitch toggle
|
||||
if (QVariant(configStr.value(amnezia::config_key::killSwitchOption).toString()).toBool()) {
|
||||
WindowsFirewall::instance()->enablePeerTraffic(config);
|
||||
auto firewallManager = WindowsFirewall::create(this);
|
||||
Q_ASSERT(firewallManager != nullptr);
|
||||
firewallManager->enablePeerTraffic(config);
|
||||
}
|
||||
|
||||
WindowsDaemon::instance()->prepareActivation(config, inetAdapterIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue