mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-12-04 22:21:41 +09:00
* fix: share double-stop guard via VpnProtocol base class * feat: add local proxy core module * feat: local proxy settings api * feat: wire local proxy into app controllers * feat: local proxy settings ui * feat: arbitrate shared xray engine ownership via ipc tokens * fix: remove connection type * chore: add qthttpserver to desktop ci qt modules * fix: local proxy port fallback and active port reporting * fix: keep text field button aligned when error is shown * fix: hide local proxy for free servers and guard device unlink * fix: show local proxy state per server * fix: anchor text field button to content * fix: adapt local proxy pages to design * fix: copy logic and port logic * refactor: move local proxy files to controllers and utils * refactor: merge local proxy into LocalProxyController * refactor: reuse gateway config request and keep local proxy state in memory --------- Co-authored-by: vkamn <vk@amnezia.org>
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
#include "localProxyUiController.h"
|
|
|
|
LocalProxyUiController::LocalProxyUiController(LocalProxyController *localProxyController, QObject *parent)
|
|
: QObject(parent), m_localProxyController(localProxyController)
|
|
{
|
|
connect(m_localProxyController, &LocalProxyController::stateChanged, this, &LocalProxyUiController::stateChanged);
|
|
connect(m_localProxyController, &LocalProxyController::startFailed, this, &LocalProxyUiController::startFailed);
|
|
}
|
|
|
|
bool LocalProxyUiController::isSupported() const
|
|
{
|
|
return m_localProxyController->isSupported();
|
|
}
|
|
|
|
bool LocalProxyUiController::isEnabled() const
|
|
{
|
|
return m_localProxyController->isEnabled();
|
|
}
|
|
|
|
int LocalProxyUiController::port() const
|
|
{
|
|
return m_localProxyController->port();
|
|
}
|
|
|
|
QString LocalProxyUiController::ownerId() const
|
|
{
|
|
return m_localProxyController->ownerId();
|
|
}
|
|
|
|
int LocalProxyUiController::activePort() const
|
|
{
|
|
return m_localProxyController->activePort();
|
|
}
|
|
|
|
bool LocalProxyUiController::isPortUserDefined() const
|
|
{
|
|
return m_localProxyController->isPortUserDefined();
|
|
}
|
|
|
|
bool LocalProxyUiController::setPort(int port)
|
|
{
|
|
return m_localProxyController->setPort(port);
|
|
}
|
|
|
|
bool LocalProxyUiController::isPortBusy(int port) const
|
|
{
|
|
return m_localProxyController->isPortBusy(port);
|
|
}
|
|
|
|
bool LocalProxyUiController::enable(const QString &ownerId, int port)
|
|
{
|
|
return m_localProxyController->enable(ownerId, port);
|
|
}
|
|
|
|
void LocalProxyUiController::disable()
|
|
{
|
|
m_localProxyController->disable();
|
|
}
|