refactoring: added classes for working with server configs
This commit is contained in:
parent
a2d30efaab
commit
2d22a74b22
34 changed files with 1441 additions and 91 deletions
35
client/core/models/protocols/xrayProtocolConfig.h
Normal file
35
client/core/models/protocols/xrayProtocolConfig.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#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;
|
||||
|
||||
xray::ServerProtocolConfig serverProtocolConfig;
|
||||
xray::ClientProtocolConfig clientProtocolConfig;
|
||||
};
|
||||
|
||||
#endif // XRAYPROTOCOLCONFIG_H
|
Loading…
Add table
Add a link
Reference in a new issue