3x-ui/frontend/src/schemas
mrchatam 768bbd2a29
feat(settings): add setting for Reality scan candidates (#6471)
* feat(settings): allow customizing Reality scan candidate list

Persist a realityScanCandidates panel setting (defaulting to the previous
hardcoded list), expose it in General Settings with i18n, and have the
Find Targets scanner use it when the search box is empty.

Fixes #5847

* style(frontend): oxfmt realityScanCandidates in setting.ts

* Fix locale JSON syntax

This change removes the malformed duplicate key and missing comma in the Android per-app proxy translations across the bundled locale files. The JSON now parses correctly while preserving the translated labels for each language.

* docs(i18n): update Happ translations

Localize the remaining Happ subscription settings strings across the translation files and refine the English copy. This aligns the labels and descriptions with the current Happ behavior for notifications, TUN options, HWID enforcement, routing presets, and per-app proxy settings.

* refactor(reality): drop test-only scaffolding from the candidate setting

TestDefaultRealityScanCandidatesCSV compared the CSV against its own
initializer and a defaultValueMap lookup, and
TestRealityScanCandidateTokensFallsBackWithoutDB drove a no-database
state no production caller reaches (the only caller is the
scanRealityTargets handler, served after InitDB). The
s != nil && GetDB() != nil guard existed only for that second test.
None of them could fail except in lockstep with the code they restate.

* docs(api): describe the setting-driven scanRealityTargets fallback

An empty targets value now probes the realityScanCandidates setting,
but the endpoint summary, parameter description and handler comment
still promised the built-in seed list, so API consumers were told the
wrong target set. Regenerated openapi.json and synced the docs copy,
which also lacked the new AllSetting field in the settings reference.

---------

Co-authored-by: mrchatam <287639636+mrchatam@users.noreply.github.com>
Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2026-09-13 14:48:28 +02:00
..
api feat(amneziawg): add native AmneziaWG protocol support (#6105) 2026-08-24 02:41:15 +02:00
forms fix(inbounds): allow negative subSortIndex for subscription order (#6465) 2026-09-12 11:14:53 +02:00
primitives Feature/tuic v5 (#6337) 2026-09-12 10:15:48 +02:00
protocols Feature/tuic v5 (#6337) 2026-09-12 10:15:48 +02:00
client.ts Feature/tuic v5 (#6337) 2026-09-12 10:15:48 +02:00
defaults.ts feat(happ): generate Crypt5 subscription links locally (#6494) 2026-09-13 12:44:55 +02:00
dns.ts Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00
inbound.ts Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00
login.ts feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
node.ts Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00
observatory.ts feat(sub): client-side balancers for the JSON subscription (#6243) 2026-08-23 22:34:20 +02:00
routing.ts feat(xray): update xray-core to v26.9.8 and adapt panel 2026-09-08 13:49:32 +02:00
setting.ts feat(settings): add setting for Reality scan candidates (#6471) 2026-09-13 14:48:28 +02:00
status.ts Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00
subBalancer.ts feat(sub): leastLoad member weights for subscription balancers (#6304) 2026-09-02 20:21:27 +02:00
xray.ts feat(routing): add panel-only comment field to routing rules (#6361) 2026-09-02 20:22:50 +02:00