nekoray_Mahdi-zarei/include/configs/outbounds/http.h
2025-11-23 20:55:38 +03:00

41 lines
1.2 KiB
C++

#pragma once
#include "include/configs/common/Outbound.h"
#include "include/configs/common/TLS.h"
namespace Configs
{
class http : public outbound
{
public:
QString username;
QString password;
QString path;
QStringList headers;
std::shared_ptr<TLS> tls = std::make_shared<TLS>();
http() : outbound()
{
_add(new configItem("username", &username, string));
_add(new configItem("password", &password, string));
_add(new configItem("path", &path, string));
_add(new configItem("headers", &headers, stringList));
_add(new configItem("tls", dynamic_cast<JsonStore *>(tls.get()), jsonStore));
}
// baseConfig overrides
bool ParseFromLink(const QString& link) override;
bool ParseFromJson(const QJsonObject& object) override;
QString ExportToLink() override;
QJsonObject ExportToJson() override;
BuildResult Build() override;
// outboundMeta overrides
QString DisplayAddress() override;
QString DisplayName() override;
QString DisplayType() override;
QString DisplayTypeAndName() override;
bool IsEndpoint() override;
};
}