fixed server go

This commit is contained in:
dranik
2026-05-07 22:30:18 +03:00
parent c877e1e5cb
commit f65fd4a8c5
10 changed files with 365 additions and 32 deletions
@@ -3,6 +3,7 @@
#include <QJsonDocument>
#include <QJsonArray>
#include <QUuid>
#include <QUrl>
#include "core/utils/errorCodes.h"
#include "core/utils/routeModes.h"
@@ -260,6 +261,14 @@ QString SecureAppSettingsRepository::getGatewayEndpoint(bool isTestPurchase) con
|| base.contains(QStringLiteral("[::1]"), Qt::CaseInsensitive)) {
return m_gatewayEndpoint;
}
#ifdef AMNEZIA_LAN_PLAINTEXT_GATEWAY
{
const QUrl gatewayUrl(base);
if (NetworkUtilities::hostIsPrivateLanAddress(gatewayUrl.host())) {
return m_gatewayEndpoint;
}
}
#endif
return QString(DEV_AGW_ENDPOINT);
}
return m_gatewayEndpoint;