m-uising-box panel

Features

What the panel manages, grouped the way the sidebar is. All of it lives in one binary and one SQLite file. On a phone, the lists turn into cards. Help in the top-right corner opens the built-in manual (English and Chinese, with a table of contents and in-page search) at the chapter for the page you are on; in the reseller panel it opens the reseller view.

Dashboard: Needs attention sits at the top: a failed data-plane reload, servers offline or not synced, certificates, mainland reachability, failing upstreams, users about to expire or run out of data, a failed backup and so on, one row per kind, most serious first, each with a link to fix it; when all is well only a single "✓" line remains. Below it a row of figures (online users, 24-hour traffic, servers, certificate) links straight to the page behind each; then traffic, upstream health, online now, recent inbound connections, top users, recent actions and the data plane, plus a core log you can collapse (collapsed by default on phones). With several servers, traffic and top users cover all of them and the card title says so.

Lines

A line is inbound protocol + port → exit. Protocols: Hysteria2 (with port hopping and a masquerade site), AnyTLS, TUIC, Trojan, VLESS (Reality / Vision, with a one-click check and suggestions for handshake targets), VMess, Shadowsocks including the 2022 ciphers, plus SOCKS, HTTP and Mixed. Transports: WebSocket, gRPC, HTTPUpgrade, HTTP. Each line can be deployed to all servers or a chosen subset. Turn on rule-based routing to send chosen domain suffixes, full domains, domain keywords, IP ranges or ports to another upstream, direct, or block them; everything else uses the line's upstream. Quick-add presets fill in a free port and sensible options; every save is dry-run through sing-box and port-checked against the panel, other lines and other processes on the box. Click a line's name for line details: its traffic (all servers together or one at a time, 24 hours / 7 days / 30 days), traffic per server, and the users and IPs online on it right now. Relay entries: a line can be relayed through another server of the cluster (that server forwards the encrypted bytes untouched to the exit with sing-box's built-in forwarding, no decryption, TCP and UDP), or list an external relay (your own realm or iptables, or a bought relay); each entry adds a node to subscriptions, and the exit sees the relay's IP as the source.

Upstreams

Where traffic exits when it should not go direct: VLESS, VMess, Trojan, TUIC, Hysteria2, Shadowsocks and SOCKS outbounds, importable from share links. One-click latency test, scheduled health checks with failure/recovery alerts, and Cloudflare WARP set up from inside the panel. Health is measured on the servers that actually use the upstream: each one checks only what its own lines need, the upstream row shows every server's latency side by side, and alerts name the server that cannot reach it. Changing an upstream hot-swaps the outbound without restarting the data plane. A line can also be an upstream (chained proxy): parameters follow the line, its dedicated credentials do not use a user's quota, and traffic is counted once. Upstream groups use the fastest member that works, switch automatically when it fails, and show which member is in use.

Users

Plans

Templates for quota, duration, devices, speed and line assignment, plus an optional reference price only you see. Apply on create, on renewal or when extending. Users remember their plan, and the Plans page shows how many and who.

From a user's More menu: Renew… adds 1–120 periods at once (enter 3 or 12 to sell a monthly plan quarterly or yearly) as a renewal (usage reset, expiry pushed out), an extension (usage kept) or just assigning the plan; Change plan… offers replace, stack (keep the time left on the old subscription) or prorate by the two plans' reference prices. The dialog previews before and after live, marks changes that cost the user — earlier expiry, instantly over quota — in red and needs a confirmation tick for them; for a single user it carries a de-duplication ID, so a double click or a network retry runs once. Renewing, extending or changing a plan is an explicit activation and also enables users you disabled by hand; the panel tells you first. The user's plan history lists recent renewals and changes.

A plan can tick speed-limit rules that its users, now and later, follow. Resellers get their own plans, separate from yours.

Rules

Temporary speed limits layered on top of a user's own. Schedule: chosen weekdays and a time window in the panel time zone, crossing midnight allowed. Burst: X GB within the last N minutes limits the user for M minutes, lifts automatically and applies again on the next burst; a user can be under several rules at once, each independent. Targets are all users, users of a plan (including ones who get it later), every user of a reseller, or individual users. The master evaluates rules and syncs them to every node; several hits resolve to the strictest, and by default "Cap at the user's own limit" is on, so the result never exceeds the user's own limit. Changes reach live connections immediately, no reconnect needed. The user list shows "Limited"; the landing page never does.

Resellers

Give a reseller a set of lines plus a traffic quota, a device pool, a bandwidth pool and an expiry. Per-user limits are up to the reseller; the pools cap what all of their users can do at the same time. They get their own panel (default port 2054, path /dl) where they create users and plans, set their own landing-page title, notice and contact, and optionally enable two-factor login. All usage rolls up to the reseller; when the reseller is over budget, expired or disabled, every user of theirs is cut off at once. Reseller users are never mixed into your own user list.

Subscriptions

Servers

One master, any number of nodes. The master pushes lines, upstreams, users and credentials every 5 seconds and pulls back traffic deltas and online IPs; nodes only forward. Per-server traffic ratio, per-server deployment of lines, IPv4 or IPv6 per line on dual-stack servers, connection tracking across servers; scheduled mainland reachability checks from China Mobile, Telecom and Unicom home-broadband probes, with a Telegram alert when a server gets blocked.

IPv6 inbound check: when a server defaults to IPv6, or a line chooses IPv6, the same round has IPv6 probes outside China connect to its IPv6 address and line port, and the result shows on the Servers page and on the line; UDP lines (Hysteria2, TUIC) cannot be probed and say so. Recent inbound connections on the Dashboard lists, per server, who connected and on which line; connections refused by the device limit or a reseller's device pool are in red, and sources that arrived but failed the TLS / REALITY handshake or protocol authentication are under the Handshake failed filter with the reason — the first place to look when a user says they cannot connect (a few kinds of failure are never recorded, such as Hysteria2 / TUIC QUIC handshake failures; the "?" next to the card title lists them).

Set as master and master failover: Set as master moves the master to another server in one step: the data is handed over encrypted end to end and the old master turns into a node, so moving to a fresh VPS needs no backup or restore (writes pause for a minute or two during the handover, and traffic on these two servers' own lines during that time is not counted). Master failover (off by default) makes the first few nodes standbys that keep an encrypted replica; when the master is lost they take over the way you chose: Confirm, then take over (the default; reply with a code on Telegram or click on the standby's panel) or Take over automatically when the master is lost. Epochs only go up to prevent split brain, and an old master that comes back turns into a node. What a takeover moves over is up to you: master duties only by default (pushing configs, merging traffic, expiry / quota cut-offs, the Telegram bot, the external API), or subscriptions too (with a DNS API from Cloudflare, Aliyun DNS or Tencent DNSPod: the records move, the subscription certificate is reissued when needed, and when the panel uses a domain the panel and external API addresses follow). Traffic charts, subscription logs and older audit entries travel along as encrypted history data; when two servers both act as master both sides turn red and one click hands it back. Nodes linked over plain http need a risk acknowledgement to be set as master and are not standbys by default. Command line: m-ui ha status | takeover | set-master | abandon | pause | resume | yield | reset.

See Multi-server.

Certificates

Several per server. Let's Encrypt via HTTP-01, Cloudflare DNS-01 or manual DNS, wildcards included, with DNS and port pre-checks. No domain? Self-sign with one click. Bring your own certificate files too. The line default, panel and subscription each pick their own, and any line can pick its own from a drawer showing which servers have it and how long is left.

Automatic renewal: checked a few minutes after start and then hourly; a certificate is renewed once it enters the last third of its lifetime (30 days left on a 90-day certificate) and hot-reloaded without a restart. Failures retry with 1, 2, 4-hour backoff and notify you on the first failure; the certificate store shows for each certificate whether it renews automatically, the last renewal, the failure count and the next retry, and lets you turn renewal off for one certificate or renew it now. Nodes usually have no notifications of their own, so the master alerts for their failed renewals and expiring certificates. Manual-DNS certificates cannot renew automatically. If the panel, subscription or reseller-panel certificate file cannot be read, a temporary self-signed certificate keeps the service up and a banner tells you, instead of the process refusing to start.

Operations

Security

Two-factor login (TOTP), login rate limiting per IP, sessions scoped per role, reseller isolation enforced server-side, checksum-verified downloads for the installer and the updater, no telemetry. Config changes never bypass validation. When the panel sits behind a reverse proxy, list it under "Trusted reverse proxies" in the settings so login and external API failure limits count the real source.

External API

A token-authenticated HTTP API for creating and updating users, enabling and disabling them, reading usage and fetching subscription links — for shops, bots and automation. Plan operations: /plan (alias /renew) adds N periods, /change switches plans (replace / stack / prorate by reference price), /plan-ops returns the plan history. dryRun previews without changing anything (a shop can quote from it); requestId or an Idempotency-Key header (an order number, say) makes retries run once; a plan change that costs the user returns 409 until you call again with force. Renewals and plan changes enable users who were disabled by hand. Resellers get their own token that only reaches their users and plans. The Admin page lists every endpoint with curl examples filled in with your prefix and token. Besides the default token you can create more keys, each with its own permissions (view / create / update / delete users, renewals and plan changes, view plans, panel info), disable or regenerate them, and optionally allow only listed source IPs. Panel info endpoints (/overview, /servers, /lines, /onlines, /users/{name}/traffic) let Telegram bots and shop back ends read the panel's state; a reseller's keys only see their own users. Documented in docs/API.md.