Compatible with lowercase host in vless and vmess.(#55)

This commit is contained in:
asdlokj1qpi233
2025-08-29 15:50:36 +08:00
parent d22cd9b50a
commit add52ec9cb

View File

@@ -1236,6 +1236,9 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
singleproxy["ws-opts"]["path"])
: "/";
singleproxy["ws-opts"]["headers"]["Host"] >>= host;
if (host.empty()) {
singleproxy["ws-opts"]["headers"]["host"] >>= host;
}
singleproxy["ws-opts"]["headers"]["Edge"] >>= edge;
} else {
path = singleproxy["ws-path"].IsDefined()
@@ -1428,6 +1431,9 @@ void explodeClash(Node yamlnode, std::vector<Proxy> &nodes) {
singleproxy["ws-opts"]["path"])
: "/";
singleproxy["ws-opts"]["headers"]["Host"] >>= host;
if (host.empty()) {
singleproxy["ws-opts"]["headers"]["host"] >>= host;
}
singleproxy["ws-opts"]["headers"]["Edge"] >>= edge;
if (singleproxy["ws-opts"]["v2ray-http-upgrade"].IsDefined()) {
v2ray_http_upgrade = safe_as<std::string>(singleproxy["ws-opts"]["v2ray-http-upgrade"]);