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:
MHSanaei
2026-05-28 02:33:13 +02:00
parent 1a096d72f1
commit 486ac9c28d
4 changed files with 28 additions and 19 deletions
@@ -116,7 +116,7 @@ function vlessFromWire(raw: Raw): VlessOutboundFormSettings {
const testseed = savedSeed.length === 4
&& savedSeed.every((n) => Number.isInteger(n) && (n as number) > 0)
? (savedSeed as number[])
: [];
: [900, 500, 900, 256];
return {
address,
port,