mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 13:50:12 +08:00
fix
This commit is contained in:
parent
db0531396e
commit
c83e4bd16b
@ -282,7 +282,7 @@ namespace Subscription {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hysteria
|
// Hysteria
|
||||||
if (out["type"] == "hysteria") {
|
if (out["type"] == "hysteria" || out["type"] == "hysteria2") {
|
||||||
ent = Configs::ProfileManager::NewProxyEntity("hysteria");
|
ent = Configs::ProfileManager::NewProxyEntity("hysteria");
|
||||||
auto ok = ent->Hysteria()->ParseFromJson(out);
|
auto ok = ent->Hysteria()->ParseFromJson(out);
|
||||||
if (!ok) continue;
|
if (!ok) continue;
|
||||||
|
|||||||
@ -182,6 +182,10 @@ namespace Configs {
|
|||||||
else if (ent->_bean->mux_state == 2) obj["multiplex"] = QJsonObject{{"enabled", false}};
|
else if (ent->_bean->mux_state == 2) obj["multiplex"] = QJsonObject{{"enabled", false}};
|
||||||
ent->outbound->ParseFromJson(obj);
|
ent->outbound->ParseFromJson(obj);
|
||||||
ent->outbound->name = ent->_bean->name;
|
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") {
|
} else if (type == "vless") {
|
||||||
bean = new Configs::TrojanVLESSBean(Configs::TrojanVLESSBean::proxy_VLESS);
|
bean = new Configs::TrojanVLESSBean(Configs::TrojanVLESSBean::proxy_VLESS);
|
||||||
outbound = new Configs::vless();
|
outbound = new Configs::vless();
|
||||||
} else if (type == "hysteria") {
|
} else if (type == "hysteria" || type == "hysteria2") {
|
||||||
bean = new Configs::QUICBean(Configs::QUICBean::proxy_Hysteria);
|
bean = new Configs::QUICBean(Configs::QUICBean::proxy_Hysteria);
|
||||||
outbound = new Configs::hysteria();
|
outbound = new Configs::hysteria();
|
||||||
} else if (type == "tuic") {
|
} else if (type == "tuic") {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user