A client attached to several inbounds shares one usage counter. When any one of those inbounds reached its scheduled reset, the job zeroed the client's whole usage, across inbounds and nodes, although the client's own cycle resets on another day (#7135).
Add a per-inbound "Keep client usage" switch, off by default: with it on, the scheduled reset clears only the inbound's own counters. The setting is pushed to nodes and read back from their snapshots. A node that does not advertise the capability is refused when the switch is saved, not later at push time, so an older node never ends up with a config it cannot apply.
An AmneziaWG outbound could only be set up by copying keys and obfuscation values from a .conf into the form by hand (#7056).
Parse vpn:// links, from another panel or an AmneziaVPN app key, in the Go link parser and in the outbound form, and keep AmneziaWG outbounds that arrive through an outbound subscription running. Inflation is capped per key and per subscription, absent S3/S4 stay 0, a ranged keepalive keeps its lower bound, and the identity includes the client key so two clients of one server do not collide.
The theme had three settings, light, dark and ultra dark, so anyone whose desktop switches appearance on a schedule had to change the panel by hand.
Add a System step to the theme button on the sidebar, the login page, the command palette and the subscription page. In that mode the panel follows the OS light/dark setting and repaints when it changes, without a reload. The stored preference moves to theme-mode; the legacy dark-mode boolean is still read on first load and still written, so existing users keep their theme.
The large QR card on the subscription page always encoded the raw link, so a Clash/Mihomo or JSON user who scanned it got a profile their client could not parse.
Add a SUB / JSON / CLASH switch under the card for the enabled formats. The card starts on the format of the route the page was opened through: the server puts subFormat into the page data, so the /mihomo/ and /clash-legacy/ aliases start on CLASH as well.
On a node that a master pushes cross-panel usage to, the 5-second traffic job looked up client_global_traffics once per enabled client to decide who to disable, and its freshness probe counted every fresh row (#7008).
The scan of all enabled clients now builds the over-quota ids once and matches them with IN, and the probe is an EXISTS that stops at the first fresh row. Who gets disabled is unchanged: same 24-hour window, one master must reach the quota, masters are never summed. The email-scoped callers keep the correlated predicate. The Postgres job runs the four semantic tests.
RabbitHole runs a Mihomo core and sends a Rabbit-Hole/ User-Agent. The default matcher only knew clash and mihomo, so with automatic format detection on it received the raw link list.
Add rabbit-hole to the default Clash/Mihomo User-Agent regex. A panel with its own regex is unaffected. The client's User-Agent joins the auto-serve test table, and the settings placeholder and subscription docs show the new default.
Since 3.11.0 the panel asks outside IP-echo services for its public address every five minutes, and on a server with no IPv6 it retried the IPv6 services forever. Operators with static addresses had no way to stop it (#7176).
Add four General settings: the refresh interval (0 keeps the first answer), a switch for IPv6 detection, and a fixed IPv4 and IPv6 address that replace the lookup. The defaults keep today's behaviour. Clearing an override forgets the earlier success, so the next lookup is not timed from before the pin.
On a laptop-width screen the Clients table is wider than the window, and columns such as Speed or Attached inbounds take width even when they show nothing useful.
Add a Columns menu beside Filter that hides any column except the client itself. The choice is kept in localStorage, the menu stays open while several columns are ticked, and the table sizes to its visible columns instead of a fixed 1200px.
An outbound whose Dialer Proxy names a tag that no longer exists was shown like any other choice, and Xray then failed the dial with no outbound handler for it.
Show a warning under the field in the outbound form when the tag is not among the available outbounds. The host form stays silent: its Dialer Proxy resolves inside the subscriber's client config, so the server's outbound list cannot judge it.
For a 2022-blake3 method the raw subscription percent-encodes the
userinfo, as SIP022 requires. Shadowrocket copies the %2B, %2F and %3D
escapes into the node password as they are, so authentication fails for
every key that contains +, / or =.
A request whose User-Agent is Shadowrocket now gets the userinfo as
base64url, the form the other Shadowsocks methods already use and that
Shadowrocket reads. Every other client keeps the SIP022 form.
Closes#7146
An inbound marked Exclude from subscriptions was skipped before its
configs were built, and a balancer only reads the entries that reach the
output. A hidden inbound could therefore never be a balancer member,
although the balancer form lists it, and a balancer of only hidden
inbounds never reached the subscriber.
A hidden inbound that an enabled balancer selects is now rendered into a
list that never reaches the output, and balancers draw members from both
lists. It still gets no document of its own, its clients still count in
the usage header, and rendering it spends neither the response budget nor
the first-link remark tokens.
An inbound that is already hidden and already selected in a balancer
appears inside that balancer after the upgrade.
The HTTP-mode outbound test builds a throwaway Xray instance whose
config carried no dns section, so an outbound whose server name only the
panel's configured resolvers know (a split-DNS name, a hosts entry)
failed the test with a lookup against the OS resolver, while the same
outbound worked through the running core.
The test endpoints now pass the stored template's dns section to the
probe instance. Its tag, which names routing the probe config does not
have, and its script are left out; every resolution setting rides along.
Fixes#7131
Two outbound subscriptions with overlapping tag prefixes, or a template
outbound with the same tag, put duplicate tags into the generated config
and Xray refused to start with "existing tag found". A changed prefix
also never took effect: every refresh reused the stored tags.
A refresh now reuses a stored tag only when it carries the current
prefix, and an edit of the prefix rewrites the stored tags at once. Tags
are disambiguated with a -N suffix against the template and the other
subscriptions when they are stored, and again when the config is built,
so the panel lists the same tags the core runs.
Routing rules and balancers that name a tag by its old prefix stop
matching after the prefix changes.
Fixes#7110
Three paths re-added a client to the running core with an account map
the WireGuard builder refuses, and each failed add fell back to a full
Xray restart that drops every connected user: a traffic reset of a
quota-disabled client and bulk enable built the map by hand without
publicKey and allowedIPs, and auto-renew passed keepAlive as a number
where the builder takes a string.
The map is now built in one place, coreUserFromClient, which the single
add and update paths use too. On MTProto, AmneziaWG and TUIC inbounds,
where AddUser changes nothing, the reset and the bulk toggle go through
the inbound reconcile, after the traffic rows have flipped.
/inbounds/add and /inbounds/import also refuse client emails and subIds
the client API refuses; a master's push to a node is exempt.
hostEndpoints and subscriptionHostVariants returned the same empty result
for an inbound with no enabled hosts and for one whose enabled hosts are
all excluded from the requested format. The second case therefore fell
back to the inbound's bare address, the address the operator had hidden.
The all-excluded case is now reported separately and renders nothing in
raw, json and clash, in both sort modes, in the link export and in the
panel's own host selection. Traffic accounting and the usage header are
kept. Inbounds with no hosts, or only disabled ones, render as before.
Updating a client whose last inbound was detached rewrote the clients
record but, in client_traffics, only re-asserted enable in the true
direction. The auto-disable and renewal loops read expiry, quota and the
reset schedule from that row, so they kept acting on the stale values and
never disabled an expired client.
The no-inbound branch now goes through UpdateClientStat, the helper every
attached-inbound update already uses, so the whole enforcement row
follows the edit and the usage counters are left alone.
Fixes#7160
exportPostgresDB started pg_dump with context.Background(), so a
PostgreSQL server that accepted the connection and then stopped answering
hung the database download and the scheduled Telegram and Discord
backups forever; SkipIfStillRunning then silently skipped every later
backup run.
pg_dump now runs under a one-hour deadline and the caller gets an error
that names the timeout.
With gVisor's RACK loss detection on, a TCP download through an AmneziaWG
inbound froze for seconds after a short contiguous loss. After the RTO,
RACK marks the old flight lost and enters recovery, but the pipe estimate
still counts every un-SACKed lost segment as in flight, so the sender
resends about two segments per RTO.
The embedded netstack now disables RACK and falls back to RFC 6675 SACK
recovery, which resends the tail after a single RTO. The option can be
reverted once the pinned gVisor carries an upstream fix.
Closes#7177
The WireGuard link builders (Go and frontend) and the JSON subscription
outbound never read streamSettings.finalmask, so a WireGuard inbound with
a UDP mask produced a client config the server rejects.
The link now carries the mask as fm=<json>, the way vless, trojan and
shadowsocks already do, a Host's own mask is merged into its subscription
link, and the JSON outbound gets streamSettings.finalmask.
Closes#7185
The web server listens on XUI_PORT when it is set and valid, but the
AmneziaWG forwardedPorts conflict check read only the stored webPort.
With XUI_PORT set, a forward on the real panel port passed the check and
could never bind, while a forward on the unused stored port was refused.
The XUI_PORT-over-webPort rule now lives in SettingService.GetListenPort,
which both the web server and the conflict check use.
DomainValidatorMiddleware compared the saved domain with the request
host byte for byte. Host names are case-insensitive and may end with the
root's dot, so a domain saved as Panel.Example.com, with a stray space,
or a Host header like panel.example.com. answered every request with
403, the settings page included, and the admin could not undo it from
the UI.
Both sides are now normalized before the comparison. Saving the settings
stores the domain in that form and refuses a scheme, port or path, which
could never equal the port-stripped host and locked the panel the same
way.
Mihomo ignores a WireGuard proxy's dns list unless remote-dns-resolve is
set, so destination domains were resolved by the client's local DNS
outside the tunnel and timed out on poisoned networks.
The flag is emitted only when every configured server is a bare IP:
mihomo aborts the whole config on a value its name-server parser rejects.
That is the rule the AmneziaWG builder already applies.
Closes#7151
GetXrayConfig logged one INFO line for every client whose traffic row is
disabled, on every config generation: each reconcile, restart and node
traffic sync, changed or not. With a few thousand expired clients that
flooded the journal and pushed everything else out of the panel's in-memory
log buffer. The line also said "Remove Inbound User", although nothing is
removed there; the client is only left out of the config being built.
A successful generation now writes one summary with the number of excluded
client entries and affected inbounds, and a failed one writes none. The
filter and the generated config are unchanged.
Closes#7054
Every TCP connection through a built-in AmneziaWG inbound or outbound
allocated two fresh 32 KiB copy buffers, because io.Copy on a *net.TCPConn
goes through ReadFrom/WriteTo and ignores a caller's buffer. Under a stream
of short connections that is a lot of garbage. The relays now copy with
buffers from a sync.Pool; one side of each pair is always a userspace
netstack connection, so no kernel splice path is given up.
The connect to the local Xray bridge and its SOCKS5 handshake had no time
limit, so a bridge that accepted and never answered pinned the relay's
goroutines and descriptors forever. Both are now bounded at 10 s, and the
deadline is cleared once the handshake succeeds so the relayed connection
keeps its half-close behaviour.
Stop sat next to Restart on the dashboard and fired on the first click. A
mis-click cut every proxy connection, and when the panel itself is reached
through that proxy the only way back was SSH (#7103).
Stop now opens a confirmation with Cancel focused. When Xray is stopped the
first button reads Start instead of Restart and Stop is disabled; in the
crashed state Stop stays enabled, because setting the manual-stop flag is
what halts the crash-recovery restart loop.
Closes#7103
A master that reaches a node over mTLS with no bearer token is treated as
node-sync, which cannot call /server/updatePanel, so "Update panel" on such a
node fails with HTTP 403. That is intended, but the multi-node guide said the
API token is "not needed in mTLS mode" (#6953).
The guide (en/fa/ru/zh) and the node form's mTLS hint (all 14 locales) now say
that updating the node from the master still needs a token with the
node-admin scope. No logic changes.
The CI workflow's path filter does not cover internal/web/translation or docs,
so only Docs CI ran on this head; the locale-dependent tests were run locally.
Every bot notice carries a Hide button, which deletes the message it sits on.
On a backup that message is the file itself: one tap, with no confirmation,
could remove the admin's only copy of the database. Backup files (the .db and
config.json, from the backup button, the scheduled job and the panel's
backup-to-Telegram endpoint) are now sent without a keyboard; other notices,
including the ban log file, keep Hide.
The backup button also left the menu above the files it sent, out of view at
the bottom of the chat. It now sends the Maintenance menu again below them and
removes the old one. A scheduled backup leaves the menu where it is.
A Host Description is appended to every raw-subscription node name as a base64
`?serverDescription=` tail. Only Happ and INCY read it; v2rayN, v2rayNG,
OpenClash and the rest show it as part of the node name, and the only way out
was clearing the Description (#7105).
The raw subscription body now carries the tail only when the requesting
User-Agent is Happ or INCY, for the endpoint links and the Hysteria2 loop
alike. Copied links, QR codes and the panel's link export keep it, since the
server cannot tell which client they end up in.
Closes#7105
gotp decodes the stored secret with strict base32 and panics when that fails,
so a 2FA secret saved through the settings API in lower case, grouped by
spaces, or not base32 at all turned every login and every attempt to turn 2FA
off into an HTTP 500. An empty secret had the opposite problem: the login
check accepted the code of an empty HMAC key, which anyone can compute.
VerifyWithSkew now normalizes the secret and verifies nothing for an empty or
non-base32 one, so secrets already stored in a display form work again.
Turning 2FA on through the settings update stores the normalized secret and
refuses one no authenticator could match.
The automatic soft limit read only /sys/fs/cgroup/memory.max, the root of
the cgroup namespace. A systemd MemoryMax on x-ui.service lives below that
root, so it was never seen: on a bare host the root has no memory.max and
no soft limit was set at all, and inside an LXC/Incus container the limit
came from the container (2 GiB -> "1843 MiB") while systemd killed the
panel at 650M. Either way GC never tightened before the OOM kill.
Walk from the process's own cgroup (/proc/self/cgroup) up to the visible
root and take the tightest memory.max (cgroup v2) or
memory.limit_in_bytes (v1). Docker with a private cgroup namespace sees
the same root limit as before.
xray-core 26.11.9 (bb335c6) raises any mux concurrency from 0 to 128 to
128, where 0 used to mean 8 and every other value was used as written. The
panel's default of 8 and anything a user types up to 128 therefore no
longer changes the result on a current core, while an older client core
still honours it.
The concurrency field of the outbound mux form, the host mux override and
the JSON subscription mux settings now carries that as a hint in all 14
locales. The emitted value is unchanged.
xray-core 26.11.9 (#7315) added "all", "allexceptlan", "tcp", "udp" and
"icmp", bare ports, port ranges and a CIDR prefix in front of any value.
The save-time check already runs the core's own parser, so the typed forms
are accepted as they are; the form now lists the new named values and the
tooltip explains them in all 14 locales.
xray-core 26.11.9 (#7329) renamed a final rule's blockDelay to delay, added
logLevel, and now refuses either on a rule whose action is not block. A
stored template with a blockDelay on an allow rule therefore stops the core
at startup after the upgrade.
A one-time seeder strips delay, blockDelay and logLevel from non-block rules
of the template's freedom outbounds and moves blockDelay to delay on block
rules. The outbound form reads both spellings (blockDelay wins, as in the
core), writes delay, gains a log level control on block rules and emits
neither key on an allow rule.
tzdata 2026f cancelled Cuba's November 2026 DST fallback, so on hosts
with current tzdata (macOS) 2026-11-01 has no repeated midnight:
TestNextWeeklyRenewal_RepeatedMidnight failed and the subscription
calendar cases passed without exercising the repeated midnight.
Move both to 2020-11-01, a Sunday fallback on the 1st that every tzdata
version agrees on. The weekly case still catches a 168-hour advance.
submitTrafficWrite falls back to running fn inline when the serial
writer is not running (before StartTrafficWriter, during the shutdown
drain, in CLI paths and tests). That path took no lock, so an inline
write could run beside the draining writer or another inline write,
breaking the single-writer invariant that guards the Postgres deadlock.
One visible effect: ResetTrafficByEmail fans out one reset per inbound.
Run side by side, the second reset read the record still disabled but
the traffic already zeroed, judged the client operator-disabled and
saved enable=false over the first reset's restore
(TestResetTrafficByEmail_ReenablesEveryInboundOfTheClient failed ~25%).
safeApply now holds a package mutex, so every write path is serialized.
Use valid translation keys on six panel screens, add the missing copy-failure and empty-value strings across all locales, and reject unresolved literal translation keys in the regression test.
Restore usable clients when renewed, avoid duplicate reset updates, and prioritize operator writes in the serialized traffic writer. Preserve manual disables and keep every inbound consistent after traffic resets.
Keep omitted client fields and per-inbound flows unchanged while honoring explicit clears. Support the query aliases used to recover legacy dot-name clients and regenerate the API reference. Add an HTTP regression covering partial updates through those aliases.
Reject reserved dot-segment client names and recover legacy records through query aliases. Preserve token scopes and path identity precedence, and update the generated API reference.
The v3.11.0 bot rebuild left the admin's client card without the subscription link, individual links and QR code, so an admin could not hand a config to a client who cannot reach Telegram yet. The card now carries Links and QR code buttons that open the existing screens. Closes#6984.
Xray refuses a VLESS inbound with server decryption whenever fallbacks is non-nil, even an empty list, so an API or imported inbound with decryption and fallbacks: [] took every inbound down. Empty fallback arrays are now normalized away on add, update, config build and node push; non-empty ones are refused with decryption, enabling decryption over stored fallback rules is refused, and a legacy conflicting row holds back the running core instead of stopping it. The form, API docs and locales follow. Closes#7001.
A kernel-mode AmneziaWG inbound routes and masquerades only its interface subnet, so peers whose AllowedIPs lay outside it (a restored backup, a changed subnet) handshook but got no internet. Enabling kernel mode, saving an active kernel inbound, and adding, enabling or re-addressing a client now refuse out-of-subnet peers with the offending client named. Legacy stray peers still start and can still be edited or disabled.
Typed commands edited the remembered menu message, which a user who cleared the chat can no longer see, and then deleted the command, so /start left the chat empty again. Typed commands (/start, /status, /usage, /clearall) now send a new screen and then remove the old menu, or retire its buttons when it is past Telegram's delete window; button taps still edit in place. Closes#6997.
parseWireguard joined u.Hostname(), which strips IPv6 brackets, with the port, so wireguard://key@[2001:db8::1]:51820 became 2001:db8::1:51820 and Xray's ParseDestination rejected it. The endpoint is now built with net.JoinHostPort, matching the frontend parser; IPv4 and hostname endpoints are unchanged.
An inbound switched off by its own traffic cap came back on the periodic reset, but the admin per-inbound reset and Reset All Traffic only zeroed the counters. After that nothing could tell it from a hand-disabled inbound, so it stayed off with every client on it. Both admin resets now re-enable the inbounds their cap switched off, using the predicate the periodic job used, now in the service next to disableInvalidInbounds; expired and hand-disabled inbounds stay off.
The host Remark hint said the label is shown as the config name when the inbound has no remark, but a host remark only ever fills the {{HOST}} token of the remark template; it never substitutes the inbound's remark. The hint in all 14 locales now tells operators to put {{HOST}} in the Remark Template. Fixes#7027.
Restarting the panel left it unreachable for up to a minute. CheckCpuJob sampled cpu.Percent over its whole one-minute period, so cron.Stop nearly always waited on it; it now diffs cpu.Times against its previous run (iowait counted as idle, as before). With Telegram unreachable, bus.Stop waited on an in-flight send and tgbot.Start ran getMe/setMyCommands inline; each bot call now returns once StopBot closes the bot's stop channel, the bot stops before the bus, and the artwork/commands warm-up runs in the background.
The subscription settings cache strips each inbound's clients array, but the TUIC link generator still reads credentials from it, so raw subscriptions (v2rayN, Shadowrocket) lost every TUIC link while the browser page kept it. TUIC now reads its full settings, as WireGuard and AmneziaWG already do.
A client on inbounds of several nodes has one traffic row homed on one inbound, but the lifecycle merge looked it up in a node-scoped map. A node that was not the home therefore looked like it had no master state, so its stale enable or disable overwrote the shared record and adopted settings, flipping the client every tick, and a renewal on that node was missed. The merge now uses the global per-email traffic lookup, including clients reported only in settings.