From 7f5f1aa70086d1b94b3360415aa00118fad63fce Mon Sep 17 00:00:00 2001 From: Toperlock <861705708@qq.com> Date: Sat, 24 Aug 2024 16:29:18 +0800 Subject: [PATCH] fix --- main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 713596ec9..8c4972893 100644 --- a/main.py +++ b/main.py @@ -439,12 +439,12 @@ def combin_to_config(config, data): out["outbounds"].insert(i, (group.rsplit("-", 1)[0]).rsplit("-", 1)[-1]) new_outbound = {'tag': (group.rsplit("-", 1)[0]).rsplit("-", 1)[-1], 'type': 'selector', 'outbounds': ['{' + group + '}']} config_outbounds.insert(-4, new_outbound) - else: - for out in config_outbounds: - if out.get("outbounds"): - if out['tag'] == 'Proxy': - out["outbounds"] = [out["outbounds"]] if isinstance(out["outbounds"], str) else out["outbounds"] - out["outbounds"].append('{' + group + '}') + if 'subgroup' not in group: + for out in config_outbounds: + if out.get("outbounds"): + if out['tag'] == 'Proxy': + out["outbounds"] = [out["outbounds"]] if isinstance(out["outbounds"], str) else out["outbounds"] + out["outbounds"].append('{' + group + '}') temp_outbounds = [] if config_outbounds: # 提前处理all模板