mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 12:34:37 +03:00
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "fmt/AbstractBean.hpp"
|
|
#include "fmt/V2RayStreamSettings.hpp"
|
|
|
|
namespace NekoGui_fmt {
|
|
class ShadowSocksBean : public AbstractBean {
|
|
public:
|
|
QString method = "aes-128-gcm";
|
|
QString password = "";
|
|
QString plugin = "";
|
|
bool uot = false;
|
|
|
|
std::shared_ptr<V2rayStreamSettings> stream = std::make_shared<V2rayStreamSettings>();
|
|
|
|
ShadowSocksBean() : AbstractBean(0) {
|
|
_add(new configItem("method", &method, itemType::string));
|
|
_add(new configItem("pass", &password, itemType::string));
|
|
_add(new configItem("plugin", &plugin, itemType::string));
|
|
_add(new configItem("uot", &uot, itemType::boolean));
|
|
_add(new configItem("stream", dynamic_cast<JsonStore *>(stream.get()), itemType::jsonStore));
|
|
};
|
|
|
|
QString DisplayType() override { return "Shadowsocks"; };
|
|
|
|
CoreObjOutboundBuildResult BuildCoreObjV2Ray() override;
|
|
|
|
CoreObjOutboundBuildResult BuildCoreObjSingBox() override;
|
|
|
|
bool TryParseLink(const QString &link);
|
|
|
|
QString ToShareLink() override;
|
|
};
|
|
} // namespace NekoGui_fmt
|