Fix error about hysteria2.(#33)

This commit is contained in:
asdlokj1qpi23 committed 2025-05-16 11:18:27 +08:00
1 parent 766434b771
commit 383deb54a7
1 file changed
+4
+4
View File
@@ -1486,6 +1486,7 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
singleproxy["password"] >>= password; singleproxy["password"] >>= password;
if (password.empty()) if (password.empty())
singleproxy["auth"] >>= password; singleproxy["auth"] >>= password;
if (singleproxy["up"].IsDefined()) {
singleproxy["up"] >>= up; singleproxy["up"] >>= up;
if (up.empty()) { if (up.empty()) {
try { try {
@@ -1493,6 +1494,8 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
} catch (const YAML::BadConversion& e) { } catch (const YAML::BadConversion& e) {
} }
} }
}
if (singleproxy["down"].IsDefined()) {
singleproxy["down"] >>= down; singleproxy["down"] >>= down;
if (down.empty()) { if (down.empty()) {
try { try {
@@ -1500,6 +1503,7 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
} catch (const YAML::BadConversion& e) { } catch (const YAML::BadConversion& e) {
} }
} }
}
singleproxy["obfs"] >>= obfsParam; singleproxy["obfs"] >>= obfsParam;
singleproxy["obfs-password"] >>= obfsPassword; singleproxy["obfs-password"] >>= obfsPassword;
singleproxy["sni"] >>= host; singleproxy["sni"] >>= host;