mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 19:00:22 +08:00
update: some updates
This commit is contained in:
parent
3e547a70d4
commit
595103b54e
@ -1 +1 @@
|
||||
5611
|
||||
5612
|
||||
|
@ -62,6 +62,7 @@ namespace Qv2ray::core::connection
|
||||
auto vmessPart = Base64Encode(JsonToString(vmessUriRoot, QJsonDocument::JsonFormat::Compact));
|
||||
return "vmess://" + vmessPart;
|
||||
}
|
||||
|
||||
// This generates global config containing only one outbound....
|
||||
CONFIGROOT Deserialize(const QString &vmessStr, QString *alias, QString *errMessage)
|
||||
{
|
||||
@ -195,7 +196,8 @@ namespace Qv2ray::core::connection
|
||||
path = vmessConf.contains("path") ? vmessConf["path"].toVariant().toString() : (net == "quic" ? "" : "/");
|
||||
host = vmessConf.contains("host") ? vmessConf["host"].toVariant().toString() : (net == "quic" ? "none" : "");
|
||||
}
|
||||
// Repect connection type rather than obfs type //
|
||||
|
||||
// Repect connection type rather than obfs type
|
||||
if (QStringList{ "srtp", "utp", "wechat-video" }.contains(type)) //
|
||||
{ //
|
||||
if (net != "quic" && net != "kcp") //
|
||||
@ -204,6 +206,7 @@ namespace Qv2ray::core::connection
|
||||
type = "none"; //
|
||||
} //
|
||||
}
|
||||
|
||||
port = vmessConf["port"].toVariant().toInt();
|
||||
aid = vmessConf["aid"].toVariant().toInt();
|
||||
//
|
||||
@ -235,11 +238,11 @@ namespace Qv2ray::core::connection
|
||||
else if (net == "http" || net == "h2")
|
||||
{
|
||||
// Fill hosts for HTTP
|
||||
for (auto _host : host.split(','))
|
||||
for (const auto &_host : host.split(','))
|
||||
{
|
||||
if (!_host.isEmpty())
|
||||
{
|
||||
streaming.httpSettings.host.push_back(_host.trimmed());
|
||||
streaming.httpSettings.host << _host.trimmed();
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,5 +294,5 @@ namespace Qv2ray::core::connection
|
||||
return root;
|
||||
#undef default
|
||||
}
|
||||
} // namespace Serialization::vmess
|
||||
} // namespace serialization::vmess
|
||||
} // namespace Qv2ray::core::connection
|
||||
|
Loading…
Reference in New Issue
Block a user