3x-ui/frontend/src/test
Sanaei dc6a16019e fix(xray): reject configs xray-core refuses, and check the fixtures against it
The frontend's golden fixtures are the panel's model of an xray config, but
nothing ever asked xray-core whether it would accept them: the snapshots only
prove the Zod schemas agree with themselves. Building every fixture through the
same config builders the panel hands its config to — conf.InboundDetourConfig
for the full-config and AddInbound paths, conf.RouterConfig for
ApplyRoutingConfig, conf.DNSConfig for the dns section — found seven the core
refuses, three of them reachable from the panel's own UI. A refusal is not
scoped to one inbound: the config fails to load and every inbound stays down.

Hysteria: xray-core builds version 2 only, in both the protocol settings and
the transport settings, but the inbound settings schema accepted any version
from 1 up and its comment claimed upstream still supported v1. Both fixtures
carried version 1. The schema now pins 2, GenXrayInboundConfig heals stored
rows on the way out the way it already heals shadowsocks ciphers and wireguard
peers, and the share link drops the dead hysteria:// scheme — the subscription
server already emitted hysteria2:// for the same inbound.

XHTTP uplinkDataPlacement: both transport forms offered "query", which the core
has never accepted for that field (auto and body always, cookie and header in
packet-up mode). Replaced with auto, which was missing, and the default label
now names auto rather than body.

FinalMask items: switching an item to the rand-driven array kind wrote
packet:[] next to the rand. xray-core counts an empty array as a packet and
every item kind is exclusive, so noise answers "len(item.Packet) > 0 &&
item.Rand.To > 0" and header-custom "exactly one item kind must be set". The
editor now clears the packet, and GetXrayConfig strips the residue from rows
already saved with it.

The remaining four were stale fixtures: an xmc mask still on the usernames
shape v26.7.28 replaced with profiles, a fragment mask with no length, and
header-custom and noise items passing an array to the string packet kind — all
shapes the panel's own editors cannot produce.

