2026-05-16 12:22:26 +03:00
|
|
|
#ifndef XRAYSUBSCRIPTIONCONFIG_H
|
|
|
|
|
#define XRAYSUBSCRIPTIONCONFIG_H
|
|
|
|
|
|
|
|
|
|
#include <QJsonArray>
|
|
|
|
|
#include <QJsonObject>
|
|
|
|
|
#include <QMap>
|
|
|
|
|
#include <optional>
|
|
|
|
|
|
|
|
|
|
#include "core/models/containerConfig.h"
|
|
|
|
|
#include "core/utils/containerEnum.h"
|
|
|
|
|
#include "core/utils/containers/containerUtils.h"
|
|
|
|
|
#include "core/utils/protocolEnum.h"
|
|
|
|
|
|
|
|
|
|
namespace amnezia
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
using namespace ContainerEnumNS;
|
|
|
|
|
|
|
|
|
|
struct XRaySubscriptionConfig
|
|
|
|
|
{
|
|
|
|
|
QString description;
|
2026-05-18 17:38:45 +03:00
|
|
|
QString displayName;
|
2026-05-16 12:22:26 +03:00
|
|
|
QString hostName;
|
|
|
|
|
QMap<DockerContainer, ContainerConfig> containers;
|
|
|
|
|
DockerContainer defaultContainer;
|
|
|
|
|
QString dns1;
|
|
|
|
|
QString dns2;
|
|
|
|
|
|
2026-05-20 12:08:51 +03:00
|
|
|
QString subLink;
|
2026-05-16 12:22:26 +03:00
|
|
|
QJsonArray configString;
|
|
|
|
|
QJsonArray configName;
|
|
|
|
|
int currentConfig;
|
|
|
|
|
|
|
|
|
|
bool hasContainers() const;
|
|
|
|
|
ContainerConfig containerConfig(DockerContainer container) const;
|
|
|
|
|
QJsonObject toJson() const;
|
|
|
|
|
static XRaySubscriptionConfig fromJson(const QJsonObject &json);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace amnezia
|
|
|
|
|
|
|
|
|
|
#endif // XRAYSUBSCRIPTIONCONFIG_H
|