Skip to content

Commit 7da5caa

Browse files
committed
fix(clash): properly handle brutal config enable field in mux settings
1 parent 0d92468 commit 7da5caa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/subscription/clash.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,10 @@ def _apply_mux(self, node: dict, mux_settings: dict | None):
211211
"only-tcp": clash_mux.get("only_tcp"),
212212
"padding": clash_mux.get("padding"),
213213
"brutal-opts": {
214-
"enabled": clash_mux.get("brutal", {}).get("enable"),
215214
"up": clash_mux["brutal"]["up_mbps"],
216215
"down": clash_mux["brutal"]["down_mbps"],
217216
}
218-
if clash_mux.get("brutal")
217+
if clash_mux.get("brutal") and clash_mux["brutal"].get("enable")
219218
else None,
220219
}
221220
node["smux"] = self._normalize_and_remove_none_values(clash_mux_config)

0 commit comments

Comments
 (0)