3x-ui/frontend/src/schemas
MHSanaei 5c902ca298
feat(frontend): inbound Hysteria stream sub-form (auth + udpIdleTimeout + masquerade)
Restore the inbound side of Hysteria stream configuration that was
previously hidden — the legacy modal exposed these knobs but the
Pattern A rewrite gated them out.

schemas/protocols/stream/hysteria.ts:
- HysteriaMasqueradeSchema covers the inbound-only masquerade wire
  shape: type ('proxy'|'file'|'string'), dir, url, rewriteHost,
  insecure, content, headers, statusCode. The three masquerade types
  cover the spectrum: reverse-proxy upstream, serve static files, or
  return a fixed string body.
- HysteriaStreamSettingsSchema gains 3 inbound-side optional fields:
  protocol, udpIdleTimeout, masquerade. Outbound side is untouched
  (the legacy class accepted both wire shapes via the same struct).

InboundFormModal.tsx:
- New hysteria stream sub-form section in streamTab, gated by
  protocol === HYSTERIA. Fields: version (disabled, locked to 2),
  auth, udpIdleTimeout, masquerade Switch + nested type-Select with
  three conditional sub-blocks (proxy URL+rewriteHost+insecure,
  file dir, string statusCode+body+headers).
- onValuesChange cascade: switching TO hysteria seeds streamSettings
  with the hysteria branch (forcing network='hysteria' + TLS); switching
  AWAY from hysteria snaps back to TCP so the standard network
  selector has a valid starting point.

masquerade headers use the HeaderMapEditor v1 component.
2026-05-26 13:44:00 +02:00
..
api feat(frontend): stream extras + full InboundSchema with DU intersection 2026-05-26 00:00:34 +02:00
forms feat(frontend): outbound form schema + wire adapter foundation 2026-05-26 11:58:36 +02:00
primitives refactor(frontend): swap InboundFormModal option dicts to schemas/primitives 2026-05-26 01:14:05 +02:00
protocols feat(frontend): inbound Hysteria stream sub-form (auth + udpIdleTimeout + masquerade) 2026-05-26 13:44:00 +02:00
_envelope.ts feat(frontend): add Zod runtime validation at API boundary 2026-05-25 16:02:27 +02:00
client.ts feat(frontend): migrate five secondary form modals to Zod schemas 2026-05-25 17:45:02 +02:00
defaults.ts feat(frontend): extend Zod validation to remaining query/mutation hooks 2026-05-25 16:14:00 +02:00
inbound.ts feat(frontend): schema-guard Inbound and Outbound form submits 2026-05-25 18:10:24 +02:00
index.ts feat(frontend): protocol-leaf Zod schemas with discriminated unions 2026-05-25 23:02:08 +02:00
login.ts feat(frontend): migrate five secondary form modals to Zod schemas 2026-05-25 17:45:02 +02:00
node.ts feat(frontend): drive form validation from Zod schemas 2026-05-25 16:41:56 +02:00
setting.ts feat(frontend): block invalid settings saves with Zod pre-save check 2026-05-25 17:55:21 +02:00
status.ts feat(frontend): add Zod runtime validation at API boundary 2026-05-25 16:02:27 +02:00
xray.ts feat(frontend): schema-guard Inbound and Outbound form submits 2026-05-25 18:10:24 +02:00