fix: more fixes
This commit is contained in:
23 files changed
+207
-146
No files matched your search
@@ -16,7 +16,7 @@
|
||||
|
||||
{
|
||||
assertions = [
|
||||
# -- routing rule entries with domains and geoips preserve both matchers --
|
||||
# -- routing rule entries with domains and geoips preserve both matchers, and the named outbound --
|
||||
(
|
||||
assert builtins.length routingOrDomainRules == 1;
|
||||
true
|
||||
@@ -26,11 +26,11 @@
|
||||
true
|
||||
)
|
||||
(
|
||||
assert (builtins.head routingOrDomainRules).outbound == "proxy";
|
||||
assert (builtins.head routingOrDomainRules).outbound == "primary";
|
||||
true
|
||||
)
|
||||
(
|
||||
assert (builtins.head routingOrGeoIPRules).outbound == "proxy";
|
||||
assert (builtins.head routingOrGeoIPRules).outbound == "primary";
|
||||
true
|
||||
)
|
||||
|
||||
|
||||
@@ -92,9 +92,9 @@ in
|
||||
assert pkgs.lib.hasInfix "--backend xray" hybridStartScript;
|
||||
assert pkgs.lib.hasInfix "_proxy_suite_add_xray_sidecar_ob" hybridStartScript;
|
||||
assert pkgs.lib.hasInfix "hybrid XRay json sidecar" hybridXrayRawStartScript;
|
||||
assert pkgs.lib.hasInfix ''{type:"socks",tag:$tag,server:"127.0.0.1"'' hybridXrayRawStartScript;
|
||||
assert pkgs.lib.hasInfix "udp:true" hybridXrayRawStartScript;
|
||||
assert pkgs.lib.hasInfix "routing_mark:2" hybridXrayRawStartScript;
|
||||
assert pkgs.lib.hasInfix ''{type: "socks", tag: $tag, server: "127.0.0.1"'' hybridXrayRawStartScript;
|
||||
assert pkgs.lib.hasInfix "udp: true" hybridXrayRawStartScript;
|
||||
assert pkgs.lib.hasInfix "{routing_mark: 2}" hybridXrayRawStartScript;
|
||||
assert pkgs.lib.hasInfix "sing_box_preserved_rules" hybridBackendJqFilter;
|
||||
assert pkgs.lib.hasInfix "xray-dns-in" hybridBackendJqFilter;
|
||||
assert pkgs.lib.hasInfix "--backend hybrid" hybridSubscriptionStartScript;
|
||||
@@ -103,7 +103,7 @@ in
|
||||
''type == "object" and (.singBox | type == "array") and (.xray | type == "array")''
|
||||
hybridSubscriptionStartScript;
|
||||
assert pkgs.lib.hasInfix ".singBox" hybridSubscriptionStartScript;
|
||||
assert pkgs.lib.hasInfix ".xray[]" hybridSubscriptionStartScript;
|
||||
assert pkgs.lib.hasInfix "_proxy_suite_add_xray_sidecar_obs \"$(" hybridSubscriptionStartScript;
|
||||
assert pkgs.lib.hasInfix "_proxy_suite_add_xray_sidecar_ob" hybridSubscriptionStartScript;
|
||||
true
|
||||
)
|
||||
|
||||
@@ -73,12 +73,12 @@ in
|
||||
true
|
||||
)
|
||||
|
||||
# selection=first renames the pinned outbound - or the first one, absent a
|
||||
# pin - to "proxy" at start, rather than collapsing at eval time.
|
||||
# selection=first puts "proxy" in front of the pinned outbound - or the first one,
|
||||
# absent a pin - at start, keeping every tag for rules that name one.
|
||||
(
|
||||
assert pkgs.lib.hasInfix ''PROXY_TAG="$PINNED_OUTBOUND"'' subscriptionFirstSelectionStartScript;
|
||||
assert
|
||||
pkgs.lib.hasInfix ''map(if .tag == $t then .tag = "proxy" else . end''
|
||||
pkgs.lib.hasInfix ''[{type:"selector",tag:"proxy",outbounds:[$t],default:$t}] + .''
|
||||
subscriptionFirstSelectionStartScript;
|
||||
true
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user