update domain strategy

This commit is contained in:
arm64v8a
2023-03-25 11:43:02 +09:00
parent 69771e2080
commit 180a764977
7 changed files with 28 additions and 83 deletions

View File

@@ -568,21 +568,8 @@ namespace NekoRay {
status->result->outboundStats += ent->traffic_data;
if (IS_NEKO_BOX) {
auto ds = dataStore->outbound_domain_strategy;
if (status->forTest) {
ds = "";
} else if (ds == "UseIPv4") {
ds = "ipv4_only";
} else if (ds == "UseIPv6") {
ds = "ipv6_only";
} else if (ds == "PreferIPv4") {
ds = "prefer_ipv4";
} else if (ds == "PreferIPv6") {
ds = "prefer_ipv6";
} else {
ds = "";
}
outbound["domain_strategy"] = ds;
// apply domain_strategy
outbound["domain_strategy"] = dataStore->outbound_domain_strategy;
// TODO apply mux
} else {
if (!status->forTest) outbound["domainStrategy"] = dataStore->outbound_domain_strategy;
@@ -655,6 +642,9 @@ namespace NekoRay {
},
};
}
// apply domain_strategy
inboundObj["domain_strategy"] = dataStore->outbound_domain_strategy;
//
status->inbounds += inboundObj;
}