Add mux for shadowsocks (#572)

This commit is contained in:
tdjnodj
2023-05-07 15:33:32 +08:00
committed by GitHub
parent 289b67b67b
commit 6b9e22fe51

View File

@@ -603,7 +603,7 @@ namespace NekoRay {
status->result->outboundStats += ent->traffic_data;
// mux common
auto needMux = ent->type == "vmess" || ent->type == "trojan" || ent->type == "vless";
auto needMux = ent->type == "vmess" || ent->type == "trojan" || ent->type == "vless" || ent->type == "shadowsocks";
needMux &= !dataStore->mux_protocol.isEmpty() && dataStore->mux_concurrency > 0;
if (stream != nullptr) {
@@ -618,6 +618,12 @@ namespace NekoRay {
}
}
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