From 937523c6b35c452c3b0816173b4e6d1e5408b196 Mon Sep 17 00:00:00 2001 From: purofle Date: Sat, 11 Nov 2023 22:52:04 +0800 Subject: [PATCH] fix: unknown transport type: h2 closes: #1012 --- fmt/Link2Bean.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fmt/Link2Bean.cpp b/fmt/Link2Bean.cpp index 19c5cfd28..4e3f3221b 100644 --- a/fmt/Link2Bean.cpp +++ b/fmt/Link2Bean.cpp @@ -54,7 +54,13 @@ namespace NekoGui_fmt { if (serverPort == -1) serverPort = 443; // 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) { stream->security = GetQueryValue(query, "security", "tls").replace("reality", "tls").replace("none", ""); } else {