3x-ui/internal/web/service
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
..
email style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
integration style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
outbound style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
panel style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
tgbot style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
api_scale_postgres_test.go perf(scale): speed up traffic, auto-renew, and node bulk ops at 50k-100k clients 2026-06-20 10:35:46 +02:00
backup_filename_test.go feat(backup): prefix backup filenames with date and time (#5606) 2026-06-27 12:08:20 +02:00
bulk_clients_test.go
bulk_traffic_test.go
client.go
client_apply_field_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
client_bulk.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
client_bulk_flow_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
client_crud.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
client_effective_flow_test.go fix(flow): restore XTLS Vision when an inbound becomes flow-eligible (#5520) 2026-06-24 13:02:42 +02:00
client_email_validation_test.go
client_external_link.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
client_flow_isolation_test.go fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
client_group_node_sync_test.go fix(client): clear group when removed in the single-client editor 2026-06-17 15:55:56 +02:00
client_group_reset_test.go feat(groups): reset group traffic without touching client counters 2026-06-27 16:33:36 +02:00
client_groups.go feat(groups): reset group traffic without touching client counters 2026-06-27 16:33:36 +02:00
client_inbound_apply.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
client_link.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
client_locks.go
client_lookup.go fix(flow): restore XTLS Vision when an inbound becomes flow-eligible (#5520) 2026-06-24 13:02:42 +02:00
client_paging.go
client_portable.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
client_sync_multiprotocol_test.go
client_test.go
client_traffic.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
client_wireguard.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
client_wireguard_crud_test.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
client_wireguard_test.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
config.json feat: apply inbound/outbound/routing changes live via Xray gRPC API 2026-06-10 23:01:33 +02:00
del_shared_email_runtime_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
fallback.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
global_traffic_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
host.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
inbound.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
inbound_autorenew_test.go perf(scale): speed up traffic, auto-renew, and node bulk ops at 50k-100k clients 2026-06-20 10:35:46 +02:00
inbound_client_ips.go
inbound_client_ips_merge_test.go
inbound_client_traffic_test.go
inbound_clients.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
inbound_disable.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
inbound_flow_restore.go fix(flow): restore XTLS Vision when an inbound becomes flow-eligible (#5520) 2026-06-24 13:02:42 +02:00
inbound_flow_restore_test.go fix(flow): restore XTLS Vision when an inbound becomes flow-eligible (#5520) 2026-06-24 13:02:42 +02:00
inbound_import_external_proxy_test.go fix(inbound): convert legacy externalProxy to hosts on import 2026-06-27 13:50:06 +02:00
inbound_import_shared_clients_test.go fix(inbound): avoid UNIQUE email constraint when importing inbounds that share clients 2026-06-12 13:00:04 +02:00
inbound_migration.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
inbound_migration_test.go Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
inbound_mtproto_test.go feat(mtproto): route Telegram egress through Xray routing rules 2026-06-12 17:58:45 +02:00
inbound_node.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
inbound_node_ips.go fix(nodes): cloned-node attribution, node-hosted client display (online/speed/counts), and sync robustness (#5488) 2026-06-22 20:20:55 +02:00
inbound_node_ips_test.go fix(nodes): cloned-node attribution, node-hosted client display (online/speed/counts), and sync robustness (#5488) 2026-06-22 20:20:55 +02:00
inbound_node_reconcile_test.go feat(node): per node outbound routing (#5275) 2026-06-14 23:10:52 +02:00
inbound_protocol.go fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
inbound_protocol_test.go fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
inbound_sub_sort_test.go feat(sub): per-inbound sort order for subscription links 2026-06-12 12:03:22 +02:00
inbound_sublink.go feat(inbounds): apply remark template to Export all inbound links 2026-06-27 11:22:45 +02:00
inbound_traffic.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
inbound_traffic_global.go feat(node-sync): push global client usage to nodes for display and local enforcement 2026-06-11 15:14:08 +02:00
inbound_update_tag_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
inbound_util.go feat(sub): per-inbound sort order for subscription links 2026-06-12 12:03:22 +02:00
metric_history.go perf(metrics): tiered rollup history (7d at ~1.5MB) and cleaner ranges 2026-06-25 23:30:13 +02:00
metric_history_test.go chore: bump deps and modernize test loops 2026-06-26 00:10:30 +02:00
node.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
node_bulk_dispatch_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
node_client_breakdown_test.go fix(nodes): cloned-node attribution, node-hosted client display (online/speed/counts), and sync robustness (#5488) 2026-06-22 20:20:55 +02:00
node_client_expiry_sync_test.go fix(nodes): sync "start after first connect" expiry so un-activated nodes do not reset it (#5319) 2026-06-15 15:46:19 +02:00
node_client_traffic_sum_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
node_delete_orphan_test.go fix(nodes): block node delete while inbounds are still attached (#5394) 2026-06-20 01:09:53 +02:00
node_dirty_test.go fix(node): mark node dirty on Update so sync reconciles before snapshot sweep (#5469) 2026-06-21 17:27:53 +02:00
node_mtls.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
node_mtls_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
node_netmetrics_test.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
node_origin_guid_test.go fix(nodes): cloned-node attribution, node-hosted client display (online/speed/counts), and sync robustness (#5488) 2026-06-22 20:20:55 +02:00
node_shared_guid_test.go fix(nodes): cloned-node attribution, node-hosted client display (online/speed/counts), and sync robustness (#5488) 2026-06-22 20:20:55 +02:00
node_tag_sync_test.go
node_test.go feat: allow selecting inbounds synchronized from nodes (#5178) 2026-06-11 20:48:26 +02:00
node_tree.go fix(nodes): cloned-node attribution, node-hosted client display (online/speed/counts), and sync robustness (#5488) 2026-06-22 20:20:55 +02:00
node_tree_test.go
outbound_subscription.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
outbound_subscription_test.go fix(subscription): bound outbound response body (#5493) 2026-06-23 10:48:01 +02:00
port_conflict.go fix(inbounds): flag conflicts with the reserved Xray API port (#5304) 2026-06-15 17:21:06 +02:00
port_conflict_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
reality_scan.go feat(reality): add live REALITY target scanner with IP/CIDR discovery 2026-06-26 22:18:47 +02:00
reality_scan_test.go feat(reality): add live REALITY target scanner with IP/CIDR discovery 2026-06-26 22:18:47 +02:00
scale_helpers_test.go perf(scale): speed up traffic, auto-renew, and node bulk ops at 50k-100k clients 2026-06-20 10:35:46 +02:00
server.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
server_vlessenc_test.go feat(web): vless encryption new modes (#5517) 2026-06-24 21:22:42 +02:00
server_xray_checksum_test.go fix(xray): verify the release archive checksum before installing (#5396) 2026-06-20 00:37:35 +02:00
setting.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
setting_mtls.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
setting_mtls_test.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
setting_security_test.go feat(notifications): event bus architecture with Telegram and SMTP subscribers (#5326) 2026-06-15 21:03:41 +02:00
shadowsocks_client_key_test.go fix(inbound): regenerate SS-2022 client PSKs on method key-size change 2026-06-17 14:11:35 +02:00
sub_uri_base_test.go
sync_scale_postgres_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
traffic_writer.go fix(service): serialize client/inbound writes to prevent Postgres deadlock 2026-06-17 15:55:47 +02:00
traffic_writer_test.go
url_safety.go
xray.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
xray_config_inject_test.go feat(mtproto): route Telegram egress through Xray routing rules 2026-06-12 17:58:45 +02:00
xray_metrics.go feat(notifications): event bus architecture with Telegram and SMTP subscribers (#5326) 2026-06-15 21:03:41 +02:00
xray_setting.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
xray_setting_routing_sync.go fix(routing): sync xray rules when panel inbound tags change or are deleted (#5367) 2026-06-20 01:18:31 +02:00
xray_setting_routing_sync_test.go fix(routing): sync xray rules when panel inbound tags change or are deleted (#5367) 2026-06-20 01:18:31 +02:00
xray_setting_test.go
xray_strip_rules_test.go Add Enable/Disable Toggle for Xray Routing Rules (#5296) 2026-06-15 00:43:49 +02:00
xray_wireguard_config_test.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
xray_xhttp_session_test.go feat(xhttp): support sessionID* rename + sessionIDTable/Length (xray v26.6.22) (#5506) 2026-06-23 17:38:16 +02:00