From 7550072c7b318189caa5fa25a8b5eb584e7cbec0 Mon Sep 17 00:00:00 2001 From: Kuzz007 Date: Sun, 2 Aug 2026 20:20:42 +0300 Subject: [PATCH] feat(amneziawg): remove the vestigial routeThroughXray toggle from the UI Hard cutover, part 4: the embedded path has no opt-in gate for Xray routing at all (every peer's traffic already goes through Xray's own SOCKS5 relay unconditionally -- see xray.go's injectAmneziawgnetSocks), so a toggle that no longer does anything would just confuse admins. Removed from the form (amneziawg.tsx), the per-protocol Zod schema and its new-inbound default, and the routeThroughXray/routeThroughXrayHint i18n strings across all 13 locales. The Go-side field stays (see internal/amneziawg's ServerSettings/Instance, already annotated as vestigial in the previous commit) for backward compatibility with existing stored settings -- z.object's default unknown-key stripping means the form simply drops it from an existing inbound's settings on its next save, no migration needed. Co-Authored-By: Claude Sonnet 5 --- frontend/src/lib/xray/inbound-defaults.ts | 1 - .../pages/inbounds/form/protocols/amneziawg.tsx | 8 -------- .../src/schemas/protocols/inbound/amneziawg.ts | 14 ++++++++++---- internal/web/translation/ar-EG.json | 2 -- internal/web/translation/en-US.json | 2 -- internal/web/translation/es-ES.json | 2 -- internal/web/translation/fa-IR.json | 2 -- internal/web/translation/id-ID.json | 2 -- internal/web/translation/ja-JP.json | 2 -- internal/web/translation/pt-BR.json | 2 -- internal/web/translation/ru-RU.json | 2 -- internal/web/translation/tr-TR.json | 2 -- internal/web/translation/uk-UA.json | 2 -- internal/web/translation/vi-VN.json | 2 -- internal/web/translation/zh-CN.json | 2 -- internal/web/translation/zh-TW.json | 2 -- 16 files changed, 10 insertions(+), 39 deletions(-) diff --git a/frontend/src/lib/xray/inbound-defaults.ts b/frontend/src/lib/xray/inbound-defaults.ts index 51682fdf0..6098e5b16 100644 --- a/frontend/src/lib/xray/inbound-defaults.ts +++ b/frontend/src/lib/xray/inbound-defaults.ts @@ -298,7 +298,6 @@ export function createDefaultAmneziawgInboundSettings(): AmneziawgInboundSetting ipv6Enabled: false, ipv6Subnet: '', ipv6ExternalInterface: '', - routeThroughXray: false, jc: 5, jmin: 10, jmax: 50, diff --git a/frontend/src/pages/inbounds/form/protocols/amneziawg.tsx b/frontend/src/pages/inbounds/form/protocols/amneziawg.tsx index 60680ccd7..76da588e6 100644 --- a/frontend/src/pages/inbounds/form/protocols/amneziawg.tsx +++ b/frontend/src/pages/inbounds/form/protocols/amneziawg.tsx @@ -68,14 +68,6 @@ export default function AmneziawgFields({ awgPubKey, regenInboundAwg, regenInbou > - - -