Skip to content

Commit 8621d32

Browse files
committed
在 runtime.sh 的节点扫描逻辑中,增加一项过滤条件:
当有其他节点导入时:自动将标签为 default 的节点从 tags 列表中移除。这样 Auto-Fastest 分组将只包含您导入的代理节点,避免因为它选择了“直连”而导致代理失效。 当没有导入其他节点时:保底逻辑会生效,将唯一的 default 节点重新加回列表。这保证了在没有任何节点的情况下,sing-box 配置文件依然合法且具备基础的直连功能。
1 parent d0466df commit 8621d32

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/module/scripts/core/runtime.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ write_runtime_outbounds() {
6868
for f in "$current_dir"/*.json; do
6969
is_node_config_file "$f" || continue
7070
tag="$(detect_outbound_tag "$f")"
71-
[ -n "$tag" ] || continue
71+
[ -n "$tag" ] && [ "$tag" != "default" ] || continue
7272
tags="$(append_selector_tag "$tags" "$tag")"
7373
done
7474

0 commit comments

Comments
 (0)