WireGuard rework for Linux

This commit is contained in:
Mykola Baibuz 2023-09-17 17:06:24 -04:00
parent f62076d3fd
commit 279692afea
30 changed files with 2319 additions and 36 deletions

View file

@ -40,12 +40,16 @@ LocalServer::LocalServer(QObject *parent) : QObject(parent),
}
});
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
// Init Mozilla Wireguard Daemon
if (!server.initialize()) {
logger.error() << "Failed to initialize the server";
return;
}
#ifdef Q_OS_LINUX
// Signal handling for a proper shutdown.
QObject::connect(qApp, &QCoreApplication::aboutToQuit,
[]() { LinuxDaemon::instance()->deactivate(); });
#endif
#ifdef Q_OS_MAC