forked from MatsuriDayo/nekoray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShadowSocksBean.hpp
32 lines (24 loc) · 1.07 KB
/
ShadowSocksBean.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include "fmt/AbstractBean.hpp"
#include "fmt/V2RayStreamSettings.hpp"
namespace NekoRay::fmt {
class ShadowSocksBean : public AbstractBean {
public:
QString method = "aes-128-gcm";
QString password = "";
QString plugin = "";
QSharedPointer<V2rayStreamSettings> stream = QSharedPointer<V2rayStreamSettings>(new V2rayStreamSettings());
QString custom = "";
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("stream", dynamic_cast<JsonStore *>(stream.get()), itemType::jsonStore));
_add(new configItem("custom", &custom, itemType::string));
};
QString DisplayType() override { return "Shadowsocks"; };
CoreObjOutboundBuildResult BuildCoreObj() override;
bool TryParseLink(const QString &link);
QString ToShareLink() override;
};
}