Accounts & delivery

Live connections

The Connections page shows sessions that are online right now across the fleet, one row per account and source IP, and is the same data source behind the green “online” dot on the Accounts list.

SSH

One shared socket-statistics scan (ss) runs across the fleet per refresh and is then split per account. Each distinct source IP becomes a row. Per-connection byte counters are not tracked here, so rxBytes/txBytes are always 0; when more than one IP uses the same account the row is flagged as a shared rate, because throughput is aggregate rather than per-IP.

Xray (VMess / VLESS / Trojan)

A session is reported only when a recent peer IP for that account’s email appears in the Xray access log. Byte-activity staleness alone is deliberately not enough — it stays warm for minutes after a disconnect and used to produce false “online” dots.

Row identity

Row ids are <accountId>:<ip>, which is what the kick action targets.

  1. 1
    Open Connections. Rows refresh automatically.
  2. 2
    Filter or search to reach a specific account or IP.
  3. 3
    Click the kick icon on a row to force-disconnect it. For SSH this runs pkill -KILL -u <system user> and genuinely drops the TCP flow.
  4. 4
    Cross-check on the account detail page’s Devices tab, which merges the panel’s active-IP table with node-reported presence inside a 20-second freshness window.
endpoints
GET  /api/connections               live sessions across the fleet
POST /api/connections/{id}/kick     {id} is "<accountId>:<ip>"

Every account has an ipLimit. Enforcement is periodic rather than instantaneous: on the master a systemd timer (autoscript-ip-limit.timer) runs the IP-limit watcher, and node agents report presence with their heartbeat so the panel can act on the fleet-wide picture.

  • ipLimit = 0 means unlimited. The default for new accounts is 2.
  • Enforcement counts distinct source IPs, not TCP connections — one device opening many streams stays one device.
  • Carrier NAT and IPv6 privacy addressing can make a single phone look like more than one device; give mobile-heavy plans headroom.
  • A user behind the same NAT as another user can consume a slot on a shared IP; the shared-rate flag on the row is the tell.

Testing enforcement

Set an account to ipLimit = 1, connect from two devices, and watch the second session disappear within one enforcement cycle. If it never does, check that autoscript-ip-limit.timer is enabled on the master and the node is heartbeating.
LimitDetail
Byte counters are zero hereReal usage lives in the usage/traffic stores and on the account detail page, not in this endpoint.
Xray kick is not a hard disconnectFor Xray the kick records an audit event; it does not tear down an in-flight stream the way the SSH kill does. For an immediate cut, suspend the account so the node removes the user from the live Xray process.
Freshness windowPresence is judged within roughly 20 seconds, matched to the node heartbeat cadence. Expect a short tail after a real disconnect.