mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
* fix: add enablePeerTraffic call to xray * chore: remove unnecessary steps during xray TUN setup phase * chore: move tun init from tun2socks code to ipcserver * chore: rework xray routing * get rid of redundant delays * check if remote calls are successful * chore: xray routing fine-tuning * fix: add service qt deps to deployment build
34 lines
747 B
C++
34 lines
747 B
C++
#ifndef XRAYPROTOCOL_H
|
|
#define XRAYPROTOCOL_H
|
|
|
|
#include "QProcess"
|
|
|
|
#include "core/ipcclient.h"
|
|
#include "vpnprotocol.h"
|
|
#include "settings.h"
|
|
|
|
class XrayProtocol : public VpnProtocol
|
|
{
|
|
public:
|
|
XrayProtocol(const QJsonObject &configuration, QObject *parent = nullptr);
|
|
virtual ~XrayProtocol() override;
|
|
|
|
ErrorCode start() override;
|
|
void stop() override;
|
|
|
|
private:
|
|
ErrorCode setupRouting();
|
|
ErrorCode startTun2Sock();
|
|
void readXrayConfiguration(const QJsonObject &configuration);
|
|
|
|
QJsonObject m_xrayConfig;
|
|
Settings::RouteMode m_routeMode;
|
|
QString m_primaryDNS;
|
|
QString m_secondaryDNS;
|
|
#ifndef Q_OS_IOS
|
|
QSharedPointer<IpcProcessTun2SocksReplica> m_t2sProcess;
|
|
#endif
|
|
};
|
|
|
|
#endif // XRAYPROTOCOL_H
|