mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +07:00
fb5666057b
* update UI XRay, add new page PageProtocolXrayTransportSettings.qml PageProtocolXrayXmuxSettings.qml PageProtocolXrayXPaddingSettings.qml * add UI PageProtocolXrayConfigsSettings, PageProtocolXrayFlowSettings, PageProtocolXraySecuritySettings * add Xray-specific keys * add vars xray model * add new qml padding, update model * update model and export * rename file & update name class & update list xray * fixed ui * add save file in temp * remove debug macros * fixed build windows * fix path Windows * remove save config * fixed changes * fixed conf * fixed UI * fixed size & button save * fixed build iOS * fix: fixed headers base control --------- Co-authored-by: vkamn <vk@amnezia.org>
37 lines
1.5 KiB
C++
37 lines
1.5 KiB
C++
#ifndef XRAY_CONFIGURATOR_H
|
|
#define XRAY_CONFIGURATOR_H
|
|
|
|
#include <QObject>
|
|
#include <QJsonObject>
|
|
|
|
#include "configuratorBase.h"
|
|
#include "core/utils/errorCodes.h"
|
|
#include "core/utils/routeModes.h"
|
|
#include "core/utils/commonStructs.h"
|
|
#include "core/models/protocols/xrayProtocolConfig.h"
|
|
|
|
class XrayConfigurator : public ConfiguratorBase
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
XrayConfigurator(SshSession* sshSession, QObject *parent = nullptr);
|
|
|
|
amnezia::ProtocolConfig createConfig(const amnezia::ServerCredentials &credentials, amnezia::DockerContainer container, const amnezia::ContainerConfig &containerConfig,
|
|
const amnezia::DnsSettings &dnsSettings,
|
|
amnezia::ErrorCode &errorCode) override;
|
|
|
|
amnezia::ProtocolConfig processConfigWithLocalSettings(const amnezia::ConnectionSettings &settings,
|
|
amnezia::ProtocolConfig protocolConfig) override;
|
|
|
|
private:
|
|
QString prepareServerConfig(const amnezia::ServerCredentials &credentials, amnezia::DockerContainer container, const amnezia::ContainerConfig &containerConfig,
|
|
const amnezia::DnsSettings &dnsSettings,
|
|
amnezia::ErrorCode &errorCode);
|
|
|
|
// Builds the native xray "streamSettings" JSON object from XrayServerConfig
|
|
QJsonObject buildStreamSettings(const amnezia::XrayServerConfig &srv,
|
|
const QString &clientId) const;
|
|
};
|
|
|
|
#endif // XRAY_CONFIGURATOR_H
|