Remove unsupported URLTest defaults
This commit is contained in:
@@ -654,7 +654,7 @@ function rewrite_subscription_outbound_references(outbounds, tag_map, source_ref
|
|||||||
}
|
}
|
||||||
outbound.outbounds = rewritten;
|
outbound.outbounds = rewritten;
|
||||||
|
|
||||||
if (!runtime_supports_xhttp && as_string(outbound.type || "") == "urltest") {
|
if (as_string(outbound.type || "") == "urltest") {
|
||||||
delete outbound.default;
|
delete outbound.default;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -1162,7 +1162,7 @@ assert(outbound(xhttp_stable, "depends-on-xhttp") == null, "stable sing-box excl
|
|||||||
assert(outbound(xhttp_stable, "recursive-dependent") == null, "stable sing-box recursively excludes XHTTP-dependent detours");
|
assert(outbound(xhttp_stable, "recursive-dependent") == null, "stable sing-box recursively excludes XHTTP-dependent detours");
|
||||||
let stable_provider_group = outbound(xhttp_stable, "Provider XHTTP Group");
|
let stable_provider_group = outbound(xhttp_stable, "Provider XHTTP Group");
|
||||||
assert(stable_provider_group && length(stable_provider_group.outbounds) == 1 && stable_provider_group.outbounds[0] == "plain-node", "provider group removes XHTTP member");
|
assert(stable_provider_group && length(stable_provider_group.outbounds) == 1 && stable_provider_group.outbounds[0] == "plain-node", "provider group removes XHTTP member");
|
||||||
assert(stable_provider_group.default == null, "stable sing-box provider URLTest removes extended-only default field");
|
assert(stable_provider_group.default == null, "stable sing-box provider URLTest removes unsupported default field");
|
||||||
let stable_urltest = outbound(xhttp_stable, "xhttp-urltest-ut_xhttp-out");
|
let stable_urltest = outbound(xhttp_stable, "xhttp-urltest-ut_xhttp-out");
|
||||||
assert(stable_urltest && length(stable_urltest.outbounds) == 1 && stable_urltest.outbounds[0] == "plain-node", "URLTest receives only compatible subscription leaves");
|
assert(stable_urltest && length(stable_urltest.outbounds) == 1 && stable_urltest.outbounds[0] == "plain-node", "URLTest receives only compatible subscription leaves");
|
||||||
let stable_priority = outbound(xhttp_stable, "xhttp-priority-pg_xhttp-out");
|
let stable_priority = outbound(xhttp_stable, "xhttp-priority-pg_xhttp-out");
|
||||||
@@ -1170,7 +1170,7 @@ assert(stable_priority && length(stable_priority.outbounds) == 1 && stable_prior
|
|||||||
|
|
||||||
let xhttp_extended = cfg("subscription-xhttp-extended");
|
let xhttp_extended = cfg("subscription-xhttp-extended");
|
||||||
assert(outbound(xhttp_extended, "xhttp-node") != null, "extended sing-box keeps XHTTP subscription leaf");
|
assert(outbound(xhttp_extended, "xhttp-node") != null, "extended sing-box keeps XHTTP subscription leaf");
|
||||||
assert(outbound(xhttp_extended, "Provider XHTTP Group").default == "xhttp-node", "extended sing-box keeps provider URLTest default");
|
assert(outbound(xhttp_extended, "Provider XHTTP Group").default == null, "extended sing-box provider URLTest also removes unsupported default field");
|
||||||
assert(outbound(xhttp_extended, "depends-on-xhttp").detour == "xhttp-node", "extended sing-box keeps XHTTP detour chain");
|
assert(outbound(xhttp_extended, "depends-on-xhttp").detour == "xhttp-node", "extended sing-box keeps XHTTP detour chain");
|
||||||
assert(outbound(xhttp_extended, "recursive-dependent").detour == "depends-on-xhttp", "extended sing-box keeps recursive detour chain");
|
assert(outbound(xhttp_extended, "recursive-dependent").detour == "depends-on-xhttp", "extended sing-box keeps recursive detour chain");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user