From c83e4bd16b83b743f1b914d1e1e23c4d85068f9d Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Fri, 21 Nov 2025 13:28:22 +0800 Subject: [PATCH] fix --- src/configs/sub/GroupUpdater.cpp | 2 +- src/dataStore/Database.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/configs/sub/GroupUpdater.cpp b/src/configs/sub/GroupUpdater.cpp index bf35b49..91dee8b 100644 --- a/src/configs/sub/GroupUpdater.cpp +++ b/src/configs/sub/GroupUpdater.cpp @@ -282,7 +282,7 @@ namespace Subscription { } // Hysteria - if (out["type"] == "hysteria") { + if (out["type"] == "hysteria" || out["type"] == "hysteria2") { ent = Configs::ProfileManager::NewProxyEntity("hysteria"); auto ok = ent->Hysteria()->ParseFromJson(out); if (!ok) continue; diff --git a/src/dataStore/Database.cpp b/src/dataStore/Database.cpp index bdb0eef..7b3a5d7 100644 --- a/src/dataStore/Database.cpp +++ b/src/dataStore/Database.cpp @@ -182,6 +182,10 @@ namespace Configs { else if (ent->_bean->mux_state == 2) obj["multiplex"] = QJsonObject{{"enabled", false}}; ent->outbound->ParseFromJson(obj); ent->outbound->name = ent->_bean->name; + if (ent->type == "hysteria2") { + ent->type = "hysteria"; + ent->Hysteria()->protocol_version = "2"; + } } } @@ -253,7 +257,7 @@ namespace Configs { } else if (type == "vless") { bean = new Configs::TrojanVLESSBean(Configs::TrojanVLESSBean::proxy_VLESS); outbound = new Configs::vless(); - } else if (type == "hysteria") { + } else if (type == "hysteria" || type == "hysteria2") { bean = new Configs::QUICBean(Configs::QUICBean::proxy_Hysteria); outbound = new Configs::hysteria(); } else if (type == "tuic") {