3x-ui/xray
MHSanaei 83799d71b0
feat(api-docs): generate response examples from Go structs; fix SS2022 PSK regen (#4996)
Stop hand-writing OpenAPI response examples, which kept drifting from the real payloads (clients/traffic missing fields, inbounds/list exposing userId which is json:"-", the fictional inbound-443 tag instead of the real in-<port>-<transport> form).

tools/openapigen now emits frontend/src/generated/examples.ts: a per-struct example instance built from type defaults, validate oneof/min bounds, and example: struct tags, with nested-ref expansion and a cycle guard. build-openapi.mjs composes the {success,obj} envelope from it for any endpoint annotated with responseSchema (+ responseSchemaArray for lists); the hand-written response is dropped for those. Service DTOs InboundOption/ApiTokenView/ProbeResultUI are added to the walker.

#4996: client password regeneration now produces a valid Shadowsocks 2022 PSK (correct base64 length per cipher) when an SS2022 inbound is attached, in both the single and bulk client forms; backend surfaces ssMethod on /inbounds/options so the UI can pick the right length.

Also: Swagger UI persists the Authorization token across reloads (persistAuthorization).
2026-06-06 14:58:15 +02:00
..
api.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
api_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
client_traffic.go feat(api-docs): generate response examples from Go structs; fix SS2022 PSK regen (#4996) 2026-06-06 14:58:15 +02:00
config.go Remove streamSettings for protocols that don't support it 2026-05-14 23:18:23 +02:00
config_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
inbound.go Remove streamSettings for protocols that don't support it 2026-05-14 23:18:23 +02:00
inbound_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
log_writer.go v3 2026-05-10 02:13:42 +02:00
online_test.go feat(nodes): multi-hop node attribution for chained sub-nodes (#4983) (#5005) 2026-06-06 12:33:39 +02:00
process.go feat(nodes): multi-hop node attribution for chained sub-nodes (#4983) (#5005) 2026-06-06 12:33:39 +02:00
process_other.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
process_test.go fix(xray): implement graceful shutdown for xray process and add tests (#4259) 2026-05-11 14:11:40 +02:00
process_windows.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
traffic.go docs: add comments for all functions 2025-09-20 09:35:50 +02:00