3x-ui/frontend/src
Sanaei bc424f0968
fix(xray): stop a lone dns qType 0 from matching every query
The core reads a dns rule's qType as a PortList, which drops a bare numeric
0 (infra/conf/common.go: `if number != 0`), and a rule with no qTypes
matches every query. A stored `"qType": 0` therefore does not target query
type 0: it drops, refuses or hijacks all DNS through that outbound.

A qType the panel writes has to be read by the core as exactly the query
types it names. Four writers broke that:

- DNSOutboundLegacyKeysFix rewrote a lone blockTypes [0] into "qType": 0,
  so "block type 0" became "block everything" on upgrade.
- That seeder shipped in v3.8.0 and is recorded as done, so fixing it does
  not reach installs that already ran it. DNSOutboundQTypeZeroFix spells
  any stored numeric qType 0 as "0" once, protocol id matched like the core.
- The outbound form adapter turned a typed "0" into the number 0.
- The Xray template editor saves raw JSON past that adapter; the save now
  applies the same rewrite.

Each writer is pinned by a test that fails without its part. The rewrite
and the repair compare policies as the pinned core builds them, and the
repair runs through runSeeders over a database whose legacy-keys seeder
already ran, on SQLite and PostgreSQL 16.
2026-09-15 16:00:05 +02:00
..
api fix(panel): read outbound protocol ids case-insensitively everywhere (#6523) 2026-09-14 15:02:58 +02:00
components feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
entries fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
generated feat(sub): add opt-in month-end expiry presentation (#6517) 2026-09-14 12:10:25 +02:00
hooks fix(panel): probe UDP outbounds and hide the block outbound from the mtproto egress picker (#6525) 2026-09-14 16:00:13 +02:00
i18n fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
layouts feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
lib fix(xray): stop a lone dns qType 0 from matching every query 2026-09-15 16:00:05 +02:00
models feat(sub): add opt-in month-end expiry presentation (#6517) 2026-09-14 12:10:25 +02:00
pages fix(xray): refuse a config the running core cannot bind (#6547) 2026-09-15 15:27:28 +03:00
schemas fix(panel): read outbound protocol ids case-insensitively everywhere (#6523) 2026-09-14 15:02:58 +02:00
styles Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00
test fix(xray): stop a lone dns qType 0 from matching every query 2026-09-15 16:00:05 +02:00
utils fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
env.d.ts
main.tsx chore(deps): migrate to react-router 8 and refresh frontend dependencies 2026-07-25 02:07:15 +02:00
queryClient.ts
routes.tsx Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00