feat(happ): add routing editor, optional ad blocking, and LAN bypass preset (#6545)

* feat(happ): make ad blocking optional in routing presets

Add an independent AdBlock toggle for Iran, China, and global presets, applied only when generating routing rules. Update the China preset to Bypass-CN and cover preset behavior and localized controls.

* feat: add visual routing editor with JSON support and localization updates

- Implemented a new modal for editing routing profiles with basic and advanced tabs.
- Added functionality to load, parse, and generate routing profiles in JSON format.
- Enhanced user experience with validation and error handling for JSON input.
- Updated translations for Russian, Turkish, Ukrainian, Vietnamese, Chinese (Simplified and Traditional) to include new routing editor terms.
- Created helper functions for managing routing profiles and generating deep links.
- Added unit tests for routing editor functionalities and JSON handling.

* feat: update routing editor to preserve null lists in profiles and enhance validation messages
This commit is contained in:
NgaiYeanCoi
2026-09-27 04:57:01 +08:00
committed by GitHub
parent 94fa317e76
commit 5e15120cec
22 changed files with 1363 additions and 209 deletions
+15 -4
View File
@@ -1572,9 +1572,11 @@
"subHappPerAppList": "Android パッケージ名",
"subHappPerAppListDesc": "対象または除外する Android アプリのパッケージ名をカンマ区切りで指定します (例: org.telegram.messenger)。",
"subHappPresetIran": "イラン向けバイパス",
"subHappPresetChina": "中国向け直接接続",
"subHappPresetAdblock": "AdBlock",
"subHappPresetChina": "中国向け直接接続 (Bypass-CN)",
"subHappIncludeAdblock": "AdBlock を追加",
"subHappApplyPreset": "プリセットを適用",
"subHappPresetGlobal": "フルプロキシ",
"subHappPresetLocal": "ローカルネットワークを除く全通信をプロキシ経由",
"subHappPresetOff": "ルーティングを無効化 (happ://routing/off)",
"subHappColorBlue": "ブルー (標準 / デフォルト)",
"subHappColorGreen": "グリーン (成功)",
@@ -1598,9 +1600,18 @@
"subHappPerAppBypass": "バイパス (リストされたアプリを除外)",
"subHappPresetApplied": "Happ プリセットをルーティングルールに適用しました",
"subHappPresets": "ルーティングプリセット",
"subHappPresetsDesc": "Happ クライアント向けに事前設定されたルーティングルールのプリセット。",
"subHappPresetsDesc": "基本プリセットと広告ブロックの有無を選択し、適用して現在のルーティングルールを置き換えます。",
"subHappVisualBuilder": "ビジュアルルールジェネレーター",
"subHappVisualBuilderDesc": "ドメインと IP のリストからカスタムルーティングのディープリンクを作成します。",
"subHappVisualBuilderDesc": "現在のルーティングプロファイルを読み込み、ルールまたは JSON 全体を編集します。",
"subHappEditorBasic": "基本ルール",
"subHappEditorAdvanced": "詳細エディター",
"subHappEditorListHint": "1 行に 1 つのルールを入力します。プロファイルのほかの項目は保持されます。",
"subHappEditorAdvancedHint": "JSON プロファイル全体を編集します。変更は基本ルールタブと同期されます。",
"subHappEditorInvalidJson": "JSON オブジェクトを入力してください。ルーティングリストがある場合は、文字列の配列または null にする必要があります。",
"subHappEditorLoadInvalid": "現在のルールは、有効な Happ ルーティングリンクまたは JSON プロファイルではありません。",
"subHappEditorLoadRemote": "ここではリモート URL を読み込めません。先に Happ ルーティングリンクまたは JSON プロファイルを貼り付けてください。",
"subHappEditorLoadOff": "ルーティングは無効です。プリセットを適用するか、ルーティングルールを空にしてプロファイルを作成してください。",
"subHappEditorNew": "現在のルールはありません。空のカスタムプロファイルから作成を始めます。",
"subHappBuildDeeplink": "ディープリンクを生成",
"subHappModalTitle": "Happ ビジュアルルーティングルールジェネレーター",
"subHappDirectDomains": "直接接続するドメイン (バイパス)",