support vmess header

This commit is contained in:
arm64v8a
2022-08-29 17:12:18 +08:00
parent 3a053b5ea6
commit a0e42ec28e
7 changed files with 129 additions and 35 deletions

View File

@@ -113,11 +113,11 @@ namespace NekoRay::fmt {
serverPort = objN["port"].toVariant().toInt();
// OPTIONAL
name = objN["ps"].toString();
auto aid_ = objN["aid"];
aid = aid_.isString() ? aid_.toString().toInt() : aid_.toInt();
aid = objN["aid"].toVariant().toInt();
stream->host = objN["host"].toString();
stream->path = objN["path"].toString();
stream->sni = objN["sni"].toString();
stream->header_type = objN["type"].toString();
auto net = objN["net"].toString().replace("http", "h2");
if (!net.isEmpty()) stream->network = net;
auto scy = objN["scy"].toString();