mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
28 lines
596 B
C++
28 lines
596 B
C++
|
|
#ifndef KILLSWITCH_H
|
||
|
|
#define KILLSWITCH_H
|
||
|
|
|
||
|
|
#include <QJsonObject>
|
||
|
|
#include <QSharedPointer>
|
||
|
|
|
||
|
|
#include "secure_qsettings.h"
|
||
|
|
|
||
|
|
class KillSwitch : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
static KillSwitch *instance();
|
||
|
|
bool init();
|
||
|
|
bool disableKillSwitch();
|
||
|
|
bool disableAllTraffic();
|
||
|
|
bool enablePeerTraffic( const QJsonObject &configStr);
|
||
|
|
bool enableKillSwitch( const QJsonObject &excludeAddr, int vpnAdapterIndex);
|
||
|
|
bool isStrictKillSwitchEnabled();
|
||
|
|
|
||
|
|
private:
|
||
|
|
KillSwitch(QObject* parent) {};
|
||
|
|
QSharedPointer<SecureQSettings> m_appSettigns;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // KILLSWITCH_H
|