mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user