Files
amnezia-client/service/server/localserver.h
T
AnhTVc ac77b4ee75 feat: add network status check for awg/wg protocol (#1894)
* Add network  status check for AWG/WG protocol

* Use service for PingSender

* Cleanup unused code

* Use networkchecker for all protocols

* fix android build

* add delay for ping checker stop

* handle for interafe problems on windows

* Restart IpcClient after OS suspend

* Add DBus network checker for Linux

* Use ping check for tun interfce

* Windows suspend mode handler

* MacOS suspend mode handler draft

* Add delay for Linux wakeup reconnect

* Add delay for Linux wakeup reconnect

* Fix macOS  wakeup/sleep prob

Fix macOS not receiving wakeup/sleep events

* fix done

* Update deploy.yml

fix CICD

* Update vpnconnection.cpp

update fix build CICD

* Update vpnconnection.cpp

update fix build cicd macos

* Update deploy.yml

fix  CICD build macos

* Update deploy.yml

fix CICD macos

* feat: implement SCP write buffer, improve network check and refactor macOS OpenGL support

* feat: add tunnel addresses updated signal and handle network check based on gateway and local address availability

* refactor: improve IpcClient connection handling and instance management

* fix: scp revert.

* fix: cmake reverted.

* fix: submodules updated

---------

Co-authored-by: Mykola Baibuz <mykola.baibuz@gmail.com>
Co-authored-by: Yaroslav Yashin <yaroslav.yashin@gmail.com>
Co-authored-by: vkamn <vk@amnezia.org>
2025-12-02 12:46:24 +08:00

61 lines
1.2 KiB
C++

#ifndef LOCALSERVER_H
#define LOCALSERVER_H
#include <QObject>
#include <QPointer>
#include <QProcess>
#include <QSharedPointer>
#include <QStringList>
#include <QVector>
#include "ipcserver.h"
#include "../../client/daemon/daemonlocalserver.h"
#include "../../client/mozilla/networkwatcher.h"
#ifdef Q_OS_WIN
#include "windows/daemon/windowsdaemon.h"
#endif
#ifdef Q_OS_LINUX
#include "linux/daemon/linuxdaemon.h"
#endif
#ifdef Q_OS_MAC
#include "macos/daemon/macosdaemon.h"
#endif
class QLocalServer;
class QLocalSocket;
class QProcess;
class LocalServer : public QObject
{
Q_OBJECT
public:
explicit LocalServer(QObject* parent = nullptr);
~LocalServer();
QSharedPointer<QLocalServer> m_server;
IpcServer m_ipcServer;
IpcProcessTun2Socks m_tun2socks;
QRemoteObjectHost m_serverNode;
bool m_isRemotingEnabled = false;
NetworkWatcher m_networkWatcher;
#ifdef Q_OS_LINUX
DaemonLocalServer server{qApp};
LinuxDaemon daemon;
#endif
#ifdef Q_OS_WIN
DaemonLocalServer server{qApp};
WindowsDaemon daemon;
#endif
#ifdef Q_OS_MAC
DaemonLocalServer server{qApp};
MacOSDaemon daemon;
#endif
};
#endif // LOCALSERVER_H