Skip to content

Commit

Permalink
added a randomized proxy bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
Nethius committed Oct 23, 2024
1 parent 923e358 commit 7ca3ca2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/core/controllers/apiController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QtConcurrent>
#include <QRandomGenerator>

#include "QBlockCipher.h"
#include "QRsa.h"
Expand Down Expand Up @@ -346,6 +347,7 @@ ErrorCode ApiController::getServicesList(QByteArray &responseBody)

if (sslErrors.isEmpty() && shouldBypassProxy(reply, responseBody, false)) {
m_proxyUrls = getProxyUrls();
std::shuffle(m_proxyUrls.begin(), m_proxyUrls.end(), QRandomGenerator::global()->generate());
for (const QString &proxyUrl : m_proxyUrls) {
qDebug() << "Go to the next endpoint";
request.setUrl(QString("%1v1/services").arg(proxyUrl));
Expand Down

0 comments on commit 7ca3ca2

Please # to comment.