3x-ui/internal/sub
MHSanaei d97bd8643e
feat(mtproto): adopt dolonet/mtg-multi and make MTProto inbounds multi-client
Replace the upstream 9seconds/mtg sidecar with the dolonet/mtg-multi fork so a single MTProto inbound can serve many per-user secrets. Each panel client is now one named FakeTLS secret in the fork's [secrets] section: clients are first-class (attach/detach, limits, expiry, per-client tg:// links) exactly like every other protocol, mirroring the WireGuard multi-client model. Per-client traffic and online status come from the fork's /stats JSON API (its Prometheus output has no per-user label), fed into the existing email-keyed client_traffics accumulator; an optional throttle caps concurrent connections. A one-time seeder converts each legacy single-secret inbound into a one-client inbound.

The fork ships only linux/darwin amd64/arm64 binaries but is pure Go, so provisioning builds it from source for every supported platform (release.yml, DockerInit.sh) while keeping the panel-expected mtg-<os>-<arch> filename and the 'run' verb, so process.go is untouched. Also fixes a pre-existing update.sh gap that never renamed the mtg binary for armv6/armv7 updates.
2026-07-06 16:04:32 +02:00
..
build_urls_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
characterization_test.go fix(sub): restore client email in panel copy/QR link remark (#5532) 2026-06-24 15:25:41 +02:00
clash_external.go refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
clash_service.go fix(sub): resolve subscription clients and stats from normalized tables 2026-07-02 16:58:00 +02:00
clash_service_test.go feat(xhttp): support sessionID* rename + sessionIDTable/Length (xray v26.6.22) (#5506) 2026-06-23 17:38:16 +02:00
controller.go feat(sub): show the announcement on the subscription info page 2026-07-03 09:38:37 +02:00
controller_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
default.json refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
dist.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
endpoint.go fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
endpoint_test.go fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
export_all_links_test.go feat(inbounds): apply remark template to Export all inbound links 2026-06-27 11:22:45 +02:00
external_config.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
external_config_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
external_only_sub_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
external_subscription.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
external_subscription_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
host_sub.go fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
host_sub_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
json_service.go refactor(sub): drop unused subReq parameter from genHy 2026-07-02 22:01:42 +02:00
json_service_test.go fix(sub): resolve subscription clients and stats from normalized tables 2026-07-02 16:58:00 +02:00
links.go feat(inbounds): apply remark template to Export all inbound links 2026-06-27 11:22:45 +02:00
links_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
mutation_audit_test.go fix(sub): resolve subscription clients and stats from normalized tables 2026-07-02 16:58:00 +02:00
page_data_test.go fix(sub): drive display remarks from the template and split multi-host subpage links 2026-06-24 16:45:23 +02:00
remark_vars.go fix(sub): resolve subscription clients and stats from normalized tables 2026-07-02 16:58:00 +02:00
remark_vars_test.go test(sub): align identity-token test with first-link-only EMAIL 2026-06-27 13:56:45 +02:00
service.go feat(mtproto): adopt dolonet/mtg-multi and make MTProto inbounds multi-client 2026-07-06 16:04:32 +02:00
service_dedup_test.go fix(sub): resolve subscription clients and stats from normalized tables 2026-07-02 16:58:00 +02:00
service_flow_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
service_mtproto_test.go feat(mtproto): adopt dolonet/mtg-multi and make MTProto inbounds multi-client 2026-07-06 16:04:32 +02:00
service_orphaned_stats_test.go chore: bump deps and modernize test loops 2026-06-26 00:10:30 +02:00
service_property_test.go fix(nodes): stop multi-attached client traffic inflating across node inbounds 2026-06-15 19:31:57 +02:00
service_sharelink_test.go feat(reality): derive a stable per-client spiderX for shared links 2026-07-02 12:53:08 +02:00
service_sort_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
service_test.go fix(sync): mark node dirty inside the mutation transaction (atomic ConfigDirty) (#5611) 2026-06-28 15:18:28 +02:00
service_userinfo_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
service_wireguard_test.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00
sub.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
sub_scale_test.go test(scale): cover traffic poll, ws payloads, ip-limit job, sub and xray config at 500k 2026-07-02 16:12:46 +02:00
vless_route.go fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
vless_route_sub_test.go fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
vless_route_test.go fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00