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
34
client/core/models/protocols/shadowsocksProtocolConfig.h
Normal file
34
client/core/models/protocols/shadowsocksProtocolConfig.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#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;
|
||||
|
||||
shadowsocks::ServerProtocolConfig serverProtocolConfig;
|
||||
shadowsocks::ClientProtocolConfig clientProtocolConfig;
|
||||
};
|
||||
|
||||
#endif // SHADOWSOCKSPROTOCOLCONFIG_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue