This commit is contained in:
svamnezia
2026-04-17 13:56:06 +03:00
parent 10289fdb26
commit eb1188ccd7
8 changed files with 121 additions and 117 deletions
@@ -747,8 +747,7 @@ bool ApiConfigsController::updateServiceFromTelegram(const int serverIndex)
apiDefs::requestTimeoutMsecs,
m_settings->isStrictKillSwitchEnabled());
// Load transports config from file or env
gatewayController.loadTransportsConfig("gateway.json", "AMNEZIA_GATEWAY");
gatewayController.setTransportsConfig(GatewayController::buildTransportsConfig());
ErrorCode errorCode = gatewayController.postParallel(endpoint, apiPayload, responseBody);
@@ -962,9 +961,7 @@ ErrorCode ApiConfigsController::executeRequest(const QString &endpoint, const QJ
apiDefs::requestTimeoutMsecs,
m_settings->isStrictKillSwitchEnabled());
// Load transports config from file or env
gatewayController.loadTransportsConfig("gateway.json", "AMNEZIA_GATEWAY");
gatewayController.setTransportsConfig(GatewayController::buildTransportsConfig());
// Parallel request via all configured transports (HTTP + DNS)
return gatewayController.postParallel(endpoint, apiPayload, responseBody);
}
@@ -52,8 +52,7 @@ void ApiNewsController::fetchNews(bool showError)
apiDefs::requestTimeoutMsecs,
m_settings->isStrictKillSwitchEnabled());
// Load transports config from file or env
gatewayController.loadTransportsConfig("gateway.json", "AMNEZIA_GATEWAY");
gatewayController.setTransportsConfig(GatewayController::buildTransportsConfig());
QByteArray responseBody;
ErrorCode errorCode = gatewayController.postParallel(endpoint, payload, responseBody);
@@ -77,8 +77,7 @@ bool ApiSettingsController::getAccountInfo(bool reload)
requestTimeoutMsecs,
m_settings->isStrictKillSwitchEnabled());
// Load transports config from file or env
gatewayController.loadTransportsConfig("gateway.json", "AMNEZIA_GATEWAY");
gatewayController.setTransportsConfig(GatewayController::buildTransportsConfig());
ErrorCode errorCode = gatewayController.postParallel(endpoint, apiPayload, responseBody);