mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
optimize code
This commit is contained in:
@@ -622,7 +622,7 @@ namespace NekoGui {
|
||||
status->result->outboundStats += ent->traffic_data;
|
||||
|
||||
// mux common
|
||||
auto needMux = ent->type == "vmess" || ent->type == "trojan" || ent->type == "vless" || ent->type == "shadowsocks";
|
||||
auto needMux = ent->type == "vmess" || ent->type == "trojan" || ent->type == "vless";
|
||||
needMux &= dataStore->mux_concurrency > 0;
|
||||
|
||||
if (stream != nullptr) {
|
||||
@@ -637,17 +637,13 @@ namespace NekoGui {
|
||||
}
|
||||
if (stream->multiplex_status == 0) {
|
||||
if (!dataStore->mux_default_on) needMux = false;
|
||||
} else if (stream->multiplex_status == 1) {
|
||||
needMux = true;
|
||||
} else if (stream->multiplex_status == 2) {
|
||||
needMux = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (ent->type == "shadowsocks") {
|
||||
if (!IS_NEKO_BOX || outbound["udp_over_tcp"] == true || !outbound["plugin"].isNull()) {
|
||||
needMux = false;
|
||||
}
|
||||
}
|
||||
|
||||
// common
|
||||
if (IS_NEKO_BOX) {
|
||||
// apply domain_strategy
|
||||
|
||||
Reference in New Issue
Block a user