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
46
client/core/models/protocols/openvpnProtocolConfig.h
Normal file
46
client/core/models/protocols/openvpnProtocolConfig.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
#ifndef OPENVPNPROTOCOLCONFIG_H
|
||||
#define OPENVPNPROTOCOLCONFIG_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
#include "protocolConfig.h"
|
||||
|
||||
namespace openvpn
|
||||
{
|
||||
struct ServerProtocolConfig
|
||||
{
|
||||
QString subnetAddress;
|
||||
QString transportProto;
|
||||
QString port;
|
||||
QString ncpDisable;
|
||||
QString hash;
|
||||
QString cipher;
|
||||
QString tlsAuth;
|
||||
QString blockOutsideDns;
|
||||
QString additionalClientConfig;
|
||||
QString additionalServerConfig;
|
||||
};
|
||||
|
||||
struct ClientProtocolConfig
|
||||
{
|
||||
bool isEmpty = true;
|
||||
|
||||
QString clientId;
|
||||
|
||||
QString nativeConfig;
|
||||
};
|
||||
}
|
||||
|
||||
class OpenVpnProtocolConfig : public ProtocolConfig
|
||||
{
|
||||
public:
|
||||
OpenVpnProtocolConfig(const QJsonObject &protocolConfigObject, const QString &protocolName);
|
||||
|
||||
QJsonObject toJson() const override;
|
||||
|
||||
openvpn::ServerProtocolConfig serverProtocolConfig;
|
||||
openvpn::ClientProtocolConfig clientProtocolConfig;
|
||||
};
|
||||
|
||||
#endif // OPENVPNPROTOCOLCONFIG_H
|
Loading…
Add table
Add a link
Reference in a new issue