mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-12 06:10:58 +00:00
feat(inbounds): expose Vision testseed field with sensible default
Add a "Vision testseed" form item to the inbound modal for TCP + TLS/reality inbounds, normalized to positive integers and defaulting to [900,500,900,256]. Apply the same default in the outbound form adapter when no valid saved seed is present. Replace the http/mixed snapshot assertions in inbound-defaults with explicit field checks so generated credentials don't break the snapshots.
This commit is contained in:
@@ -1428,6 +1428,21 @@ export default function InboundFormModal({
|
||||
{t('pages.inbounds.vlessAuthSelected', { auth: selectedVlessAuth })}
|
||||
</Text>
|
||||
</Form.Item>
|
||||
{network === 'tcp' && (security === 'tls' || security === 'reality') && (
|
||||
<Form.Item
|
||||
label="Vision testseed"
|
||||
name={['settings', 'testseed']}
|
||||
initialValue={[900, 500, 900, 256]}
|
||||
normalize={(v: unknown) =>
|
||||
Array.isArray(v)
|
||||
? v.map((x) => Number(x)).filter((n) => Number.isInteger(n) && n > 0)
|
||||
: []
|
||||
}
|
||||
extra="Applies only to clients using the xtls-rprx-vision flow; ignored otherwise."
|
||||
>
|
||||
<Select mode="tags" tokenSeparators={[',', ' ']} placeholder="four positive integers" />
|
||||
</Form.Item>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user