From e8721a207cf8de32eb1c60a020cd8e73290a3bd8 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Tue, 26 May 2026 12:08:35 +0200 Subject: [PATCH] feat(frontend): OutboundFormModal.new.tsx DNS + Freedom + VLESS reverse-sniffing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DNS: rewriteNetwork (udp/tcp Select) + rewriteAddress + rewritePort + userLevel + rules Form.List (action/qtype/domain). - Freedom: domainStrategy + redirect + Fragment Switch with conditional 4-field sub-block (legacy 'enable Fragment' UX preserved — Switch sets all four fields to populated defaults, off-state empties them all out so the adapter strips them on submit) + Noises Form.List (rand/base64/ str/hex types, packet/delay/applyTo per row) + Final Rules Form.List with conditional block-delay sub-field. - VLESS reverse-sniffing slice: rendered only when reverseTag is set (matches the legacy modal's nested conditional). All six fields wired to the form state with appropriate widgets (Switch / Select multi / Select tags). --- .../src/pages/xray/OutboundFormModal.new.tsx | 386 ++++++++++++++++++ 1 file changed, 386 insertions(+) diff --git a/frontend/src/pages/xray/OutboundFormModal.new.tsx b/frontend/src/pages/xray/OutboundFormModal.new.tsx index 9eb42cb8..a4ab1232 100644 --- a/frontend/src/pages/xray/OutboundFormModal.new.tsx +++ b/frontend/src/pages/xray/OutboundFormModal.new.tsx @@ -30,7 +30,10 @@ import { type OutboundFormValues, } from '@/schemas/forms/outbound-form'; import { + DNSRuleActions, + OutboundDomainStrategies, OutboundProtocols as Protocols, + SNIFFING_OPTION, TLS_FLOW_CONTROL, USERS_SECURITY, WireguardDomainStrategy, @@ -366,6 +369,389 @@ export default function OutboundFormModalNew({ )} + {protocol === 'dns' && ( + <> + + + + + + + + + + + {(fields, { add, remove }) => ( + <> + +