3x-ui/internal/web/controller
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.go fix(api): return 401 for invalid Bearer token instead of 404 (#6459) 2026-09-12 11:52:15 +02:00
api_auth_test.go fix(api): return 401 for invalid Bearer token instead of 404 (#6459) 2026-09-12 11:52:15 +02:00
base.go
client.go feat(happ): generate Crypt5 subscription links locally (#6494) 2026-09-13 12:44:55 +02:00
client_happ_test.go feat(happ): generate Crypt5 subscription links locally (#6494) 2026-09-13 12:44:55 +02:00
client_partial_apply_test.go fix(clients): flag the restart a partly-applied edit or delete still needs 2026-09-07 01:51:01 +02:00
dist.go feat(web): add network-only PWA installability (#6190) 2026-08-18 15:33:20 +02:00
dist_test.go feat(web): add network-only PWA installability (#6190) 2026-08-18 15:33:20 +02:00
geodata_test.go feat(xray): browse geosite/geoip categories from routing rules (#6165) 2026-08-15 17:12:59 +02:00
group.go fix(groups): report changed bulk moves without restarting xray (#6199) 2026-08-14 19:50:06 +02:00
host.go feat(hosts): bulk-add multiple hosts to multiple inbounds (#5677) 2026-07-08 23:35:20 +02:00
host_test.go feat(hosts): bulk-add multiple hosts to multiple inbounds (#5677) 2026-07-08 23:35:20 +02:00
inbound.go fix(inbounds): allow negative subSortIndex for subscription order (#6465) 2026-09-12 11:14:53 +02:00
inbound_node_sync_test.go fix(inbounds): reject missing TLS certificates before saving (#6429) 2026-09-08 18:08:24 +02:00
index.go fix: do not type successfull login twice (#6374) 2026-09-03 17:00:25 +02:00
login_limiter.go Repo-wide self-correcting audit: 54 verified bug fixes (#5970) 2026-07-17 00:33:06 +02:00
login_limiter_test.go chore: refresh dependencies, fix Linux tool tasks, modernize Go idioms 2026-07-25 16:08:09 +02:00
node.go fix(nodes): apply a rotated master mTLS certificate without restarting the panel (#6194) 2026-08-15 16:03:42 +02:00
node_credentials_writeonly_test.go fix(nodes): report probe heartbeat persistence failures (#6207) 2026-08-13 12:34:37 +02:00
panel_update_test.go fix: make all self-managed file downloads/installs atomic, with real completion status (#5711) 2026-07-02 18:19:33 +02:00
pwa.go feat(web): add network-only PWA installability (#6190) 2026-08-18 15:33:20 +02:00
pwa_test.go feat(web): add network-only PWA installability (#6190) 2026-08-18 15:33:20 +02:00
server.go feat(settings): add setting for Reality scan candidates (#6471) 2026-09-13 14:48:28 +02:00
setting.go feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
setting_test.go feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
spa.go refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
spa_test.go fix(web): serve panel SPA routes from NoRoute (#5536) 2026-06-24 21:19:12 +02:00
sub_balancer.go feat(sub): leastLoad member weights for subscription balancers (#6304) 2026-09-02 20:21:27 +02:00
sub_balancer_test.go feat(sub): client-side balancers for the JSON subscription (#6243) 2026-08-23 22:34:20 +02:00
util.go fix(sub): honor trustedProxyCIDRs before forwarded URLs (#6135) 2026-07-29 21:01:59 +02:00
util_test.go
websocket.go
xray_setting.go feat(outbounds): support custom subscription user agents (#6398) 2026-09-11 15:32:04 +02:00
xray_setting_warp_test.go fix(warp): surface update-clock persistence failures (#6209) 2026-08-13 12:31:05 +02:00