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

37 lines
823 B
C++

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