3x-ui/web/controller
MHSanaei a07c7b7f4e
feat(migrate-db): SQLite <-> .dump conversion and Download Migration in Overview
Binary: extend the migrate-db subcommand with --dump and --restore so a
SQLite database can be exported to a portable SQL text dump and rebuilt from
one, alongside the existing --dsn PostgreSQL copy. Implemented in Go via the
bundled sqlite driver (new database/dump_sqlite.go); no external sqlite3 client
is required. Add ExportPostgresToSQLite (reverse of MigrateData) to build a
SQLite .db from live PostgreSQL data, reusing the shared copyAllModels helper.

Overview: add a "Download Migration" item to Backup & Restore plus a
getMigration endpoint/service that returns a .dump on SQLite or a .db on
PostgreSQL, so the data can seed a panel on the other backend. Document the
endpoint in api-docs and translate the three new strings across all locales.

Tests: cover the destination-side copy (AutoMigrate + copyTable into SQLite)
and the dump/restore round-trip including quoted values. Ignore *.dump.

The x-ui.sh helper that drives this from the CLI is in PR #4910.
2026-06-04 15:32:22 +02:00
..
api.go refactor(clients): coherent group management — rename, split, extract 2026-05-28 12:59:20 +02:00
api_docs_test.go fix(ci): bump Go to 1.26.4 and exempt /panel/groups SPA route from api-docs test 2026-06-03 15:38:44 +02:00
base.go v3 2026-05-10 02:13:42 +02:00
client.go fix(online): scope per-inbound online to inbounds that carried traffic 2026-06-03 16:19:00 +02:00
custom_geo.go v3 2026-05-10 02:13:42 +02:00
dist.go feat(postgres): in-panel backup/restore and consistent CLI backend 2026-05-31 17:53:34 +02:00
group.go refactor(clients): coherent group management — rename, split, extract 2026-05-28 12:59:20 +02:00
inbound.go feat(inbounds): add multi-select and bulk delete 2026-05-31 00:29:24 +02:00
index.go fix(auth): invalidate sessions when 2FA is enabled, fix dev 401 loop 2026-05-13 14:08:16 +02:00
login_limiter.go Implement CSRF protection and security hardening across the application (#4179) 2026-05-07 23:36:11 +02:00
login_limiter_test.go refactor(websocket): split controller into service + thin controller 2026-05-08 00:00:44 +02:00
node.go fix(nodes): Set Cert from Panel uses the node's own web cert for node inbounds 2026-06-03 16:41:02 +02:00
server.go feat(migrate-db): SQLite <-> .dump conversion and Download Migration in Overview 2026-06-04 15:32:22 +02:00
setting.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
util.go Client/inbound resilience + Postgres pool tuning + schema fixes (#4607) 2026-05-27 22:51:37 +02:00
util_test.go Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
websocket.go v3 2026-05-10 02:13:42 +02:00
xray_setting.go Security hardening: sessions, SSRF, CSP nonce, CSRF logout, trusted proxies (#4275) 2026-05-13 12:52:52 +02:00
xui.go fix(panel): register /groups SPA route so hard refresh returns index.html 2026-06-03 02:17:56 +02:00