golden_fixtures_xray_test.go keeps this from drifting again: every fixture in
every category is built through xray-core on each run, with a self-signed pair
standing in for the deployment certificate paths, so the next core bump reports
which fixture it broke.
2026-07-28 14:43:55 +02:00
..
__snapshots__ fix(xray): reject configs xray-core refuses, and check the fixtures against it 2026-07-28 14:43:55 +02:00
golden/fixtures fix(xray): reject configs xray-core refuses, and check the fixtures against it 2026-07-28 14:43:55 +02:00
msw Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
api-token-date.test.tsx fix(settings): require re-2FA confirmation for sensitive setting changes (#5610) 2026-06-28 15:17:15 +02:00
balancer-form-modal.test.tsx feat(balancer): add balancer-to-balancer fallback support (#5586) 2026-07-09 01:59:51 +02:00
balancer-loopback.test.ts fix(balancer): pin loopback routing rules ahead of general rules (#6054) 2026-07-21 15:48:34 +02:00
balancer-observatory-sync.test.ts fix(balancers): keep mixed strategies on one observer (#5674) 2026-07-02 18:18:30 +02:00
balancer.test.ts
basics-happy-eyeballs.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
client-card-comment.test.tsx feat(frontend): show client comments on mobile cards (#5942) 2026-07-14 12:59:55 +02:00
client-form-flow.test.tsx fix(clients): keep VLESS xtls-rprx-vision flow when inbound options reload (#5971) 2026-07-21 15:58:25 +02:00
client-form-modal.test.tsx [Feature]: Add a tooltip/hint to the "Password" field in the client form clarifying which protocols use it (#5809) 2026-07-07 14:43:09 +02:00
client-total-bytes.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
client-traffic-display.test.ts feat(clients): restore traffic usage progress bars on Clients page (#5150) 2026-06-11 12:10:49 +02:00
clients-summary.test.ts fix(clients): keep the summary card live without a page refresh 2026-06-01 06:10:25 +02:00
dns-presets.test.ts Add encrypted DNS presets (#5837) 2026-07-09 00:45:35 +02:00
dns.test.ts fix: stop forcing port 53 on DoH/DoQ DNS server entries (#5950) 2026-07-14 12:55:10 +02:00
finalmask.test.ts feat(xray): update xray-core to v26.7.28 and adapt panel 2026-07-28 13:14:06 +02:00
format-validation-error.test.ts
generated-examples.test.ts feat(api-docs): generate OpenAPI components/schemas from Go structs 2026-06-06 16:22:21 +02:00
headers.test.ts
host-link.test.ts fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
host-schema.test.ts fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
http-init-msw.test.ts Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
http-init.test.tsx refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
httpUtil.test.ts Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
inbound-defaults.test.ts feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
inbound-form-adapter.test.ts Bug-label issue sweep: 16 fixes (#6083) 2026-07-23 15:34:42 +02:00
inbound-form-blocks.test.tsx Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
inbound-form-modal.test.tsx fix: resolve a batch of open bug-tagged issues (traffic accounting, share strategy, sub address, CPU) (#5477) 2026-06-22 00:22:28 +02:00
inbound-from-db.test.ts fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
inbound-full.test.ts
inbound-link.test.ts fix(wireguard): preserve all Allowed IPs in share link, .conf, and subscription (#6051) 2026-07-21 15:50:16 +02:00
inbound-tag.test.ts fix(inbounds): drop listen address from auto-generated inbound tag 2026-06-01 09:33:49 +02:00
link-label.test.ts feat(mtproto): adopt dolonet/mtg-multi and make MTProto inbounds multi-client 2026-07-06 16:04:32 +02:00
log-parse.test.ts fix(mtproto): reap orphaned mtg, fix SysLog viewer, mtg log visibility, export remark (#5105) (#5107) 2026-06-09 04:01:33 +02:00
mtproto-clients-link.test.ts fix(mtproto): drop the remark fragment from tg proxy deep links 2026-07-06 17:55:35 +02:00
node-list-rowkey.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
observatory-settings-tab.test.tsx fix(balancers): keep mixed strategies on one observer (#5674) 2026-07-02 18:18:30 +02:00
outbound-defaults.test.ts refactor(wireguard): drop removed workers field (xray v26.6.22) (#5509) 2026-06-23 16:23:02 +02:00
outbound-form-adapter.test.ts fix(xhttp): stop XMUX maxConcurrency from reverting on save 2026-07-11 20:43:47 +02:00
outbound-form-modal.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
outbound-link-parser.test.ts Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
outbound-tag-rename.test.ts fix(xray): sync routing rules when outbound tag is renamed (#5006) 2026-06-08 20:30:41 +02:00
outbounds-loopback-index.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
panel-version.test.ts feat(panel): surface dev-build version in UI, bot, and CLI 2026-06-25 02:36:41 +02:00
protocol-capabilities.test.ts
protocols.test.ts Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
remark-template-field.test.tsx feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
remark-variables.test.ts feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
rhf-form-field.test.tsx Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
routing-default-outbound.test.ts feat(xray): default outbound in basic routing (#5815) 2026-07-09 01:55:47 +02:00
routing-loopback-index.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
routing-reference-cleanup.test.ts fix(balancers): keep mixed strategies on one observer (#5674) 2026-07-02 18:18:30 +02:00
rule-form-preserve-fields.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
rule.test.ts
security.test.ts fix(reality): load dest as target alias so existing inbounds aren't wiped (#5295) 2026-06-15 00:25:10 +02:00
setting-ldap-skip-verify.test.ts feat: ldap skip tls verify (#5637) 2026-06-28 18:10:38 +02:00
setting-sub-updates.test.ts fix(ui): align the subUpdates limit with the backend and show the range 2026-07-05 20:12:21 +02:00
setup.components.ts refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
setup.msw.ts Frontend dev tooling (Husky, lint-staged, MSW, Storybook) + full React Hook Form migration (#5859) 2026-07-08 13:28:37 +02:00
setup.ts
size-formatter.test.ts feat(ui): show per-inbound live speed (#5261) 2026-06-14 22:39:40 +02:00
sniffing-field-resync.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
sockopt.test.ts
speed-tag-stable.test.tsx fix(frontend): stabilize speed tags on inbound and client pages (#5930) 2026-07-14 13:00:25 +02:00
spider-x.test.ts feat(reality): derive a stable per-client spiderX for shared links 2026-07-02 12:53:08 +02:00
stream-wire-normalize.test.ts feat(xray): update xray-core to v26.7.28 and adapt panel 2026-07-28 13:14:06 +02:00
stream.test.ts feat(xray): update xray-core to v26.7.11 and adapt panel 2026-07-12 00:30:47 +02:00
subscription-general-tab.test.tsx chore(deps): migrate to react-router 8 and refresh frontend dependencies 2026-07-25 02:07:15 +02:00
test-utils.tsx
tunnel-rewriteport.test.ts fix(inbounds): accept null rewritePort in tunnel settings (#5516) (#5525) 2026-06-24 12:54:05 +02:00
vless-encryption.test.ts fix(web): sync the VLESS generate-key dropdown with the encryption field 2026-07-02 17:37:04 +02:00
warp-change-ip.test.ts fix(warp): preserve outbound customization when rotating IP (#6052) 2026-07-21 15:50:00 +02:00
websocket-bridge-outbounds.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
websocket-shared-client.test.tsx Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
wireguard-client-config.test.ts fix(panel): use the hosting node address for WireGuard client configs (#5679) 2026-07-03 01:12:32 +02:00
wireguard-clients-link.test.ts feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
xhttp-session-id.test.ts feat(xhttp): support sessionID* rename + sessionIDTable/Length (xray v26.6.22) (#5506) 2026-06-23 17:38:16 +02:00