WireGuard for MacOS (#248)
* WireGuard for MacOS * Fix openvpn block-outside-dns
This commit is contained in:
parent
ed5dc7cdfd
commit
35ecb8499d
118 changed files with 5150 additions and 3486 deletions
|
@ -8,11 +8,16 @@
|
|||
#include "utilities.h"
|
||||
|
||||
#include "router.h"
|
||||
#include "logger.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "tapcontroller_win.h"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
Logger logger("MacOSDaemonServer");
|
||||
}
|
||||
|
||||
LocalServer::LocalServer(QObject *parent) : QObject(parent),
|
||||
m_ipcServer(this)
|
||||
{
|
||||
|
@ -34,6 +39,18 @@ LocalServer::LocalServer(QObject *parent) : QObject(parent),
|
|||
m_serverNode.enableRemoting(&m_ipcServer);
|
||||
}
|
||||
});
|
||||
|
||||
// Init Mozilla Wireguard Daemon
|
||||
#ifdef Q_OS_MAC
|
||||
if (!server.initialize()) {
|
||||
logger.error() << "Failed to initialize the server";
|
||||
return;
|
||||
}
|
||||
|
||||
// Signal handling for a proper shutdown.
|
||||
QObject::connect(qApp, &QCoreApplication::aboutToQuit,
|
||||
[]() { MacOSDaemon::instance()->deactivate(); });
|
||||
#endif
|
||||
}
|
||||
|
||||
LocalServer::~LocalServer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue