refactor: move routing/KS/DNS lifecycle from Daemon to TrafficGuard

This commit is contained in:
cd-amn
2026-05-19 12:25:22 +00:00
parent ce05b4e99c
commit 9b329ad5b1
20 changed files with 319 additions and 227 deletions
+10 -4
View File
@@ -56,14 +56,20 @@ LocalServer::LocalServer(QObject *parent) : QObject(parent),
#ifdef Q_OS_LINUX
// Signal handling for a proper shutdown.
QObject::connect(qApp, &QCoreApplication::aboutToQuit,
[]() { LinuxDaemon::instance()->deactivate(); });
QObject::connect(qApp, &QCoreApplication::aboutToQuit, [this]() {
LinuxDaemon::instance()->deactivate();
m_ipcServer.restoreTunnelResolvers();
m_ipcServer.disableKillSwitch();
});
#endif
#ifdef Q_OS_MAC
// Signal handling for a proper shutdown.
QObject::connect(qApp, &QCoreApplication::aboutToQuit,
[]() { MacOSDaemon::instance()->deactivate(); });
QObject::connect(qApp, &QCoreApplication::aboutToQuit, [this]() {
MacOSDaemon::instance()->deactivate();
m_ipcServer.restoreTunnelResolvers();
m_ipcServer.disableKillSwitch();
});
#endif
#ifdef Q_OS_WIN