3x-ui/internal/xray
MHSanaei 9c8cd08f90
Some checks are pending
CI / go-test (push) Waiting to run
CI / codegen (push) Waiting to run
CI / govulncheck (push) Waiting to run
CI / race (push) Waiting to run
CI / fuzz-smoke (push) Waiting to run
CI / golangci (push) Waiting to run
CI / frontend (push) Waiting to run
CodeQL Advanced / Analyze (go) (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
Release 3X-UI / Publish rolling dev release (push) Blocked by required conditions
feat(wireguard): multi-client support
WireGuard inbounds now manage per-client peers using xray-core's native WireGuard users (AddUser/RemoveUser). Each client lives in settings.clients (canonical, like every other protocol) and is projected to peers[] only when emitting the xray config, at level 0 so the dispatcher's per-user traffic/online counters work with no extra plumbing.

Backend: internal/util/wireguard gains KeyToHex (base64 to hex for the gRPC path), PublicKeyFromPrivate and GenerateWireguardPSK; xray/api.go builds a wireguard account in AddUser with hex keys (RemoveUser already worked); client CRUD generates a keypair and allocates a unique tunnel address per client and never rotates keys on edit; an idempotent migration converts legacy settings.peers into managed clients; WireGuard is included in the raw subscription.

Frontend: WireGuard in the add-client modal with keys on the credential tab, client schema, per-client QR/link/.conf, inbound form reduced to server settings; i18n added across 13 locales.

Fix: guard the settings[clients] assertion in add/update so a legacy WireGuard inbound stored without a clients key no longer panics.
2026-06-28 00:44:38 +02:00
..
api.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
api_e2e_test.go feat(online): use xray online-stats API for onlines and access-log-free IP limit 2026-06-11 19:42:03 +02:00
api_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
api_wireguard_test.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
client_traffic.go perf(scale): speed up traffic, auto-renew, and node bulk ops at 50k-100k clients 2026-06-20 10:35:46 +02:00
config.go feat: apply inbound/outbound/routing changes live via Xray gRPC API 2026-06-10 23:01:33 +02:00
config_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
hot_diff.go feat: apply inbound/outbound/routing changes live via Xray gRPC API 2026-06-10 23:01:33 +02:00
hot_diff_test.go feat: apply inbound/outbound/routing changes live via Xray gRPC API 2026-06-10 23:01:33 +02:00
inbound.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
inbound_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
log_writer.go fix(xray): guard log-writer race and bound handler gRPC deadlines (#5442) 2026-06-20 18:10:18 +02:00
log_writer_race_test.go Use efficient APIs and simplify loops 2026-06-23 14:12:28 +02:00
mutation_audit_test.go refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
online_test.go feat(online): use xray online-stats API for onlines and access-log-free IP limit 2026-06-11 19:42:03 +02:00
process.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
process_other.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
process_race_test.go Use efficient APIs and simplify loops 2026-06-23 14:12:28 +02:00
process_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
process_windows.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
traffic.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00