feature/mtu connection config (#833)

* added the ability to change mtu for connection-only configs
* added replacing MTU with default when importing awg/wg configs in amnezia
This commit is contained in:
Nethius 2024-09-13 12:38:48 +04:00 committed by GitHub
parent fff15fffe2
commit 96566f04ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 903 additions and 249 deletions

View file

@ -11,7 +11,7 @@ struct WgConfig
WgConfig(const QJsonObject &jsonConfig);
QString port;
QString mtu;
QString clientMtu;
bool hasEqualServerSettings(const WgConfig &other) const;
bool hasEqualClientSettings(const WgConfig &other) const;
@ -25,7 +25,7 @@ class WireGuardConfigModel : public QAbstractListModel
public:
enum Roles {
PortRole = Qt::UserRole + 1,
MtuRole
ClientMtuRole
};
explicit WireGuardConfigModel(QObject *parent = nullptr);
@ -39,12 +39,15 @@ public slots:
void updateModel(const QJsonObject &config);
QJsonObject getConfig();
bool isServerSettingsEqual();
protected:
QHash<int, QByteArray> roleNames() const override;
private:
DockerContainer m_container;
QJsonObject m_protocolConfig;
QJsonObject m_serverProtocolConfig;
QJsonObject m_clientProtocolConfig;
QJsonObject m_fullConfig;
};