mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
41 lines
956 B
C++
41 lines
956 B
C++
#ifndef NATIVESERVERCONFIG_H
|
|
#define NATIVESERVERCONFIG_H
|
|
|
|
#include <QJsonObject>
|
|
#include <QJsonArray>
|
|
#include <QMap>
|
|
#include <optional>
|
|
|
|
#include "core/utils/containerEnum.h"
|
|
#include "core/utils/containers/containerUtils.h"
|
|
#include "core/utils/protocolEnum.h"
|
|
#include "core/models/containerConfig.h"
|
|
|
|
namespace amnezia
|
|
{
|
|
|
|
using namespace ContainerEnumNS;
|
|
|
|
struct NativeServerConfig {
|
|
QString description;
|
|
QString hostName;
|
|
QMap<DockerContainer, ContainerConfig> containers;
|
|
DockerContainer defaultContainer;
|
|
QString dns1;
|
|
QString dns2;
|
|
|
|
std::optional<QJsonArray> configString;
|
|
std::optional<QJsonArray> configName;
|
|
std::optional<int> currentConfig;
|
|
|
|
bool hasContainers() const;
|
|
ContainerConfig containerConfig(DockerContainer container) const;
|
|
QJsonObject toJson() const;
|
|
static NativeServerConfig fromJson(const QJsonObject& json);
|
|
};
|
|
|
|
} // namespace amnezia
|
|
|
|
#endif // NATIVESERVERCONFIG_H
|
|
|