feat(settings): add Block tab for JSON subscription routing rules (#6466)

* feat(settings): add Block tab for JSON subscription routing rules

Expose the existing blackhole outbound in the subscription formats UI so
operators can add block domain/IP rules without editing subJsonRules by
hand. Scope Direct/Block helpers by outboundTag so the tabs keep separate
rule objects, and keep block rules ahead of direct for Xray match order.

* fix(settings): preserve rule order and clear foreign leftovers

Stop sorting the whole subJsonRules array on every write. Prepend block
defaults only when enabling Block. Clearing the last managed tag also
drops foreign-tag leftovers so the panel can reach an empty setting.
Fixes oxfmt on SubscriptionFormatsTab.

---------

Co-authored-by: mrchatam <287639636+mrchatam@users.noreply.github.com>
This commit is contained in:
mrchatam
2026-09-12 12:44:56 +03:30
committed by GitHub
parent 51e0afdd90
commit b332d88438
14 changed files with 124 additions and 46 deletions
+2
View File
@@ -1293,6 +1293,8 @@
"muxSett": "マルチプレクサ設定",
"direct": "直接接続",
"directDesc": "特定の国のドメインまたはIP範囲に直接接続する",
"block": "接続をブロック",
"blockDesc": "blackholeアウトバウンドを使用して、選択したドメインまたはIP範囲への接続をブロックします。",
"notifications": "通知",
"certs": "証明書",
"externalTraffic": "外部トラフィック",