mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
* add parser auth/pass & fix port * fix generateRandomHex * remove hardcore port ios * add generated random port * fix sin6_port * fixed inbound * add error message * add std::runtime_error & fixed random generator * remove loop --------- Co-authored-by: Yaumenau Pavel <yaumenau.pavel@planetvpn.dev>
37 lines
793 B
C++
37 lines
793 B
C++
#ifndef XRAYPROTOCOL_H
|
|
#define XRAYPROTOCOL_H
|
|
|
|
#include "QProcess"
|
|
|
|
#include "core/ipcclient.h"
|
|
#include "vpnprotocol.h"
|
|
#include "settings.h"
|
|
#include <QtCore/qsharedpointer.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 startTun2Socks();
|
|
|
|
QJsonObject m_xrayConfig;
|
|
Settings::RouteMode m_routeMode;
|
|
QList<QHostAddress> m_dnsServers;
|
|
QString m_remoteAddress;
|
|
|
|
QString m_socksUser;
|
|
QString m_socksPassword;
|
|
int m_socksPort = 10808;
|
|
|
|
QSharedPointer<IpcProcessInterfaceReplica> m_tun2socksProcess;
|
|
};
|
|
|
|
#endif // XRAYPROTOCOL_H
|