amnezia-client/client/core/models/protocols/xrayProtocolConfig.h
2025-07-03 10:20:01 +08:00

38 lines
790 B
C++

#ifndef XRAYPROTOCOLCONFIG_H
#define XRAYPROTOCOLCONFIG_H
#include <QJsonObject>
#include <QString>
#include "protocolConfig.h"
namespace xray
{
struct ServerProtocolConfig
{
QString site;
QString port;
QString transportProto;
};
struct ClientProtocolConfig
{
bool isEmpty = true;
};
}
class XrayProtocolConfig : public ProtocolConfig
{
public:
XrayProtocolConfig(const QJsonObject &protocolConfigObject, const QString &protocolName);
QJsonObject toJson() const override;
bool hasEqualServerSettings(const XrayProtocolConfig &other) const;
void clearClientSettings();
xray::ServerProtocolConfig serverProtocolConfig;
xray::ClientProtocolConfig clientProtocolConfig;
};
#endif // XRAYPROTOCOLCONFIG_H