WireGuard protocol fix
This commit is contained in:
parent
e7dd964825
commit
68a51c9c63
10 changed files with 70 additions and 19 deletions
|
|
@ -50,9 +50,6 @@ void QrDecoderLogic::onDetectedQrCode(const QString &code)
|
|||
s >> m_chunks[chunkId];
|
||||
set_receivedChunksCount(m_chunks.size());
|
||||
|
||||
qDebug() << "Received chunks:" << receivedChunksCount() << "/" << chunksCount << "cur" << chunkId << m_chunks[chunkId].size();
|
||||
qDebug() << chunkId << m_chunks[chunkId];
|
||||
|
||||
if (m_chunks.size() == totalChunksCount()) {
|
||||
QByteArray data;
|
||||
for (int i = 0; i < totalChunksCount(); ++i) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include <QImage>
|
||||
#include <QDataStream>
|
||||
#include <QZXing>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "ShareConnectionLogic.h"
|
||||
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
|
||||
#include "defines.h"
|
||||
#include "core/defs.h"
|
||||
#include "core/errorstrings.h"
|
||||
#include <functional>
|
||||
|
||||
#include "../uilogic.h"
|
||||
|
|
@ -194,6 +196,12 @@ void ShareConnectionLogic::onPushButtonShareWireGuardGenerateClicked()
|
|||
|
||||
ErrorCode e = ErrorCode::NoError;
|
||||
QString cfg = WireguardConfigurator::genWireguardConfig(credentials, container, containerConfig, &e);
|
||||
if (e) {
|
||||
QMessageBox::warning(nullptr, APPLICATION_NAME,
|
||||
tr("Error occurred while configuring server.") + "\n" +
|
||||
errorString(e));
|
||||
return;
|
||||
}
|
||||
cfg = VpnConfigurator::processConfigWithExportSettings(container, Proto::WireGuard, cfg);
|
||||
cfg = QJsonDocument::fromJson(cfg.toUtf8()).object()[config_key::config].toString();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue