3x-ui/internal/database
MHSanaei 39eb5baf42
fix(inbound): convert legacy externalProxy to hosts on import
An inbound exported from a build that predated the hosts table carries
its external proxies inline in streamSettings.externalProxy. The startup
migration that converts those to host rows runs once and is gated off
afterwards, so it never sees a freshly imported inbound, leaving its
external proxies stranded in streamSettings (never surfaced as Hosts).

Extract the migration's per-inbound conversion into a shared
database.CreateHostsFromExternalProxy and run it inside the AddInbound
transaction. No-op for inbounds without externalProxy (everything the
current UI builds), so it only fires on such imports.
2026-06-27 13:50:06 +02:00
..
model fix(settings): normalize API token timestamps (#5599) 2026-06-27 10:30:58 +02:00
api_token_timestamp_test.go fix(settings): normalize API token timestamps (#5599) 2026-06-27 10:30:58 +02:00
db.go fix(inbound): convert legacy externalProxy to hosts on import 2026-06-27 13:50:06 +02:00
db_seed_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
dialect.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
dump_sqlite.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
dump_sqlite_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
host_migration_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
host_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
index_tags_test.go fix: resolve a batch of open bug-tagged issues (traffic accounting, share strategy, sub address, CPU) (#5477) 2026-06-22 00:22:28 +02:00
migrate_data.go refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
migrate_data_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
settings_index_test.go perf(db): add an index on settings.key (#5359) 2026-06-20 15:08:54 +03:30