fix tagOut

This commit is contained in:
arm64v8a
2022-10-27 18:47:05 +09:00
parent f78b69bd91
commit 3943f75bc5

View File

@@ -321,6 +321,7 @@ namespace NekoRay {
QString BuildChainInternal(int chainId, const QList<QSharedPointer<ProxyEntity>> &ents, QString BuildChainInternal(int chainId, const QList<QSharedPointer<ProxyEntity>> &ents,
const QSharedPointer<BuildConfigStatus> &status) { const QSharedPointer<BuildConfigStatus> &status) {
QString chainTag = "c-" + Int2String(chainId); QString chainTag = "c-" + Int2String(chainId);
QString chainTagOut;
bool muxApplied = false; bool muxApplied = false;
QString pastTag; QString pastTag;
@@ -340,9 +341,11 @@ namespace NekoRay {
if (index == ents.length() - 1) { if (index == ents.length() - 1) {
needGlobal = true; needGlobal = true;
tagOut = "g-" + Int2String(ent->id); tagOut = "g-" + Int2String(ent->id);
if (chainId == 0) { }
tagOut = "proxy";
} // last profile set as "proxy"
if (chainId == 0 && index == 0) {
tagOut = "proxy";
} }
if (needGlobal) { if (needGlobal) {
@@ -376,7 +379,7 @@ namespace NekoRay {
} }
} else { } else {
// index == 0 means last profile in chain / not chain // index == 0 means last profile in chain / not chain
chainTag = tagOut; chainTagOut = tagOut;
status->result->outboundStat = ent->traffic_data; status->result->outboundStat = ent->traffic_data;
} }
@@ -522,7 +525,7 @@ namespace NekoRay {
index++; index++;
} }
return chainTag; return chainTagOut;
} }
// SingBox // SingBox