mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
fix utls default
This commit is contained in:
parent
38f5e1cf29
commit
c01a1effbc
@ -9,11 +9,13 @@ namespace Configs
|
||||
class uTLS : public baseConfig
|
||||
{
|
||||
public:
|
||||
bool supported = true;
|
||||
bool enabled = false;
|
||||
QString fingerPrint;
|
||||
|
||||
uTLS()
|
||||
{
|
||||
_add(new configItem("supported", &supported, boolean));
|
||||
_add(new configItem("enabled", &enabled, itemType::boolean));
|
||||
_add(new configItem("fingerprint", &fingerPrint, string));
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@ namespace Configs
|
||||
|
||||
hysteria() : outbound()
|
||||
{
|
||||
tls->utls->supported = false;
|
||||
_add(new configItem("protocol_version", &protocol_version, string));
|
||||
_add(new configItem("server_ports", &server_ports, stringList));
|
||||
_add(new configItem("hop_interval", &hop_interval, string));
|
||||
|
||||
@ -22,6 +22,7 @@ namespace Configs
|
||||
|
||||
tuic() : outbound()
|
||||
{
|
||||
tls->utls->supported = false;
|
||||
_add(new configItem("uuid", &uuid, string));
|
||||
_add(new configItem("password", &password, string));
|
||||
_add(new configItem("congestion_control", &congestion_control, string));
|
||||
|
||||
@ -41,6 +41,7 @@ namespace Configs {
|
||||
}
|
||||
BuildResult uTLS::Build()
|
||||
{
|
||||
if (!supported) return {};
|
||||
auto obj = ExportToJson();
|
||||
if ((obj.isEmpty() || obj["enabled"].toBool() == false || fingerPrint.isEmpty()) && !dataStore->utlsFingerprint.isEmpty()) {
|
||||
obj["enabled"] = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user