fix(core): восстановление дефолта hide_urltest_group_outbounds и ассертов urltest_groups
This commit is contained in:
@@ -698,8 +698,8 @@ function subscription_include_urltest_groups(section, value) {
|
|||||||
function subscription_hide_urltest_group_outbounds(section, value) {
|
function subscription_hide_urltest_group_outbounds(section, value) {
|
||||||
let child = child_item_by_value(section, "subscription_url", "url", value);
|
let child = child_item_by_value(section, "subscription_url", "url", value);
|
||||||
if (child != null)
|
if (child != null)
|
||||||
return child_bool(child, "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", false);
|
return item_bool(section, "subscription_url_settings", value, "hide_urltest_group_outbounds", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function subscription_hide_detour_outbounds(section, value) {
|
function subscription_hide_detour_outbounds(section, value) {
|
||||||
|
|||||||
@@ -565,8 +565,11 @@ function contains(values, needle) {
|
|||||||
}
|
}
|
||||||
if (!imported || imported.url != "https://native.example/ping" || imported.interval != "1m" || imported.tolerance != 80)
|
if (!imported || imported.url != "https://native.example/ping" || imported.interval != "1m" || imported.tolerance != 80)
|
||||||
die("generated native URLTest did not preserve subscription params\n");
|
die("generated native URLTest did not preserve subscription params\n");
|
||||||
if (!selector || !contains(selector.outbounds, "Native A"))
|
if (!builtin || length(builtin.outbounds || []) != 1 || builtin.outbounds[0] != "Native A")
|
||||||
die("native URLTest child must be selectable in selector\n");
|
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 || [])
|
for (let tag in selector.outbounds || [])
|
||||||
if (tag == "Detour Only")
|
if (tag == "Detour Only")
|
||||||
die("detour-only outbound must not be visible in selector\n");
|
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");
|
die("native URLTest child should be visible when URLTest hiding is disabled\n");
|
||||||
if (contains(reveal_urltest_selector ? reveal_urltest_selector.outbounds : [], "Detour Only"))
|
if (contains(reveal_urltest_selector ? reveal_urltest_selector.outbounds : [], "Detour Only"))
|
||||||
die("detour outbound should stay hidden when only URLTest hiding is disabled\n");
|
die("detour outbound should stay hidden when only URLTest hiding is disabled\n");
|
||||||
if (!reveal_detour_selector || !contains(reveal_detour_selector.outbounds, "Native A"))
|
if (contains(reveal_detour_selector ? reveal_detour_selector.outbounds : [], "Native A"))
|
||||||
die("native URLTest child should be selectable in selector\n");
|
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"))
|
if (!reveal_detour_selector || !contains(reveal_detour_selector.outbounds, "Detour Only"))
|
||||||
die("detour outbound should be visible when detour hiding is disabled\n");
|
die("detour outbound should be visible when detour hiding is disabled\n");
|
||||||
if (length(object_or_empty(cache.urltestGroups)["Native Group"].outbounds || []) != 1)
|
if (length(object_or_empty(cache.urltestGroups)["Native Group"].outbounds || []) != 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user