mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
f9b106cf5b
* fix: fixed country model update * fix: fixed context menu crush on ios * fix: fixed passphrase dialog freeze * fix: fixed country switch * fix: fixed start minimized * fix: fixed black screen after remove container * refactor: return cloak and ss only for view * fix: fixed default server change after improt while connected * fix: divider visibility * fix: fixed revoke admin user * fix: fixed language restore after backup * fix: link hover for tor settings page * fix: fixed openvpn connecntion status * fix: fixed free color status * fix: fixed client config update * chore: bump version
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
#ifndef SELFHOSTEDUSERSERVERCONFIG_H
|
|
#define SELFHOSTEDUSERSERVERCONFIG_H
|
|
|
|
#include <QJsonObject>
|
|
#include <QMap>
|
|
#include <QPair>
|
|
#include <optional>
|
|
|
|
#include "core/utils/containerEnum.h"
|
|
#include "core/utils/containers/containerUtils.h"
|
|
#include "core/utils/protocolEnum.h"
|
|
#include "core/models/containerConfig.h"
|
|
#include "core/utils/commonStructs.h"
|
|
|
|
namespace amnezia
|
|
{
|
|
|
|
using namespace ContainerEnumNS;
|
|
|
|
struct SelfHostedUserServerConfig {
|
|
QString description;
|
|
QString displayName;
|
|
QString hostName;
|
|
QMap<DockerContainer, ContainerConfig> containers;
|
|
DockerContainer defaultContainer;
|
|
QString dns1;
|
|
QString dns2;
|
|
|
|
bool hasCredentials() const;
|
|
bool isReadOnly() const;
|
|
std::optional<ServerCredentials> credentials() const;
|
|
bool hasContainers() const;
|
|
ContainerConfig containerConfig(DockerContainer container) const;
|
|
|
|
void updateContainerConfig(DockerContainer container, const ContainerConfig &config);
|
|
|
|
QPair<QString, QString> getDnsPair(const QString &primaryDns, const QString &secondaryDns) const;
|
|
|
|
QJsonObject toJson() const;
|
|
static SelfHostedUserServerConfig fromJson(const QJsonObject &json);
|
|
};
|
|
|
|
} // namespace amnezia
|
|
|
|
#endif // SELFHOSTEDUSERSERVERCONFIG_H
|