diff --git a/tachyon/files/usr/lib/config/connections.uc b/tachyon/files/usr/lib/config/connections.uc index 1e04e92b..b137bb14 100644 --- a/tachyon/files/usr/lib/config/connections.uc +++ b/tachyon/files/usr/lib/config/connections.uc @@ -698,8 +698,8 @@ function subscription_include_urltest_groups(section, value) { function subscription_hide_urltest_group_outbounds(section, value) { let child = child_item_by_value(section, "subscription_url", "url", value); if (child != null) - return child_bool(child, "hide_urltest_group_outbounds", false); - return item_bool(section, "subscription_url_settings", value, "hide_urltest_group_outbounds", false); + return child_bool(child, "hide_urltest_group_outbounds", true); + return item_bool(section, "subscription_url_settings", value, "hide_urltest_group_outbounds", true); } function subscription_hide_detour_outbounds(section, value) { diff --git a/tests/urltest_groups.sh b/tests/urltest_groups.sh index d4b71bd7..f9287c33 100644 --- a/tests/urltest_groups.sh +++ b/tests/urltest_groups.sh @@ -565,8 +565,11 @@ function contains(values, needle) { } if (!imported || imported.url != "https://native.example/ping" || imported.interval != "1m" || imported.tolerance != 80) die("generated native URLTest did not preserve subscription params\n"); -if (!selector || !contains(selector.outbounds, "Native A")) - die("native URLTest child must be selectable in selector\n"); +if (!builtin || length(builtin.outbounds || []) != 1 || builtin.outbounds[0] != "Native A") + die("built-in URLTest regex filter should expand Native Group to Native A only\n"); +for (let tag in selector.outbounds || []) + if (tag == "Native A") + die("native URLTest child must not be visible in selector by default\n"); for (let tag in selector.outbounds || []) if (tag == "Detour Only") die("detour-only outbound must not be visible in selector\n"); @@ -574,8 +577,8 @@ if (!reveal_urltest_selector || !contains(reveal_urltest_selector.outbounds, "Na die("native URLTest child should be visible when URLTest hiding is disabled\n"); if (contains(reveal_urltest_selector ? reveal_urltest_selector.outbounds : [], "Detour Only")) die("detour outbound should stay hidden when only URLTest hiding is disabled\n"); -if (!reveal_detour_selector || !contains(reveal_detour_selector.outbounds, "Native A")) - die("native URLTest child should be selectable in selector\n"); +if (contains(reveal_detour_selector ? reveal_detour_selector.outbounds : [], "Native A")) + die("native URLTest child should stay hidden when only detour hiding is disabled\n"); if (!reveal_detour_selector || !contains(reveal_detour_selector.outbounds, "Detour Only")) die("detour outbound should be visible when detour hiding is disabled\n"); if (length(object_or_empty(cache.urltestGroups)["Native Group"].outbounds || []) != 1)