mirror of
https://github.com/fscarmen/sing-box.git
synced 2026-08-10 17:55:16 +08:00
fix: add explicit action:route to custom warp-ep route rules (#330)
This commit is contained in:
+3
-3
@@ -1281,7 +1281,7 @@ custom_route_compact_rules() {
|
||||
(if (($domains | length) + ($sets | length)) > 0 then
|
||||
[((if ($sets | length) > 0 then {rule_set:$sets} else {} end)
|
||||
+ (if ($domains | length) > 0 then {domain_suffix:$domains} else {} end)
|
||||
+ {outbound:"warp-ep"})]
|
||||
+ {action:"route", outbound:"warp-ep"})]
|
||||
else [] end)
|
||||
)
|
||||
' "$CUSTOM_FILE" > "$TMP_FILE" && mv "$TMP_FILE" "$CUSTOM_FILE"
|
||||
@@ -1436,7 +1436,7 @@ custom_route_add() {
|
||||
(if (($new_domains | length) + ($new_sets | length)) > 0 then
|
||||
[((if ($new_sets | length) > 0 then {rule_set:$new_sets} else {} end)
|
||||
+ (if ($new_domains | length) > 0 then {domain_suffix:$new_domains} else {} end)
|
||||
+ {outbound:$out})]
|
||||
+ {action:"route", outbound:$out})]
|
||||
else [] end)
|
||||
)
|
||||
' "$CUSTOM_FILE" > "$TMP_FILE" && mv "$TMP_FILE" "$CUSTOM_FILE"
|
||||
@@ -1474,7 +1474,7 @@ custom_route_add() {
|
||||
(if (($new_domains | length) + ($new_sets | length)) > 0 then
|
||||
[((if ($new_sets | length) > 0 then {rule_set:$new_sets} else {} end)
|
||||
+ (if ($new_domains | length) > 0 then {domain_suffix:$new_domains} else {} end)
|
||||
+ {outbound:$out})]
|
||||
+ {action:"route", outbound:$out})]
|
||||
else [] end)
|
||||
)
|
||||
' "$CUSTOM_FILE" > "$TMP_FILE" && mv "$TMP_FILE" "$CUSTOM_FILE"
|
||||
|
||||
Reference in New Issue
Block a user