Fix error about hysteria2.(#33)

This commit is contained in:
asdlokj1qpi23
2025-05-14 17:45:46 +08:00
parent cc9e3b77d4
commit 766434b771

View File

@@ -1487,7 +1487,19 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
if (password.empty())
singleproxy["auth"] >>= password;
singleproxy["up"] >>= up;
if (up.empty()) {
try {
up = singleproxy["up"].as<std::string>();
} catch (const YAML::BadConversion& e) {
}
}
singleproxy["down"] >>= down;
if (down.empty()) {
try {
down = singleproxy["down"].as<std::string>();
} catch (const YAML::BadConversion& e) {
}
}
singleproxy["obfs"] >>= obfsParam;
singleproxy["obfs-password"] >>= obfsPassword;
singleproxy["sni"] >>= host;