feat: Added local proxy server

This commit is contained in:
aiamnezia
2025-08-08 06:44:18 +04:00
parent a6e6de33c8
commit 2ae97c5cda
16 changed files with 1909 additions and 2 deletions
@@ -2,6 +2,7 @@
#include <QDirIterator>
#include <QTranslator>
#include <QStandardPaths>
#if defined(Q_OS_ANDROID)
#include "core/installedAppsImageProvider.h"
@@ -26,11 +27,26 @@ CoreController::CoreController(const QSharedPointer<VpnConnection> &vpnConnectio
initNotificationHandler();
initLocalProxy();
auto locale = m_settings->getAppLanguage();
m_translator.reset(new QTranslator());
updateTranslator(locale);
}
void CoreController::initLocalProxy()
{
#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
// Logger and proxy initialization
ProxyLogger::getInstance().init(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/logs/proxy.log");
ProxyLogger::getInstance().setLogLevel(ProxyLogger::LogLevel::INFO);
m_proxyServer.reset(new ProxyServer(this));
const quint16 proxyPort = 49490;
m_proxyServer->start(proxyPort);
#endif
}
void CoreController::initModels()
{
m_containersModel.reset(new ContainersModel(this));