mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-19 14:40:09 +08:00
fix: unknown transport type: h2 in vmess protocol (#1062)
This commit is contained in:
parent
205caef7a5
commit
5bf393597e
@ -163,7 +163,12 @@ namespace NekoGui_fmt {
|
||||
stream->sni = objN["sni"].toString();
|
||||
stream->header_type = objN["type"].toString();
|
||||
auto net = objN["net"].toString();
|
||||
if (!net.isEmpty()) stream->network = net;
|
||||
if (!net.isEmpty()) {
|
||||
if (net == "h2") {
|
||||
net = "http";
|
||||
}
|
||||
stream->network = net;
|
||||
}
|
||||
auto scy = objN["scy"].toString();
|
||||
if (!scy.isEmpty()) security = scy;
|
||||
// TLS (XTLS?)
|
||||
@ -186,7 +191,11 @@ namespace NekoGui_fmt {
|
||||
security = GetQueryValue(query, "encryption", "auto");
|
||||
|
||||
// security
|
||||
stream->network = GetQueryValue(query, "type", "tcp");
|
||||
auto type = GetQueryValue(query, "type", "tcp");
|
||||
if (type == "h2") {
|
||||
type = "http";
|
||||
}
|
||||
stream->network = type;
|
||||
stream->security = GetQueryValue(query, "security", "tls").replace("reality", "tls");
|
||||
auto sni1 = GetQueryValue(query, "sni");
|
||||
auto sni2 = GetQueryValue(query, "peer");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user