This commit is contained in:
parhelia512 2025-11-21 13:28:22 +08:00
parent db0531396e
commit c83e4bd16b
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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") {