Skip to content

Commit

Permalink
Add mux for shadowsocks (MatsuriDayo#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdjnodj authored May 7, 2023
1 parent 289b67b commit 6b9e22f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion db/ConfigBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand Down

0 comments on commit 6b9e22f

Please sign in to comment.