mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
38 lines
925 B
C++
38 lines
925 B
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef LINUXDAEMON_H
|
|
#define LINUXDAEMON_H
|
|
|
|
|
|
#include "daemon/daemon.h"
|
|
#include "dnsutilslinux.h"
|
|
#include "iputilslinux.h"
|
|
#include "wireguardutilslinux.h"
|
|
|
|
class LinuxDaemon final : public Daemon {
|
|
public:
|
|
LinuxDaemon();
|
|
~LinuxDaemon();
|
|
|
|
static LinuxDaemon* instance();
|
|
|
|
bool deactivate(bool emitSignals = true) override;
|
|
|
|
protected:
|
|
DnsUtils* dnsutils() override { return m_dnsutils; }
|
|
bool supportIPUtils() const override { return true; }
|
|
IPUtils* iputils() override { return m_iputils; }
|
|
|
|
WireguardUtils* createWgUtils() override {
|
|
return new WireguardUtilsLinux(this);
|
|
}
|
|
|
|
private:
|
|
DnsUtilsLinux* m_dnsutils = nullptr;
|
|
IPUtilsLinux* m_iputils = nullptr;
|
|
};
|
|
|
|
#endif // LINUXDAEMON_H
|