From b078d576929fc53fab78e991ac1dd245f784e990 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 8 May 2026 17:29:50 +0200 Subject: [PATCH] feat(frontend): add FinalMask UI (TCP/UDP masks + QUIC params) to inbound and outbound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors web/html/form/stream/stream_finalmask.html as a shared FinalMaskForm component used by both modals — they share the same StreamSettings shape (addTcpMask/addUdpMask/finalmask/enableQuicParams) so a single template handles both. Surfaces: - TCP masks for raw/tcp/httpupgrade/ws/grpc/xhttp networks: fragment, sudoku, and header-custom (with the 2D clients/servers groups, each row supporting array/str/hex/base64 packets and a randomize button for base64). - UDP masks for hysteria protocol or kcp network: hysteria gets just salamander; kcp gets the full type list (mkcp variants, header-*, xdns/xicmp, header-custom with flat client/server lists, and noise). Switching to xdns shrinks the kcp MTU to 900 to match the legacy panel's behavior. - QUIC Params for hysteria or xhttp: congestion (incl. brutal up/down fields), debug, UDP hop ports/interval, idle/keepalive timeouts, path-MTU discovery toggle, and the four receive-window tunables. Co-Authored-By: Claude Opus 4.7 --- frontend/src/components/FinalMaskForm.vue | 544 ++++++++++++++++++ .../src/pages/inbounds/InboundFormModal.vue | 6 +- frontend/src/pages/xray/OutboundFormModal.vue | 6 +- 3 files changed, 554 insertions(+), 2 deletions(-) create mode 100644 frontend/src/components/FinalMaskForm.vue diff --git a/frontend/src/components/FinalMaskForm.vue b/frontend/src/components/FinalMaskForm.vue new file mode 100644 index 00000000..23856b90 --- /dev/null +++ b/frontend/src/components/FinalMaskForm.vue @@ -0,0 +1,544 @@ + + + diff --git a/frontend/src/pages/inbounds/InboundFormModal.vue b/frontend/src/pages/inbounds/InboundFormModal.vue index e8f54af6..fb38f197 100644 --- a/frontend/src/pages/inbounds/InboundFormModal.vue +++ b/frontend/src/pages/inbounds/InboundFormModal.vue @@ -29,6 +29,7 @@ import { MODE_OPTION, } from '@/models/inbound.js'; import { DBInbound } from '@/models/dbinbound.js'; +import FinalMaskForm from '@/components/FinalMaskForm.vue'; const { t } = useI18n(); @@ -1509,6 +1510,9 @@ watch( + + + @@ -1557,7 +1561,7 @@ watch( diff --git a/frontend/src/pages/xray/OutboundFormModal.vue b/frontend/src/pages/xray/OutboundFormModal.vue index bd4f3eb2..080b9400 100644 --- a/frontend/src/pages/xray/OutboundFormModal.vue +++ b/frontend/src/pages/xray/OutboundFormModal.vue @@ -20,6 +20,7 @@ import { MODE_OPTION, DNSRuleActions, } from '@/models/outbound.js'; +import FinalMaskForm from '@/components/FinalMaskForm.vue'; const { t } = useI18n(); @@ -27,7 +28,7 @@ const { t } = useI18n(); // web/html/form/outbound.html. Covers every protocol + transport // combination the legacy panel exposes; the JSON tab still lets // power-users hand-edit fields the structured form doesn't surface -// (deep finalmask/quic tuning, reverse-sniffing, etc.). +// (reverse-sniffing, exotic outbound DNS rules, etc.). const props = defineProps({ open: { type: Boolean, default: false }, @@ -740,6 +741,9 @@ function regenerateWgKeys() { + + +