Setup MTU for WG/AWG protocol (#576)

Setup MTU for AWG/WG protocol
This commit is contained in:
Mykola Baibuz 2024-03-18 12:41:53 +02:00 committed by GitHub
parent 9f82b4c21f
commit e646b85e56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 512 additions and 56 deletions

View file

@ -6,6 +6,27 @@
#include "containers/containers_defs.h"
struct AwgConfig
{
AwgConfig(const QJsonObject &jsonConfig);
QString port;
QString mtu;
QString junkPacketCount;
QString junkPacketMinSize;
QString junkPacketMaxSize;
QString initPacketJunkSize;
QString responsePacketJunkSize;
QString initPacketMagicHeader;
QString responsePacketMagicHeader;
QString underloadPacketMagicHeader;
QString transportPacketMagicHeader;
bool hasEqualServerSettings(const AwgConfig &other) const;
bool hasEqualClientSettings(const AwgConfig &other) const;
};
class AwgConfigModel : public QAbstractListModel
{
Q_OBJECT
@ -13,6 +34,7 @@ class AwgConfigModel : public QAbstractListModel
public:
enum Roles {
PortRole = Qt::UserRole + 1,
MtuRole,
JunkPacketCountRole,
JunkPacketMinSizeRole,
JunkPacketMaxSizeRole,