3x-ui/internal/web
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
..
controller fix(logs): standardize logs (#6484) 2026-09-13 21:52:18 +02:00
entity feat(sub): add opt-in month-end expiry presentation (#6517) 2026-09-14 12:10:25 +02:00
global
job fix(limit-ip): leave a reverse client out of the temporary disconnect (#6553) 2026-09-15 16:57:23 +03:00
locale feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
middleware fix(web): tighten database restore body-cap exemption (#5609) 2026-06-28 15:00:55 +02:00
network style: format struct literals and whitespace 2026-08-24 00:06:01 +02:00
runtime perf(nodes): reuse one pooled client per node instead of rebuilding it (#6548) 2026-09-15 15:29:49 +03:00
service fix(xray): stop a lone dns qType 0 from matching every query 2026-09-15 16:00:05 +02:00
session
translation fix(xray): restart when a diff strands a client's live session (#6550) 2026-09-15 15:39:40 +03:00
websocket fix(nodes): keep the credential-presence flag on the node heartbeat push 2026-07-28 17:38:46 +02:00
cadence_test.go Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
routes_contract_test.go docs(api): align OpenAPI with runtime contracts (#6409) 2026-09-04 15:23:41 +02:00
web.go feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
web_mtls.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
web_mtls_test.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00