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:
parent
fff15fffe2
commit
96566f04ee
16 changed files with 903 additions and 249 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue