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
..
2026-09-09 01:53:00 +02:00
2026-09-09 01:53:00 +02:00
2026-07-08 13:28:37 +02:00
2026-08-24 02:41:15 +02:00
2026-09-08 16:55:32 +02:00
2026-09-03 21:50:23 +02:00
2026-09-10 14:50:48 +02:00
2026-09-04 14:57:29 +02:00
2026-08-19 15:36:27 +02:00
2026-09-10 17:53:49 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-09-14 15:59:34 +02:00
2026-07-17 00:33:06 +02:00
2026-09-14 15:59:34 +02:00
2026-09-14 12:10:25 +02:00
2026-08-19 15:36:27 +02:00
2026-09-03 22:32:05 +02:00
2026-08-19 15:36:27 +02:00
2026-09-12 10:15:48 +02:00
2026-09-13 12:44:55 +02:00
2026-09-13 12:44:55 +02:00
2026-09-13 21:27:15 +02:00
2026-07-17 00:33:06 +02:00
2026-06-11 12:10:49 +02:00
2026-08-24 02:41:15 +02:00
2026-09-13 12:44:55 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-09-10 17:53:49 +02:00
2026-09-03 22:32:05 +02:00
2026-08-19 15:36:27 +02:00
2026-07-09 00:45:35 +02:00
2026-09-09 00:47:18 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-07-29 08:03:21 +02:00
2026-08-19 15:36:27 +02:00
2026-09-08 18:08:24 +02:00
2026-09-14 12:08:38 +02:00
2026-07-28 23:03:13 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-09-13 20:02:43 +02:00
2026-09-13 12:53:57 +02:00
2026-09-13 12:53:57 +02:00
2026-08-19 15:36:27 +02:00
2026-09-12 10:15:48 +02:00
2026-06-29 14:32:23 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-09-12 10:15:48 +02:00
2026-09-12 11:14:53 +02:00
2026-08-19 15:36:27 +02:00
2026-09-08 18:08:24 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-09-13 22:03:50 +02:00
2026-09-12 10:15:48 +02:00
2026-09-12 10:15:48 +02:00
2026-09-08 18:08:24 +02:00
2026-08-19 15:36:27 +02:00
2026-09-03 16:33:37 +02:00
2026-09-12 10:15:48 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-09-14 16:00:13 +02:00
2026-09-13 12:44:55 +02:00
2026-07-17 00:33:06 +02:00
2026-09-02 20:20:10 +02:00
2026-08-19 15:36:27 +02:00
2026-07-28 23:03:13 +02:00
2026-09-03 21:20:38 +02:00
2026-09-11 11:59:35 +02:00
2026-08-19 15:36:27 +02:00
2026-09-15 16:00:05 +02:00
2026-09-14 12:08:38 +02:00
2026-09-14 19:53:57 +03:00
2026-09-13 22:28:13 +02:00
2026-09-14 15:02:58 +02:00
2026-08-19 15:36:27 +02:00
2026-09-14 19:53:57 +03:00
2026-08-22 23:11:06 +02:00
2026-09-14 19:53:05 +03:00
2026-06-25 02:36:41 +02:00
2026-08-22 23:11:06 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-09-03 16:32:27 +02:00
2026-09-12 11:13:45 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-22 23:13:34 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-06-28 18:10:38 +02:00
2026-07-28 22:12:52 +02:00
2026-09-08 17:14:01 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-07-08 13:28:37 +02:00
2026-05-27 04:26:50 +02:00
2026-06-14 22:39:40 +02:00
2026-07-17 00:33:06 +02:00
2026-08-19 15:36:27 +02:00
2026-07-14 13:00:25 +02:00
2026-07-02 12:53:08 +02:00
2026-08-19 15:36:27 +02:00
2026-09-08 18:08:24 +02:00
2026-08-19 15:36:27 +02:00
2026-09-02 20:21:27 +02:00
2026-09-13 12:44:55 +02:00
2026-08-19 15:36:27 +02:00
2026-09-03 16:35:07 +02:00
2026-09-12 10:15:48 +02:00
2026-06-24 12:54:05 +02:00
2026-08-24 14:56:40 +02:00
2026-09-14 15:02:58 +02:00
2026-09-14 16:00:13 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-07-17 00:33:06 +02:00
2026-07-17 00:33:06 +02:00
2026-08-19 15:36:27 +02:00
2026-08-19 15:36:27 +02:00
2026-06-23 17:38:16 +02:00
2026-08-19 15:36:27 +02:00