fix: unknown transport type: h2

closes: #1012
This commit is contained in:
purofle 2023-11-11 22:52:04 +08:00
parent c6caf42ce9
commit 937523c6b3
No known key found for this signature in database
GPG Key ID: 57DEC1478152D973

View File

@ -54,7 +54,13 @@ namespace NekoGui_fmt {
if (serverPort == -1) serverPort = 443; if (serverPort == -1) serverPort = 443;
// security // security
stream->network = GetQueryValue(query, "type", "tcp");
auto type = GetQueryValue(query, "type", "tcp");
if (type == "h2") {
type = "http";
}
stream->network = type;
if (proxy_type == proxy_Trojan) { if (proxy_type == proxy_Trojan) {
stream->security = GetQueryValue(query, "security", "tls").replace("reality", "tls").replace("none", ""); stream->security = GetQueryValue(query, "security", "tls").replace("reality", "tls").replace("none", "");
} else { } else {