-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTailSettings.h
52 lines (36 loc) · 1.25 KB
/
TailSettings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Created by marcus on 2024-07-10.
//
#ifndef TAILSETTINGS_H
#define TAILSETTINGS_H
#include <QObject>
#include <QSettings>
class TailSettings : public QObject {
Q_OBJECT
public:
explicit TailSettings(QObject* parent = nullptr);
void save() { settings.sync(); }
[[nodiscard]] bool useTailscaleDns() const;
void useTailscaleDns(bool use);
[[nodiscard]] bool acceptRoutes() const;
void acceptRoutes(bool accept);
[[nodiscard]] bool allowIncomingConnections() const;
void allowIncomingConnections(bool allow);
[[nodiscard]] bool advertiseAsExitNode() const;
void advertiseAsExitNode(bool enabled);
[[nodiscard]] bool exitNodeAllowLanAccess() const;
void exitNodeAllowLanAccess(bool enabled);
[[nodiscard]] bool useSubnets() const;
void useSubnets(bool enabled);
[[nodiscard]] bool startOnLogin() const;
void startOnLogin(bool enabled);
[[nodiscard]] QString exitNodeInUse() const;
void exitNodeInUse(const QString& nodeNameOrIp);
[[nodiscard]] QString tailDriveMountPath() const;
void tailDriveMountPath(const QString& path);
[[nodiscard]] bool tailDriveEnabled() const;
void tailDriveEnabled(bool enabled);
private:
QSettings settings;
};
#endif //TAILSETTINGS_H