mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-18 05:58:43 +00:00
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. |
||
|---|---|---|
| .. | ||
| model | ||
| api_token_timestamp_test.go | ||
| backup_test.go | ||
| client_email_lower_index_test.go | ||
| client_hwid_schema_test.go | ||
| db.go | ||
| db_permissions_test.go | ||
| db_seed_test.go | ||
| db_settled_test.go | ||
| dialect.go | ||
| dns_outbound_legacy_keys_migration_test.go | ||
| dns_outbound_qtype_zero_test.go | ||
| dump_sqlite.go | ||
| dump_sqlite_test.go | ||
| fail2ban_state_test.go | ||
| freedom_domain_strategy_migration_test.go | ||
| freedom_finalrules_migration_test.go | ||
| host_migration_test.go | ||
| host_test.go | ||
| inbound_dedupe_test.go | ||
| inbound_port_unique_migration_test.go | ||
| index_tags_test.go | ||
| journal_mode_test.go | ||
| migrate_data.go | ||
| migrate_data_test.go | ||
| migration_models_test.go | ||
| mtproto_migration_test.go | ||
| outbound_removed_keys_migration_test.go | ||
| prepare_sqlite_test.go | ||
| reality_finalmask_migration_test.go | ||
| removed_cipher_migration_test.go | ||
| rewriter_protocol_case_test.go | ||
| seeder_fastpath_test.go | ||
| settings_index_test.go | ||
| traffic_overflow_repair_test.go | ||
| wireguard_migration_test.go | ||