From bade1fcef6c931adc0bf261d2ade531801ed16c9 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Fri, 12 Jun 2026 09:04:17 +0200 Subject: [PATCH] feat(ui): allow custom fragment packets ranges, not just presets (#5075) The fragment "packets" field was a locked dropdown (tlshello / 1-3 / 1-5) in both the finalmask TCP-mask form and the Freedom outbound form, while xray-core accepts any "n-m" packet range. Replace both with an AutoComplete that keeps the presets as suggestions and validates free input as "tlshello" or a numeric range. --- .../xray/forms/transport/FinalMaskForm.tsx | 21 ++++++++++++++++--- .../xray/outbounds/protocols/freedom.tsx | 18 +++++++++++++--- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx b/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx index ee9a1edb0..83e3154d2 100644 --- a/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx +++ b/frontend/src/lib/xray/forms/transport/FinalMaskForm.tsx @@ -1,4 +1,4 @@ -import { Button, Divider, Form, Input, InputNumber, Select, Space, Switch } from 'antd'; +import { AutoComplete, Button, Divider, Form, Input, InputNumber, Select, Space, Switch } from 'antd'; import { DeleteOutlined, PlusOutlined, ReloadOutlined } from '@ant-design/icons'; import type { FormInstance } from 'antd/es/form'; import type { NamePath } from 'antd/es/form/interface'; @@ -205,13 +205,18 @@ function TcpMaskItem({ if (type === 'fragment') { return ( <> - -