3x-ui/internal/mtproto
MHSanaei 328d920e98
feat(mtproto): enforce per-client quota & expiry via mtg-multi limits
Map each mtproto client's totalGB and expiryTime onto mtg-multi's new
[secret-limits] (quota/expires): emit them into the generated config and
hot-apply through PUT /secrets so live connections survive. Quota is
written as an exact "<n>B" byte count that round-trips through both the
config and API parsers without the precision loss of a base-2 unit.

The sidecar's quota counter is not pruned when a secret is dropped, so a
panel-side traffic reset re-pushes the client's secret and then calls
POST /secrets/{name}/reset-quota (wired into every reset path) so a
renewed client is not immediately re-blocked.

Resolve the mtg-multi binary from the fork's latest release tag in
DockerInit.sh and release.yml instead of a hardcoded version pin, so the
panel no longer needs a manual bump per fork release.
2026-07-08 15:30:56 +02:00
..
manager.go feat(mtproto): enforce per-client quota & expiry via mtg-multi limits 2026-07-08 15:30:56 +02:00
manager_mutation_test.go feat(mtproto): per-client ad-tags, management-API auth, and record secret sync 2026-07-07 12:00:43 +02:00
manager_reload_test.go refactor(mtproto): manage ad-tags per client only 2026-07-07 12:19:26 +02:00
manager_test.go feat(mtproto): enforce per-client quota & expiry via mtg-multi limits 2026-07-08 15:30:56 +02:00
orphans_linux.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
orphans_other.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
process.go fix(mtproto): stop dropping connections on client/inbound edits; add live updates + ad-tag (#5838) 2026-07-07 01:13:24 +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_windows.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00